Anyone using Neovim with Treesitter?
Doesn't seem to work correctly for me... the def/defn
and name have the same color and the rainbow parens (I use junegunn/rainbow_parentheses.vim
) are not showing.
Installation seemed simple enough but maybe I'm missing something? Just have
lua <<EOF
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
},
}
EOF
and the clojure grammar installed. Neovim nightly
(pics show without / with treesitter enabled). Thx for any help!clojure syntax grammar in tree sitter is poor
it is the same for me
there are no distinctions for def defn
it treats it just as a list with items
that's why it shows it one color
here is the file https://github.com/sogaiu/tree-sitter-clojure/blob/master/grammar.js
Yup, I was confused by that as well. Checked with treesitter playground
There's probably no color scheme made for clojure yet I'd guess?
Hm maybe you need to use one of these schemes: https://github.com/nvim-treesitter/nvim-treesitter/wiki/Colorschemes
Not sure how that stuff works 🙂
I was thinking the same thing.. but there was a AMA on Reddit by one of the Tree-Sitter devs a couple days ago.. https://www.reddit.com/r/neovim/comments/nk2mk0/ama_treesitter_integration_in_neovim/ and I thought he said that any colorscheme should work.. 🤷 I'll try one of the ones in the wiki (thx!) and see what happens. Not a big deal really.. was just curious what kind of difference the tree sitter would make for highlighting.
I tried a fennel file and that looked more interestingly syntax highlighted