about summary refs log tree commit diff
path: root/fnl
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-02-27 00:05:37 +0900
committersefidel <contact@sefidel.net>2022-02-27 00:05:37 +0900
commit06616c4262c5587685283745a1e3f33a043279c4 (patch)
tree32d285bb87b2936c9a49caace91fc06e3616b568 /fnl
parente1d93225e090c68b0a7d4f37f31eab16e06e2a02 (diff)
downloadnvimrc-06616c4262c5587685283745a1e3f33a043279c4.tar.gz
nvimrc-06616c4262c5587685283745a1e3f33a043279c4.zip
feat(colors): move LSP highlights to colors
Diffstat (limited to 'fnl')
-rw-r--r--fnl/nvrc/colors.fnl14
-rw-r--r--fnl/nvrc/packs/lspconfig.fnl14
2 files changed, 14 insertions, 14 deletions
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! * <buffer>
         autocmd CursorMoved <buffer> 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")