murtaza-u / gruvqueen

Port of famous gruvbox theme in lua(inspired by gruvbox-material)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regarding compatibility with vim.lsp.buf.document_highlight()

mra077 opened this issue · comments

Thanks for making this theme. I'm trying to set text highlighting on LSP when the cursor gets on top of a word, I can get it to work with other themes, but with this one it doesn't seem to work. Attached comes an image of what I want to achieve with the darkplus theme on the right and gruvqueen on the left.
05-05-2022-1651758216

The code that highlights the text

local function lsp_highlight_document(client)
  -- Set autocommands conditional on server_capabilities
  if client.resolved_capabilities.document_highlight then
    vim.api.nvim_exec(
      [[
      augroup lsp_document_highlight
        autocmd! * 
        autocmd CursorHold  lua vim.lsp.buf.document_highlight()
        autocmd CursorMoved  lua vim.lsp.buf.clear_references()
      augroup END
    ]],
      false
    )
  end
end