Fork me on GitHub
#vim
<
2021-05-26
>
fedreg17:05:49

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!

Aleh Atsman13:05:35

clojure syntax grammar in tree sitter is poor

Aleh Atsman13:05:42

it is the same for me

Aleh Atsman13:05:55

there are no distinctions for def defn

Aleh Atsman13:05:07

it treats it just as a list with items

Aleh Atsman13:05:19

that's why it shows it one color

Aleksander18:05:10

Yup, I was confused by that as well. Checked with treesitter playground

emilaasa19:05:48

There's probably no color scheme made for clojure yet I'd guess?

emilaasa19:05:48

Not sure how that stuff works 🙂

fedreg20:05:28

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.

emilaasa07:05:36

I tried a fennel file and that looked more interestingly syntax highlighted