mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2025-12-05 02:53:38 -08:00
fix highlighting
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
require("core.lazy")
|
require("core.lazy")
|
||||||
vim.cmd("colorscheme catppuccin")
|
vim.cmd("colorscheme catppuccin")
|
||||||
require("core.keymaps")
|
require("core.keymaps")
|
||||||
|
require("core.autocmds")
|
||||||
|
require("core.highlights")
|
||||||
-- require("core.lsp-notifications")
|
-- require("core.lsp-notifications")
|
||||||
require("utils.extensions")
|
require("utils.extensions")
|
||||||
require("utils.telescope_extra").setup()
|
require("utils.telescope_extra").setup()
|
||||||
|
|||||||
@@ -1,23 +1,6 @@
|
|||||||
-- gray
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemAbbrDeprecated", { bg = "NONE", strikethrough = true, fg = "#808080" })
|
|
||||||
-- blue
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { bg = "NONE", fg = "#569CD6" })
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemAbbrMatchFuzzy", { link = "CmpIntemAbbrMatch" })
|
|
||||||
-- light blue
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindVariable", { bg = "NONE", fg = "#9CDCFE" })
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindInterface", { link = "CmpItemKindVariable" })
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindText", { link = "CmpItemKindVariable" })
|
|
||||||
-- pink
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindFunction", { bg = "NONE", fg = "#C586C0" })
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindMethod", { link = "CmpItemKindFunction" })
|
|
||||||
-- front
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindKeyword", { bg = "NONE", fg = "#D4D4D4" })
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindProperty", { link = "CmpItemKindKeyword" })
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindUnit", { link = "CmpItemKindKeyword" })
|
|
||||||
|
|
||||||
-- Customization for Pmenu
|
-- Customization for Pmenu
|
||||||
vim.api.nvim_set_hl(0, "PmenuSel", { bg = "#282C34", fg = "NONE" })
|
vim.api.nvim_set_hl(0, "PmenuSel", { bg = "#282C34", fg = "NONE" })
|
||||||
vim.api.nvim_set_hl(0, "Pmenu", { fg = "#C5CDD9", bg = "#22252A" })
|
vim.api.nvim_set_hl(0, "Pmenu", { fg = "#C5CDD9", bg = "dodgerblue" })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemAbbrDeprecated", { fg = "#7E8294", bg = "NONE", strikethrough = true })
|
vim.api.nvim_set_hl(0, "CmpItemAbbrDeprecated", { fg = "#7E8294", bg = "NONE", strikethrough = true })
|
||||||
vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { fg = "#82AAFF", bg = "NONE", bold = true })
|
vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { fg = "#82AAFF", bg = "NONE", bold = true })
|
||||||
@@ -56,4 +39,8 @@ vim.api.nvim_set_hl(0, "CmpItemKindEnumMember", { fg = "#DDE5F5", bg = "#6C8ED4"
|
|||||||
vim.api.nvim_set_hl(0, "CmpItemKindInterface", { fg = "#D8EEEB", bg = "#58B5A8" })
|
vim.api.nvim_set_hl(0, "CmpItemKindInterface", { fg = "#D8EEEB", bg = "#58B5A8" })
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindColor", { fg = "#D8EEEB", bg = "#58B5A8" })
|
vim.api.nvim_set_hl(0, "CmpItemKindColor", { fg = "#D8EEEB", bg = "#58B5A8" })
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindTypeParameter", { fg = "#D8EEEB", bg = "#58B5A8" })
|
vim.api.nvim_set_hl(0, "CmpItemKindTypeParameter", { fg = "#D8EEEB", bg = "#58B5A8" })
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644", bg = "#181926" })
|
|
||||||
|
vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#8aadf4", bold = true })
|
||||||
|
vim.api.nvim_set_hl(0, "LspSignatureActiveParameter", { fg = "#89b4fa", bg = "NONE", bold = true })
|
||||||
|
vim.api.nvim_set_hl(0, "CmpBorder", { fg = "#8aadf4", bold = true })
|
||||||
|
vim.api.nvim_set_hl(0, "CmpDocBorder", { fg = "#8aadf4", bold = true })
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ end
|
|||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("core.options")
|
require("core.options")
|
||||||
require("core.autocmds")
|
|
||||||
require("core.highlights")
|
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
-- Setup lazy.nvim
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
|
|||||||
@@ -52,20 +52,6 @@ g.db_ui_use_nerd_fonts = 1
|
|||||||
-- vim.cmd.colorscheme = 'catppuccin-macchiato'
|
-- vim.cmd.colorscheme = 'catppuccin-macchiato'
|
||||||
vim.cmd.colorscheme = "catppuccin"
|
vim.cmd.colorscheme = "catppuccin"
|
||||||
|
|
||||||
-- Define the highlight color for float border
|
|
||||||
vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#89b4fa", bold = true })
|
|
||||||
|
|
||||||
local border = {
|
|
||||||
{ "╭", "FloatBorder" },
|
|
||||||
{ "─", "FloatBorder" },
|
|
||||||
{ "╮", "FloatBorder" },
|
|
||||||
{ "│", "FloatBorder" },
|
|
||||||
{ "╯", "FloatBorder" },
|
|
||||||
{ "─", "FloatBorder" },
|
|
||||||
{ "╰", "FloatBorder" },
|
|
||||||
{ "│", "FloatBorder" },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- set border for floating windows and signature help
|
-- set border for floating windows and signature help
|
||||||
-- UNSUPPPORTED: https://github.com/neovim/neovim/issues/32242#issuecomment-2777120640
|
-- UNSUPPPORTED: https://github.com/neovim/neovim/issues/32242#issuecomment-2777120640
|
||||||
-- l.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
-- l.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
||||||
|
|||||||
@@ -28,16 +28,21 @@ return {
|
|||||||
opts = {}, -- merged with defaults from documentation
|
opts = {}, -- merged with defaults from documentation
|
||||||
},
|
},
|
||||||
signature = {
|
signature = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
auto_open = {
|
auto_open = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
trigger = true, -- Automatically show signature help when typing a trigger character from the LSP
|
trigger = true, -- Automatically show signature help when typing a trigger character from the LSP
|
||||||
luasnip = true, -- Will open signature help when jumping to Luasnip insert nodes
|
luasnip = true, -- Will open signature help when jumping to Luasnip insert nodes
|
||||||
throttle = 50, -- Debounce lsp signature help request by 50ms
|
throttle = 50, -- Debounce lsp signature help request by 50ms
|
||||||
},
|
},
|
||||||
view = nil, -- when nil, use defaults from documentation
|
view = "hover", -- use floating popup view
|
||||||
---@type NoiceViewOptions
|
---@type NoiceViewOptions
|
||||||
opts = {}, -- merged with defaults from documentation
|
opts = {
|
||||||
|
lang = "markdown",
|
||||||
|
replace = true,
|
||||||
|
relative = "cursor",
|
||||||
|
position = { row = -6, col = -1 },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- you can enable a preset for easier configuration
|
-- you can enable a preset for easier configuration
|
||||||
|
|||||||
@@ -121,10 +121,11 @@ return {
|
|||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = {
|
completion = {
|
||||||
-- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
|
col_offset = -3,
|
||||||
col_offset = 0,
|
|
||||||
side_padding = 0,
|
side_padding = 0,
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
|
-- winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
|
||||||
|
winhighlight = "Normal:CmpDoc,FloatBorder:CmpDocBorder,Search:None",
|
||||||
borderchars = {
|
borderchars = {
|
||||||
"─",
|
"─",
|
||||||
"│",
|
"│",
|
||||||
@@ -138,6 +139,8 @@ return {
|
|||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
|
-- winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
|
||||||
|
winhighlight = "Normal:CmpDoc,FloatBorder:CmpDocBorder,Search:None",
|
||||||
borderchars = {
|
borderchars = {
|
||||||
"─",
|
"─",
|
||||||
"│",
|
"│",
|
||||||
@@ -153,46 +156,14 @@ return {
|
|||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
||||||
-- mode = 'symbol_text',
|
mode = "symbol_text",
|
||||||
fields = { "kind", "abbr", "menu" },
|
fields = { "kind", "abbr", "menu" },
|
||||||
expandable_indicator = true,
|
expandable_indicator = true,
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
local kind = require("lspkind").cmp_format({
|
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
|
||||||
mode = "symbol_text",
|
|
||||||
-- mode = "symbol",
|
|
||||||
maxwidth = 75,
|
|
||||||
symbol_map = {
|
|
||||||
Copilot = " ",
|
|
||||||
Text = " ",
|
|
||||||
Method = " ",
|
|
||||||
Function = " ",
|
|
||||||
Constructor = " ",
|
|
||||||
Field = " ",
|
|
||||||
Variable = " ",
|
|
||||||
Class = " ",
|
|
||||||
Interface = " ",
|
|
||||||
Module = " ",
|
|
||||||
Property = " ",
|
|
||||||
Unit = " ",
|
|
||||||
Value = " ",
|
|
||||||
Enum = " ",
|
|
||||||
Keyword = " ",
|
|
||||||
Snippet = " ",
|
|
||||||
Color = " ",
|
|
||||||
File = " ",
|
|
||||||
Reference = " ",
|
|
||||||
Folder = " ",
|
|
||||||
EnumMember = " ",
|
|
||||||
Constant = " ",
|
|
||||||
Struct = " ",
|
|
||||||
Event = " ",
|
|
||||||
Operator = " ",
|
|
||||||
TypeParameter = " ",
|
|
||||||
},
|
|
||||||
})(entry, vim_item)
|
|
||||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||||
kind.kind = " " .. strings[1] .. " "
|
kind.kind = " " .. (strings[1] or "") .. " "
|
||||||
kind.menu = " (" .. strings[2] .. ")"
|
kind.menu = " (" .. (strings[2] or "") .. ")"
|
||||||
|
|
||||||
return kind
|
return kind
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user