Comments (13)
Hi @mattleong! Yes, with this plugin you should end up with the file type nomad
and the syntax hcl
. The file type/syntax split is there to improve interoperability with other Vim plugins that might work specifically with either Nomad or Terraform files.
What does set filetype
say to you on one of these files? What about set syntax
? Do you use some other Vim plugins that might apply to Nomad files?
from vim-hcl.
set filetype
says nomad
. set syntax
says nomad
as well.
from vim-hcl.
Do you use some other Vim plugins that could perhaps set syntax=nomad
for filetype
nomad
?
from vim-hcl.
Is there a way to find out how that got set?
from vim-hcl.
Do you use some other Vim plugins that could perhaps
set syntax=nomad
forfiletype
nomad
?
Confirming that I do not use any other plugins that would do that.
from vim-hcl.
Which Vim versions are you two using?
from vim-hcl.
Is there a way to find out how that got set?
Yes, I just learned that there is. Give the command :verbose set syntax?
to see what last set syntax
.
from vim-hcl.
@mattleong @i0rek Did you test :verbose set syntax?
to see what last set syntax
on a Nomad file?
from vim-hcl.
Just to add that the same is happening to me, but for Terraform files (.tf), while Terragrunt (.hcl) are working fine (I don't use Nomad).
When I manualy set ft=hcl, this is the output of verbose test:
syntax=hcl
Last set from /usr/share/vim/vim82/syntax/syntax.vim line 32
When I just open a .tf file it just says:
syntax=
And there is no highlighting.
System: MacOS with Apple's Vim v8.2
from vim-hcl.
Oh, and replacing terraform with hcl in ftdetect/hcl.vim:
- autocmd BufNewFile,BufRead *.tf set filetype=terraform
+ autocmd BufNewFile,BufRead *.tf set filetype=hcl
Fixes the issue for .tf files.
from vim-hcl.
Thank you for the additional details, @orlvn.
I'm also using Vim 8.2, and unfortunately I still cannot reproduce the issue locally. However, I can see that this issue is affecting many. I believe that this issue originated with the commit 13020b3, which started using different filetype
and syntax
values for Nomad and Terraform. This was in response to #14, which was concerned with the compatibility between this plugin and some other plugins that expected filetype=terraform
rather than filetype=hcl
for Terraform files.
I will revert that commit for now. I spent some time yesterday studying the built-in plugins in Vim 8.2, and I couldn't find any file formats for which filetype
and syntax
didn't match. Therefore I think it's safer to just set filetype=hcl
(or perhaps start using setfiletype
, which does not override an earlier settting) also for Nomad and Terraform files.
from vim-hcl.
#18 hopefully solved the issue for all of you.
from vim-hcl.
Work perfect! Thanks!!!!
from vim-hcl.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-hcl.