eugen0329 / vim-esearch

Perform search in files easily
352 stars 12 forks source link

Neovim treesitter highlighting #207

Open IndianBoy42 opened 1 year ago

IndianBoy42 commented 1 year ago

I have vim regex syntax highlighting turned off since treesitter works for all my use cases very well. This means that there is zero syntax highlighting in the esearch window, which is quite annoying.

Possible solutions:

  1. is there a way to enable vim syntax highlighting only for esearch? can/should this be done automatically from inside this plugin
  2. is it possible to use treesitter for the highlighting? treesitter supports injections so different parts of the file can be highlighted according to their individual languages. but I dont know how well treesitter would work for this incomplete snippets of code, technically its incorrect syntax.
  3. is it possible to get the highlighting groups (which may be treesitter, vim syntax, lsp, etc) from the original buffer. although this assumes the file is open in another buffer, and we probably dont want to open up every file that comes up in the search. (maybe opt-in)