I use tailwind-fold mostly for projects written with Templ in Go. I noticed that after updating I got an error when starting Neovim:
Error detected while processing BufEnter Autocommands for "*":
packer.nvim: Error running config for tailwind-fold.nvim: ...cker/start/tailwind-fold.nvim/lua
/tailwind-fold/init.lua:33: attempt to concatenate local 'extension' (a nil value)
This happened because I had added "templ" to my config, and the code in init.lua does this:
local ft_to_pattern = {}
for _, ft in ipairs(config.options.ft) do
local extension = config.filetype_to_extension[ft]
table.insert(ft_to_pattern, "*." .. extension)
end
where config.filetype_to_extension[ft] is nil for unknown values of ft.
The quick-fix I did locally was to make templ a known value, but an alternative could be doing this
local ft_to_pattern = {}
for _, ft in ipairs(config.options.ft) do
local extension = config.filetype_to_extension[ft] or ft
table.insert(ft_to_pattern, "*." .. extension)
end
I use tailwind-fold mostly for projects written with Templ in Go. I noticed that after updating I got an error when starting Neovim:
This happened because I had added "templ" to my config, and the code in init.lua does this:
where
config.filetype_to_extension[ft]
is nil for unknown values offt
.The quick-fix I did locally was to make templ a known value, but an alternative could be doing this