Skip to content

How can I get the LSP highlight to respect the nvcode color scheme? #32

@David-Else

Description

@David-Else

Please forgive my ignorance of how Vim colours work. In my LSP settings I have the following (mostly just copy pasted, I don't really know what it does):

  if client.resolved_capabilities.document_highlight then
    vim.api.nvim_exec([[
      hi LspReferenceRead ctermbg=237 guibg=LightYellow
      hi LspReferenceText ctermbg=237 guibg=LightYellow
      hi LspReferenceWrite ctermbg=237 guibg=LightYellow
      augroup lsp_document_highlight
        autocmd! * <buffer>
        autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
        autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
      augroup END
    ]], false)
  end

In my old color scheme when I set ctermbg=237 it made the highlight a nice subtle grey just like in VS Code. When I use this theme and treesitter this setting seems to make no difference, it seems to use guibg and whatever I set looks really bad!

Does this theme have a ctermbg=237 equivalent for the highlighting of matched variables, and if so how can I use it?

Right now it looks really bad:
Screenshot from 2021-03-16 12-06-43

I am hoping for the light grey in VS Code:
Screenshot from 2021-03-16 12-17-41

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions