Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LspReferenceRead (and Write and Text) #120

Open
aktau opened this issue Aug 28, 2023 · 1 comment
Open

Support LspReferenceRead (and Write and Text) #120

aktau opened this issue Aug 28, 2023 · 1 comment

Comments

@aktau
Copy link

aktau commented Aug 28, 2023

This is not a bug report, hence I'm not following the template.

I'm a fan of this colorscheme and it is my daily driver. Neovim's builtin LSP has a nice feature where (if the LSP) supports it, Neovim can highlight other references to the variables/declaration/... under the cursor. It is generally configured in the LSP on attach method like this:

    if client.server_capabilities.documentHighlightProvider then
      aucmd("CursorHold", function() vim.lsp.buf.document_highlight() end)
      aucmd("CursorMoved", function() vim.lsp.buf.clear_references() end)
    end

I was wondering why this did nothing for me, despite my LSP supporting document highlighting. Then I found out mhartington/oceanic-next lacks the required highlight groups. Manually adding the following works:

hi! link LspReferenceRead Visual
hi! link LspReferenceText Visual
hi! link LspReferenceWrite Visual

This could be a nice default to just add to oceanic-next, so I can remove it from my config. I've been thinking about adding a curl/underline:

hi LspReferenceWrite cterm=undercurl gui=undercurl guibg=#3c3836

This works in my terminal, but I'm not sure how to go about verifying that the users' terminal supports this.

@aktau
Copy link
Author

aktau commented Aug 28, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant