ChristianChiarulli / nvcode-color-schemes.vim

A bunch of generated colorschemes (treesitter supported)
MIT License
302 stars 67 forks source link

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

Open David-Else opened 3 years ago

David-Else commented 3 years ago

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