RRethy / vim-illuminate

illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.
2.12k stars 44 forks source link

IlluminatedWordWrite not working with provider LSP in Go (gopls) #139

Closed debugloop closed 1 year ago

debugloop commented 1 year ago

Describe the bug The distinct highlight for writing to references does not trigger in Go files when gopls is properly setup. Even though gopls appears to support DocumentHightlightKind (How can I verify this?).

To Reproduce

  1. Write to a reference in Go.
  2. Note the absence of the special highlight.
  3. Disable LSP as a provider in vim-illuminate config, restart.
  4. Note that the Treesitter-based highlighting works.

Expected behavior It being highlighted as is the case with other languages. Maybe fallback on secondary providers automatically?

RRethy commented 1 year ago

Please follow the issue template.

I ran it locally and gopls only returns a kind = 1 which is for the generic Text document highlight kind. You can disable the lsp highlighting if you prefer to use tree-sitter based highlighting.

It being highlighted as is the case with other languages.

I'm not sure what this means.