Fork me on GitHub
#vim
<
2021-07-23
>
grazfather16:07:32

Also if youโ€™re on a clojure slack you probably think Lua is hideous (I do) in which case you should consider writing your config in Fennel, which is very clojure-like

3
walterl19:07:11

How are you guys configuring highlighting with treesitter? The best I got was with the config below, but the highlighting looks "worse" (fewer things highlighted) than without TS. (This is after doing :TSInstall clojure)

require'nvim-treesitter.configs'.setup {
  highlight = {
    enable = true,
    additional_vim_regex_highlighting = true,
  },
  rainbow = {
    enable = true,
    extended_mode = true,
  }
}
EOF

berkeleytrue20:07:05

You need to make sure the treesitter grammer for clojure is installed. This is done with the ensure_installed property https://github.com/berkeleytrue/dotfiles/blob/master/.config/nvim/fnl/plugins/tree-sitter.fnl#L64 (fennel not lua but should be able to get the gist)

berkeleytrue20:07:29

Then you need to actually install the grammers using the ts commands (it might actually auto install on start up. Don't remember)

berkeleytrue20:07:29

Although there is a refactor coming for the hightlights.

berkeleytrue20:07:49

It let's you play around with queries and also see what highlight TS is applying for a given keyword

walterl20:07:27

Sweet! Thanks for that detailed response thanks2

dominicm21:07:57

Oh, there's a PR too which improves the highlighting w/ tree-sitter ๐Ÿ™‚

dominicm21:07:15

@U35G2V78U write an article of "Nvim 0.5.0 with Clojure"! ๐Ÿ™‚

๐Ÿ™‚ 5
2
walterl19:07:33

What else are you using TS for in your Clojure editing?