commit b9018f3fa4e6ce885b17b4a8d52cf1f420aa192f
parent 33ef3304e2ad078627f7cfa8595e48144df80e92
Author: Chris Bracken <chris@bracken.jp>
Date: Thu, 4 Dec 2025 21:22:24 +0900
nvim: update beancount price formatting
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.config/nvim/after/ftplugin/beancount.lua b/.config/nvim/after/ftplugin/beancount.lua
@@ -9,7 +9,7 @@ vim.api.nvim_create_autocmd("BufWritePost", {
local filepath = vim.api.nvim_buf_get_name(args.buf)
local filename = vim.fn.fnamemodify(filepath, ":t") -- just the tail name
local cmd
- if vim.startswith(filename, "prices_") then
+ if filepath:match("[\\/]prices[\\/]") then
-- prices_* are formatted without a hardcoded currency column.
cmd = string.format("silent !bean-format %s -o %s", vim.fn.shellescape(filepath), vim.fn.shellescape(filepath))
else