feat: Load lspkind on insert event.
This commit is contained in:
parent
9635b45404
commit
7d8f6b85c7
@ -22,14 +22,24 @@ local yellow = colors.yellow
|
|||||||
|
|
||||||
local ui = require("core.utils").load_config().ui
|
local ui = require("core.utils").load_config().ui
|
||||||
|
|
||||||
|
-- Define bg color
|
||||||
|
-- @param group Group
|
||||||
|
-- @param color Color
|
||||||
local function bg(group, color)
|
local function bg(group, color)
|
||||||
cmd("hi " .. group .. " guibg=" .. color)
|
cmd("hi " .. group .. " guibg=" .. color)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Define fg color
|
||||||
|
-- @param group Group
|
||||||
|
-- @param color Color
|
||||||
local function fg(group, color)
|
local function fg(group, color)
|
||||||
cmd("hi " .. group .. " guifg=" .. color)
|
cmd("hi " .. group .. " guifg=" .. color)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Define bg and fg color
|
||||||
|
-- @param group Group
|
||||||
|
-- @param fgcol Fg Color
|
||||||
|
-- @param bgcol Bg Color
|
||||||
local function fg_bg(group, fgcol, bgcol)
|
local function fg_bg(group, fgcol, bgcol)
|
||||||
cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol)
|
cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol)
|
||||||
end
|
end
|
||||||
@ -41,8 +51,10 @@ else
|
|||||||
fg("Comment", grey_fg)
|
fg("Comment", grey_fg)
|
||||||
end
|
end
|
||||||
|
|
||||||
cmd "hi clear CursorLine" -- disable cusror line
|
-- Disable cusror line
|
||||||
fg("cursorlinenr", white) -- line number
|
cmd "hi clear CursorLine"
|
||||||
|
-- Line number
|
||||||
|
fg("cursorlinenr", white)
|
||||||
|
|
||||||
-- same it bg, so it doesn't appear
|
-- same it bg, so it doesn't appear
|
||||||
fg("EndOfBuffer", black)
|
fg("EndOfBuffer", black)
|
||||||
@ -75,38 +87,43 @@ if ui.transparency then
|
|||||||
fg("Comment", grey)
|
fg("Comment", grey)
|
||||||
end
|
end
|
||||||
|
|
||||||
----- plugin related highlights -----
|
-- [[ Plugin Highlights
|
||||||
|
|
||||||
-- dashboard --
|
-- Dashboard
|
||||||
fg("DashboardCenter", grey_fg)
|
fg("DashboardCenter", grey_fg)
|
||||||
fg("DashboardFooter", grey_fg)
|
fg("DashboardFooter", grey_fg)
|
||||||
fg("DashboardHeader", grey_fg)
|
fg("DashboardHeader", grey_fg)
|
||||||
fg("DashboardShortcut", grey_fg)
|
fg("DashboardShortcut", grey_fg)
|
||||||
|
|
||||||
-- git signs --
|
-- Git signs
|
||||||
fg_bg("DiffAdd", nord_blue, "none")
|
fg_bg("DiffAdd", nord_blue, "none")
|
||||||
fg_bg("DiffChange", grey_fg, "none")
|
fg_bg("DiffChange", grey_fg, "none")
|
||||||
fg_bg("DiffModified", nord_blue, "none")
|
fg_bg("DiffModified", nord_blue, "none")
|
||||||
|
|
||||||
-- indent blankline plugin --
|
-- Indent blankline plugin
|
||||||
fg("IndentBlanklineChar", line)
|
fg("IndentBlanklineChar", line)
|
||||||
|
|
||||||
-- LspDiagnostics --
|
-- ]]
|
||||||
-- error / warnings
|
|
||||||
|
-- [[ LspDiagnostics
|
||||||
|
|
||||||
|
-- Errors
|
||||||
fg("LspDiagnosticsSignError", red)
|
fg("LspDiagnosticsSignError", red)
|
||||||
fg("LspDiagnosticsSignWarning", yellow)
|
fg("LspDiagnosticsSignWarning", yellow)
|
||||||
fg("LspDiagnosticsVirtualTextError", red)
|
fg("LspDiagnosticsVirtualTextError", red)
|
||||||
fg("LspDiagnosticsVirtualTextWarning", yellow)
|
fg("LspDiagnosticsVirtualTextWarning", yellow)
|
||||||
|
|
||||||
-- info
|
-- Info
|
||||||
fg("LspDiagnosticsSignInformation", green)
|
fg("LspDiagnosticsSignInformation", green)
|
||||||
fg("LspDiagnosticsVirtualTextInformation", green)
|
fg("LspDiagnosticsVirtualTextInformation", green)
|
||||||
|
|
||||||
-- hints
|
-- Hints
|
||||||
fg("LspDiagnosticsSignHint", purple)
|
fg("LspDiagnosticsSignHint", purple)
|
||||||
fg("LspDiagnosticsVirtualTextHint", purple)
|
fg("LspDiagnosticsVirtualTextHint", purple)
|
||||||
|
|
||||||
-- NvimTree --
|
-- ]]
|
||||||
|
|
||||||
|
-- NvimTree
|
||||||
fg("NvimTreeEmptyFolderName", blue)
|
fg("NvimTreeEmptyFolderName", blue)
|
||||||
fg("NvimTreeEndOfBuffer", darker_black)
|
fg("NvimTreeEndOfBuffer", darker_black)
|
||||||
fg("NvimTreeFolderIcon", folder_bg)
|
fg("NvimTreeFolderIcon", folder_bg)
|
||||||
@ -120,7 +137,8 @@ fg_bg("NvimTreeStatuslineNc", darker_black, darker_black)
|
|||||||
fg("NvimTreeVertSplit", darker_black)
|
fg("NvimTreeVertSplit", darker_black)
|
||||||
bg("NvimTreeVertSplit", darker_black)
|
bg("NvimTreeVertSplit", darker_black)
|
||||||
fg_bg("NvimTreeWindowPicker", red, black2)
|
fg_bg("NvimTreeWindowPicker", red, black2)
|
||||||
-- disable some highlight in nvim tree if transparency enabled
|
|
||||||
|
-- Disable some highlight in nvim tree if transparency enabled
|
||||||
if ui.transparency then
|
if ui.transparency then
|
||||||
bg("NvimTreeNormal", "NONE")
|
bg("NvimTreeNormal", "NONE")
|
||||||
bg("NvimTreeStatusLineNC", "NONE")
|
bg("NvimTreeStatusLineNC", "NONE")
|
||||||
@ -128,7 +146,7 @@ if ui.transparency then
|
|||||||
fg("NvimTreeVertSplit", grey)
|
fg("NvimTreeVertSplit", grey)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- telescope --
|
-- Telescope
|
||||||
fg("TelescopeBorder", line)
|
fg("TelescopeBorder", line)
|
||||||
fg("TelescopePreviewBorder", grey)
|
fg("TelescopePreviewBorder", grey)
|
||||||
fg("TelescopePromptBorder", line)
|
fg("TelescopePromptBorder", line)
|
||||||
|
@ -138,7 +138,7 @@ return packer.startup(function()
|
|||||||
use {
|
use {
|
||||||
"onsails/lspkind-nvim",
|
"onsails/lspkind-nvim",
|
||||||
disable = not plugin_status.lspkind,
|
disable = not plugin_status.lspkind,
|
||||||
event = "BufEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.others").lspkind()
|
require("plugins.configs.others").lspkind()
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user