Giter Club home page Giter Club logo

lsp-colors.nvim's Introduction

This plugin has been archived, since it should be no longer needed. If any colorscheme stil l doesn't support the new diagnostics highlight groups for Neovim, then just post an issue or a PR to fix it there.


🌈 LSP Colors

Automatically creates missing LSP diagnostics highlight groups for color schemes that don't yet support the Neovim 0.5 builtin lsp client.

Screenshot

✨ Features

  • supports the latest Neovim 0.5 and 0.6 (HEAD) LSP highlight groups
  • support any colorscheme like Nord and Gruvbox
  • existing highlight groups from themes will never be overwritten
  • tries to use coc.nvim groups if they are defined in the theme
  • if not, we fall back to a default set of colors

⚑️ Requirements

  • Neovim >= 0.5.0

πŸ“¦ Installation

Install the theme with your preferred package manager:

vim-plug

Plug 'folke/lsp-colors.nvim'

packer

use 'folke/lsp-colors.nvim'

πŸš€ Usage

Nothing special. Just load a colorscheme as usual πŸ™‚

βš™οΈ Configuration

LSP Colors works out of the box, but you can set the default colors that will be used in case a theme doesn't have LSP nor Coc highlight groups.

-- Lua
require("lsp-colors").setup({
  Error = "#db4b4b",
  Warning = "#e0af68",
  Information = "#0db9d7",
  Hint = "#10B981"
})

Making undercurls work properly in Tmux

To have undercurls show up and in color, add the following to your Tmux config file:

# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0

lsp-colors.nvim's People

Contributors

dietrichm avatar folke avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lsp-colors.nvim's Issues

Not doing anything

Hi,

I'm trying to use this with https://github.com/metalelf0/jellybeans-nvim

I have:

    use({
        "folke/lsp-colors.nvim",
        config = function()
            require("lsp-colors").setup({
                Error = "#902020",
                Warning = "#cf6a4c",
                Information = "#ffb964",
                Hint = "#668799",
            })
        end,
    })

But it doesn't get applied to my colorscheme, even if I manually do :lua require("lsp-colors").fix()

Tried to run :verbose hi LspDiagnostisUnderlineError and it says that that highlight group is not defined.

Btw, I'm running neovim from source, latest commit as of today.

Not working

Screenshot:2021-05-15

I dont think this is desired outcome

use {
    "folke/lsp-colors.nvim",
    config = function()
      require("lsp-colors").setup({
        Error = "#db4b4b",
        Warning = "#e0af68",
        Information = "#0db9d7",
        Hint = "#10B981"
      })
    end
  }

Not working

I am have installed the plugins, config in lua files then source in the init.vim. However, it still not working, are there any solution ?
Neovim: 0.5
Terminal: Kitty

image

not kicking in when the colorscheme set by autocmd

hi,

first able, this is wonderful, will allow me to use ariake colorscheme...but I have an issue.

I change colorschemes depending on the file I'm editing:

augroup colors
    au!
    autocmd BufEnter * colorscheme space-nvim | set background=light
    autocmd BufEnter *.py colorscheme ariake | set background=light
augroup END

When I open a python file, the diagnostics are not shown properly. If I just do this (being already in ariake):

:colorscheme ariake

then suddenly it works. Chanign to something else and coming back to ariake also works. I verified if I just set airake in my init.vim and remove the per filetype stuff the plugin works normally.

I'm in master as of today.
thanks!

Way to change the colors of lsp

I have used these lines of code to change the colors of errors, warnings, and other virtual text provided by LSP.
hi DiagnosticError ctermbg=NONE ctermfg=NONE guibg=NONE guifg=#F24B42
hi DiagnosticWarn ctermbg=NONE ctermfg=NONE guibg=NONE guifg=#F5B439
hi DiagnosticInfo ctermbg=NONE ctermfg=NONE guibg=NONE guifg=#AEFA47
hi DiagnosticHint ctermbg=NONE ctermfg=NONE guibg=NONE guifg=#14BC85
This config could be used as an alternative or could be used to update the plugin itself.

Screenshot:

image

Tmux underline color doesn't match diagnostic

I followed the instructions regarding setting up underlines with tmux.

I noticed that although undercurls work, they are still the same color of the text, instead of the color of the diagnostic. This does not occur outside of tmux.

I am using kitty as my terminal as well. Is this feature supposed to work in tmux?

Thanks.

underlines' color not matching the diagnostic color

Sorry if it's not related to this plugin but I was some way hoping installing this could get it to work, the issue I have is that I think the underline color should be red (in this case) as you show in the screenshots despite I don't have undercurls but correct me if I'm wrong.
image

How do I change the background color of virtual text?

Thank you for the great plugin.
I am using nvim builtin lsp.
I want to eliminate the virtual text background as shown in the sample screenshot.
How can I do this?
Sorry if this is a question that cannot be accomplished with this plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.