add borders around completion popups
This commit is contained in:
parent
b473cc6d15
commit
9248cf468b
|
|
@ -1,16 +1,16 @@
|
||||||
-- Non-plugin autocommands (minimal placeholder for bootstrap)
|
-- Non-plugin autocommands (minimal placeholder for bootstrap)
|
||||||
local aug = vim.api.nvim_create_augroup('UserDefaults', { clear = true })
|
local aug = vim.api.nvim_create_augroup("UserDefaults", { clear = true })
|
||||||
|
|
||||||
-- Phase 10.3: Templates (auto-populate new files from templates)
|
-- Phase 10.3: Templates (auto-populate new files from templates)
|
||||||
local template_aug = vim.api.nvim_create_augroup('Templates', { clear = true })
|
local template_aug = vim.api.nvim_create_augroup("Templates", { clear = true })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufNewFile", {
|
vim.api.nvim_create_autocmd("BufNewFile", {
|
||||||
group = template_aug,
|
group = template_aug,
|
||||||
pattern = "*.sh",
|
pattern = "*.sh",
|
||||||
callback = function()
|
callback = function()
|
||||||
-- Read template at top of file, then move to end
|
-- Read template at top of file, then move to end
|
||||||
vim.cmd('0read ~/.config/nvim/templates/template.sh')
|
vim.cmd("0read ~/.config/nvim/templates/template.sh")
|
||||||
vim.cmd('normal! G')
|
vim.cmd("normal! G")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -83,20 +83,19 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
callback = function()
|
callback = function()
|
||||||
-- Use matchadd() for higher priority highlighting
|
-- Use matchadd() for higher priority highlighting
|
||||||
-- This will override the default qf syntax
|
-- This will override the default qf syntax
|
||||||
vim.fn.matchadd('qfError', '\\<error\\>', 10)
|
vim.fn.matchadd("qfError", "\\<error\\>", 10)
|
||||||
vim.fn.matchadd('qfWarning', '\\<warning\\>', 10)
|
vim.fn.matchadd("qfWarning", "\\<warning\\>", 10)
|
||||||
vim.fn.matchadd('qfInfo', '\\<info\\>', 10)
|
vim.fn.matchadd("qfInfo", "\\<info\\>", 10)
|
||||||
vim.fn.matchadd('qfHint', '\\<hint\\>', 10)
|
vim.fn.matchadd("qfHint", "\\<hint\\>", 10)
|
||||||
vim.fn.matchadd('qfNote', '\\<note\\>', 10)
|
vim.fn.matchadd("qfNote", "\\<note\\>", 10)
|
||||||
|
|
||||||
-- Also match uppercase variants
|
-- Also match uppercase variants
|
||||||
vim.fn.matchadd('qfError', '\\<Error\\>', 10)
|
vim.fn.matchadd("qfError", "\\<Error\\>", 10)
|
||||||
vim.fn.matchadd('qfWarning', '\\<Warning\\>', 10)
|
vim.fn.matchadd("qfWarning", "\\<Warning\\>", 10)
|
||||||
vim.fn.matchadd('qfInfo', '\\<Info\\>', 10)
|
vim.fn.matchadd("qfInfo", "\\<Info\\>", 10)
|
||||||
vim.fn.matchadd('qfHint', '\\<Hint\\>', 10)
|
vim.fn.matchadd("qfHint", "\\<Hint\\>", 10)
|
||||||
vim.fn.matchadd('qfNote', '\\<Note\\>', 10)
|
vim.fn.matchadd("qfNote", "\\<Note\\>", 10)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,13 @@ return {
|
||||||
{ name = "buffer", group_index = 2 },
|
{ name = "buffer", group_index = 2 },
|
||||||
}),
|
}),
|
||||||
completion = { completeopt = "menu,menuone,noinsert" }, -- Auto-select first item
|
completion = { completeopt = "menu,menuone,noinsert" }, -- Auto-select first item
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(),
|
||||||
|
documentation = cmp.config.window.bordered(),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("cmp").setup(opts)
|
require("cmp").setup(opts)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,34 +11,37 @@ vim.opt.secure = true -- Prompt before loading untrusted files
|
||||||
|
|
||||||
-- Phase 3.2: non-plugin settings (legacy values where specified)
|
-- Phase 3.2: non-plugin settings (legacy values where specified)
|
||||||
-- Completion UI for nvim-cmp
|
-- Completion UI for nvim-cmp
|
||||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
|
|
||||||
-- Spelling
|
-- Spelling
|
||||||
vim.opt.spelllang = { 'en_gb' }
|
vim.opt.spelllang = { "en_gb" }
|
||||||
|
|
||||||
-- Keyword characters (add $ for PHP/shell variables, - for CSS/HTML/config files)
|
-- Keyword characters (add $ for PHP/shell variables, - for CSS/HTML/config files)
|
||||||
vim.opt.iskeyword:append('$')
|
vim.opt.iskeyword:append("$")
|
||||||
vim.opt.iskeyword:append('-')
|
vim.opt.iskeyword:append("-")
|
||||||
|
|
||||||
-- Visuals
|
-- Visuals
|
||||||
vim.opt.showbreak = ' ↳'
|
vim.opt.showbreak = " ↳"
|
||||||
vim.opt.listchars = {
|
vim.opt.listchars = {
|
||||||
eol = '¬',
|
eol = "¬",
|
||||||
tab = '│ ',
|
tab = "│ ",
|
||||||
trail = '~',
|
trail = "~",
|
||||||
extends = '>',
|
extends = ">",
|
||||||
precedes = '<',
|
precedes = "<",
|
||||||
space = '·',
|
space = "·",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Enable line numbers and relative line numbers
|
-- Enable line numbers and relative line numbers
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Scrolloff settings
|
||||||
|
vim.opt.scrolloff = 4
|
||||||
|
|
||||||
-- Phase 6.2: UX settings
|
-- Phase 6.2: UX settings
|
||||||
vim.opt.signcolumn = 'yes' -- Always show sign column (for LSP diagnostics, git signs, etc.)
|
vim.opt.signcolumn = "yes" -- Always show sign column (for LSP diagnostics, git signs, etc.)
|
||||||
vim.opt.cursorline = true -- Highlight current line
|
vim.opt.cursorline = true -- Highlight current line
|
||||||
vim.opt.colorcolumn = '80,120' -- Visual guides at 80 and 120 characters
|
vim.opt.colorcolumn = "80,120" -- Visual guides at 80 and 120 characters
|
||||||
|
|
||||||
-- Phase 9.4: Default indentation (per-filetype overrides in after/ftplugin/)
|
-- Phase 9.4: Default indentation (per-filetype overrides in after/ftplugin/)
|
||||||
vim.opt.tabstop = 4 -- Display tabs as 4 spaces
|
vim.opt.tabstop = 4 -- Display tabs as 4 spaces
|
||||||
|
|
@ -50,7 +53,7 @@ vim.opt.expandtab = true -- Use spaces by default (overridden per-filet
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
spacing = 4,
|
spacing = 4,
|
||||||
prefix = '●',
|
prefix = "●",
|
||||||
-- Show severity (ERROR, WARN, INFO, HINT)
|
-- Show severity (ERROR, WARN, INFO, HINT)
|
||||||
format = function(diagnostic)
|
format = function(diagnostic)
|
||||||
return string.format("%s: %s", diagnostic.source or "", diagnostic.message)
|
return string.format("%s: %s", diagnostic.source or "", diagnostic.message)
|
||||||
|
|
@ -61,9 +64,9 @@ vim.diagnostic.config({
|
||||||
update_in_insert = false, -- Don't update diagnostics while typing
|
update_in_insert = false, -- Don't update diagnostics while typing
|
||||||
severity_sort = true, -- Sort by severity (errors first)
|
severity_sort = true, -- Sort by severity (errors first)
|
||||||
float = {
|
float = {
|
||||||
border = 'rounded',
|
border = "rounded",
|
||||||
source = 'always', -- Show diagnostic source
|
source = "always", -- Show diagnostic source
|
||||||
header = '',
|
header = "",
|
||||||
prefix = '',
|
prefix = "",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue