Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No syntax highlighting for .libsonnet in neovim (0.4.2) #18

Open
opoei opened this issue Sep 24, 2019 · 4 comments
Open

No syntax highlighting for .libsonnet in neovim (0.4.2) #18

opoei opened this issue Sep 24, 2019 · 4 comments

Comments

@opoei
Copy link

opoei commented Sep 24, 2019

Syntax highlighting works for .jsonnet files. However there is no syntax highlighting for libsonnet. Neovim version 0.4.2 built through brew.

@sparkprime
Copy link
Member

It should work: https://github.com/google/vim-jsonnet/blob/master/ftdetect/jsonnet.vim
Any idea why it doesn't?

@opoei
Copy link
Author

opoei commented Sep 25, 2019

I wonder if the autocmd is not executing? If I open up a .libsonnet and execute setf jsonnet highlighting works.

@lukebond
Copy link
Contributor

lukebond commented Feb 20, 2020

@opoei did you ever figure this out? i created a directory ~/.local/share/nvim/site/pack/plugins/start and cloned the vim-sonnet repo into there and it worked. it took me a while to figure out how to do it when i don't use a package manager. hope that helps

@samcgardner
Copy link

I added the following to init.vim and things started working:

autocmd BufRead,BufNewFile *.libsonnet set filetype=jsonnet

I haven't the foggiest why this helps though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants