Closed tommyalatalo closed 1 year ago
Hey, this (detection and configuration) is usually handled by the editor. Are you using neovim by chance?
Yes, neovim is what I'm running
Ok then we could probably create a PR to neovim-treesitter to add nomad
to https://github.com/nvim-treesitter/nvim-treesitter/blob/d642de92f700c74613977fe6697fb42b299177c9/lua/nvim-treesitter/parsers.lua#L4. That should suffice i think! If not then we would need to set the filetype for .nomad
files too. I can try to create a PR over the weekend! One problem could be that the queries are geared to terraform currently but that may be acceptable for now.
You can solve this by following this https://neovim.io/doc/user/filetype.html#new-filetype and adding
au BufRead,BufNewFile *.nomad set filetype=hcl
to your ~/.config/nvim/ftdetect
file
Hashicorp's Nomad orchestrator commonly uses the filetype
.nomad
for its files. While the file extension is named differently, these files are in fact HCL files, and it would be great if this plugin detected and parsed.nomad
files as well, which it doesn't seem to do now. I think this has already been done for.tf
terraform files in this plugin, I get syntax highlighting for those..tf
files are in the exact same position as.nomad
files - not named.hcl
, but the contents are always HCL.