chore(honme-manager): rework neovim cmp plugin configuration
This commit is contained in:
parent
f2569180aa
commit
ca3b35afc0
3 changed files with 44 additions and 23 deletions
|
@ -66,16 +66,16 @@ vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
|||
vim.cmd('au BufWinLeave *.* mkview')
|
||||
vim.cmd('au BufWinEnter *.* silent! loadview')
|
||||
|
||||
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
-- local signs = { Error = "", Warn = "", Hint = "", Info = "" }
|
||||
-- for type, icon in pairs(signs) do
|
||||
-- local hl = "DiagnosticSign" .. type
|
||||
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
-- end
|
||||
|
||||
-- You will likely want to reduce updatetime which affects CursorHold
|
||||
-- note: this setting is global and should be set only once
|
||||
vim.o.updatetime = 250
|
||||
vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {scope='cursor', header = "", prefix = "", focus=false})]]
|
||||
-- vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {scope='cursor', header = "", prefix = "", focus=false})]]
|
||||
|
||||
-- Autotype
|
||||
vim.cmd('au BufRead,BufNewFile *.nix setlocal tabstop=2 shiftwidth=2 ')
|
||||
|
@ -124,12 +124,13 @@ vim.g.matchparen_insert_timeout = 2
|
|||
|
||||
-- activate virtual lines for diagnistics
|
||||
-- no more plugins needed
|
||||
local x = vim.diagnostic.severity
|
||||
vim.diagnostic.config({
|
||||
virtual_lines = true
|
||||
|
||||
virtual_lines = true,
|
||||
-- Alternatively, customize specific options
|
||||
-- virtual_lines = {
|
||||
-- -- Only show virtual line diagnostics for the current cursor line
|
||||
-- current_line = true,
|
||||
-- },
|
||||
signs = { text = { [x.ERROR] = "", [x.WARN] = "", [x.INFO] = "", [x.HINT] = "" } },
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue