From 06616c4262c5587685283745a1e3f33a043279c4 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 27 Feb 2022 00:05:37 +0900 Subject: feat(colors): move LSP highlights to colors --- fnl/nvrc/colors.fnl | 14 ++++++++++++++ fnl/nvrc/packs/lspconfig.fnl | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'fnl/nvrc') diff --git a/fnl/nvrc/colors.fnl b/fnl/nvrc/colors.fnl index 1392a9f..b231e4e 100644 --- a/fnl/nvrc/colors.fnl +++ b/fnl/nvrc/colors.fnl @@ -50,6 +50,20 @@ (highlight :NvimInternalError {:fg (. colors :red)}) (highlight :VertSplit {:fg (. colors :grey2)}) + ; LSP + (highlight :DiagnosticError {:fg (. colors :red)}) + (highlight :DiagnosticWarn {:fg (. colors :yellow)}) + (highlight :DiagnosticInformation {:fg (. colors :green)}) + (highlight :DiagnosticHint {:fg (. colors :grey)}) + (highlight :LspReferenceRead {:underline true}) + (highlight :LspReferenceText {:underline true}) + (highlight :LspReferenceWrite {:underline true}) + (highlight :LspSemantic_type {:link :Include}) + (highlight :LspSemantic_function {:link :Identifier}) + (highlight :LspSemantic_struct {:link :Number}) + (highlight :LspSemantic_variable {:bg :gray}) + (highlight :LspSemantic_keyword {:link :Structure}) + ; Lir (highlight :LirFloatNormal {:bg (. colors :black)}) (highlight :LirDir {:fg (. colors :skyblue)}) diff --git a/fnl/nvrc/packs/lspconfig.fnl b/fnl/nvrc/packs/lspconfig.fnl index 08ef66a..585a7be 100644 --- a/fnl/nvrc/packs/lspconfig.fnl +++ b/fnl/nvrc/packs/lspconfig.fnl @@ -1,18 +1,10 @@ (local lsp (require :lspconfig)) -(local {: highlight} (require :nvrc.macro.color)) (local {: merge} (require :nvrc.utils)) (local colors (require :nvrc.colors)) (fn on_attach [client bufnr] - (highlight :DiagnosticError {:fg (. colors :red)}) - (highlight :DiagnosticWarn {:fg (. colors :yellow)}) - (highlight :DiagnosticInformation {:fg (. colors :green)}) - (highlight :DiagnosticHint {:fg (. colors :grey)}) (if client.resolved_capabilities.document_highlight (do - (highlight :LspReferenceRead {:underline true}) - (highlight :LspReferenceText {:underline true}) - (highlight :LspReferenceWrite {:underline true}) (vim.api.nvim_exec "augroup lsp_document_highlight autocmd! * autocmd CursorMoved lua vim.lsp.buf.clear_references() @@ -42,9 +34,3 @@ (init_lsp :ccls) (init_lsp :hls) (init_lsp :rust_analyzer) - -(vim.cmd "highlight link LspSemantic_type Include") -(vim.cmd "highlight link LspSemantic_function Identifier") -(vim.cmd "highlight link LspSemantic_struct Number") -(vim.cmd "highlight LspSemantic_variable guifg=gray") -(vim.cmd "highlight link LspSemantic_keyword Structure") -- cgit 1.4.1