Replies: 1 comment
-
I know this is over a year late but this was one of the first things I found when googling this issue. It took me some tinkering so I am putting my solution here in the event any others come here looking for a solution as well. Update: After using this the past few days I have found that it only works if you open the file with NeoVIM and not if you navigate to it with NeoTree or some other browsing method, like Telescope, I have updated it, and it seems to work through all methods now. local autocmd = vim.api.nvim_create_autocmd
autocmd("FileType", {
pattern = { "mustache" },
callback = function()
if vim.fn.expand("%:e") == "tpl" then
vim.bo.filetype = "helm"
end
end,
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This isn't really related to using the helm chart so much as developing it, but I see this everywhere, not just in the nextcloud helm chart, but in lots of tpl files in other helm charts as well:
{{/* vim: set filetype=mustache: */}}
The issue is it results in no syntax highlighting for me in neovim. I typically delete this line before working on a chart, and add it back when I'm done, so I can use Mason and nvim-treesitter to do proper syntax highlighting for go. There's also the vim-helm plugin that works well enough if you're using vim directly, but you'd have to put in an autocommand to overwrite the filetype set by the
set filetype
comment or delete that comment entirely to make it work.What is mustache though? Is it this old plugin? 🤔 It seems like this could be it, but is it better than the alternatives I mentioned?
Very low priority, but happy to learn more if other users have opinions :)
Beta Was this translation helpful? Give feedback.
All reactions