summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-06-25 09:33:20 -0400
committerFreya Murphy <freya@freyacat.org>2025-06-25 09:33:20 -0400
commit9ff634af115e5b6b81fedb42d184f0f85798b00a (patch)
treef10f79078281c9bf2345e2dc98d08258763ef070 /home
parentfix nvim signcolumn poping in/out & warning color not yellow (diff)
downloaddotfiles-nix-9ff634af115e5b6b81fedb42d184f0f85798b00a.tar.gz
dotfiles-nix-9ff634af115e5b6b81fedb42d184f0f85798b00a.tar.bz2
dotfiles-nix-9ff634af115e5b6b81fedb42d184f0f85798b00a.zip
add borders and perty colors to cmp
Diffstat (limited to 'home')
-rw-r--r--home/neovim/default.nix1
-rw-r--r--home/neovim/init.lua20
2 files changed, 18 insertions, 3 deletions
diff --git a/home/neovim/default.nix b/home/neovim/default.nix
index cf29f4a..66d2625 100644
--- a/home/neovim/default.nix
+++ b/home/neovim/default.nix
@@ -59,6 +59,7 @@ in {
vim-illuminate
vim-table-mode
nvim-highlight-colors
+ colorful-menu-nvim
# Todo comments
todo-comments-nvim
# Lsp server
diff --git a/home/neovim/init.lua b/home/neovim/init.lua
index 411f198..ca18752 100644
--- a/home/neovim/init.lua
+++ b/home/neovim/init.lua
@@ -51,7 +51,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
desc = 'LSP actions',
callback = function(event)
local opts = {buffer = event.buf}
- bind(config.keys.lsp.hover, function() vim.lsp.buf.hover() end, opts)
+ bind(config.keys.lsp.hover, function() vim.lsp.buf.hover({border = "single", max_height = 25, max_width = 120}) end, opts)
bind(config.keys.lsp.action, function() vim.lsp.buf.code_action() end, opts)
bind(config.keys.lsp.references, function() vim.lsp.buf.references() end, opts)
bind(config.keys.lsp.rename, function() vim.lsp.buf.rename() end, opts)
@@ -93,7 +93,7 @@ if config.theme.transparent then
-- Line Numbers
"LineNr", "EndOfBuffer", "SignColumn",
-- Floating
- "FloatBorder",
+ "FloatBorder", "PMenu",
-- Mode/Buffer Lines
"TabLine", "TabLineFill", "StatusLine",
}
@@ -270,7 +270,21 @@ cmp.setup {
},
mapping = cmp_mappings,
formatting = {
- format = require("nvim-highlight-colors").format
+ format = function(entry, vim_item)
+ local css_colors = require("nvim-highlight-colors").format
+ local lsp_colors = require("colorful-menu").cmp_highlights(entry)
+
+ if lsp_colors ~= nil then
+ vim_item.abbr_hl_group = lsp_colors.highlights
+ vim_item.abbr = lsp_colors.text
+ end
+
+ return css_colors(entry, vim_item)
+ end
+ },
+ window = {
+ completion = cmp.config.window.bordered(),
+ documentation = cmp.config.window.bordered(),
},
}