From af044d5adf8b6b22b3903ff5b5b3a2c196bb7033 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Fri, 30 Apr 2021 16:41:57 +0200 Subject: [PATCH] clenaup --- files/.config/nvim/fnl/plugins/lsp.fnl | 34 ++++++++++++++++---------- files/.config/nvim/fnl/utils.fnl | 8 +++--- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/files/.config/nvim/fnl/plugins/lsp.fnl b/files/.config/nvim/fnl/plugins/lsp.fnl index 3a7522f..ccbf3e9 100644 --- a/files/.config/nvim/fnl/plugins/lsp.fnl +++ b/files/.config/nvim/fnl/plugins/lsp.fnl @@ -112,20 +112,28 @@ :scroll_down ""}}) -(utils.highlight "LspFloatWinNormal" {:bg colors.dark0_hard}) -(utils.highlight "LspFloatWinBorder" {:bg colors.dark0_hard :fg colors.dark0_hard}) -(utils.highlight "LspSagaHoverBorder" {:bg colors.dark0_hard :fg colors.dark0_hard}) -(utils.highlight "LspSagaRenameBorder" {:bg colors.dark0_hard :fg colors.dark0_hard}) -(utils.highlight "LspSagaSignatureHelpBorder" {:bg colors.dark0_hard :fg colors.dark0_hard}) -(utils.highlight "LspSagaCodeActionBorder" {:bg colors.dark0_hard :fg colors.dark0_hard}) -(utils.highlight "LspSagaDefPreviewBorder" {:bg colors.dark0_hard :fg colors.dark0_hard}) +(utils.highlight [ "LspFloatWinNormal" ] {:bg colors.dark0_hard}) +(utils.highlight [ "LspFloatWinBorder" + "LspSagaHoverBorder" + "LspSagaRenameBorder" + "LspSagaSignatureHelpBorder" + "LspSagaCodeActionBorder" + "LspSagaDefPreviewBorder" + "LspSagaDiagnosticBorder"] + { :bg colors.dark0_hard :fg colors.dark0_hard}) -(utils.highlight "LspSagaCodeActionTitle" {:fg colors.bright_aqua}) -(utils.highlight "LspSagaBorderTitle" {:fg colors.bright_aqua}) -(utils.highlight "LspSagaCodeActionContent" {:fg colors.bright_aqua}) -(utils.highlight "LspSagaFinderSelection" {:fg colors.bright_aqua}) -(utils.highlight "LspSagaDiagnosticHeader" {:fg colors.bright_aqua}) -(utils.highlight "TargetWord" {:fg colors.bright_aqua}) +(utils.highlight [ "LspSagaDiagnosticTruncateLine" + "LspSagaDocTruncateLine" + "LspSagaShTruncateLine"] + { :bg "NONE" :fg colors.dark0}) + +(utils.highlight [ "TargetWord" + "LspSagaCodeActionTitle" + "LspSagaBorderTitle" + "LspSagaCodeActionContent" + "LspSagaFinderSelection" + "LspSagaDiagnosticHeader"] + { :fg colors.bright_aqua}) ; >>>>> diff --git a/files/.config/nvim/fnl/utils.fnl b/files/.config/nvim/fnl/utils.fnl index 6e8cbc8..6a7928e 100644 --- a/files/.config/nvim/fnl/utils.fnl +++ b/files/.config/nvim/fnl/utils.fnl @@ -74,10 +74,12 @@ :gray "#928374"}) -(defn highlight [group colset] +(defn highlight [group-arg colset] (let [default { :fg "NONE" :bg "NONE" :gui "NONE"} - opts (a.merge default colset)] - (nvim.command (.. "hi! "group" guifg='"opts.fg"' guibg='"opts.bg"' gui='"opts.gui"'")))) + opts (a.merge default colset) + hl-groups (if (a.string? group-arg) [group-arg] group-arg)] + (each [_ group (ipairs hl-groups)] + (nvim.command (.. "hi! "group" guifg='"opts.fg"' guibg='"opts.bg"' gui='"opts.gui"'"))))) (defn comp [f g]