nvim cmp priorities

This commit is contained in:
Martin Pander
2025-07-16 09:25:13 +02:00
parent 6a651c6a3d
commit 70c37da9ef
5 changed files with 141 additions and 97 deletions

View File

@ -7,7 +7,6 @@ vim.g.loaded_netrwPlugin = 1
vim.opt.mouse = 'a'
vim.opt.history = 1000
vim.opt.ruler = true
vim.opt.ruler = true
vim.opt.number = true
vim.opt.showcmd = true
vim.opt.ttimeoutlen = 100
@ -84,11 +83,11 @@ vim.api.nvim_create_autocmd({'FocusGained', 'BufEnter', 'CursorMoved', 'CursorMo
command = 'silent! checktime'
})
vim.api.nvim_create_autocmd('BufEnter', {
group = 'VimIntern',
pattern = '*',
command = 'silent! lcd %:p:h'
})
-- vim.api.nvim_create_autocmd('BufEnter', {
-- group = 'VimIntern',
-- pattern = '*',
-- command = 'silent! lcd %:p:h'
-- })
-- Open nvim-tree when starting Neovim in a specific directory or any of its subdirectories
vim.api.nvim_create_autocmd("VimEnter", {
@ -133,6 +132,15 @@ vim.api.nvim_create_user_command('TrimWhiteSpace', function()
vim.cmd('%s/\\s\\+$//e')
end, {})
local function ToggleDiagnostics()
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
if vim.diagnostic.is_enabled() then
print("Diagnostics enabled")
else
print("Diagnostics disabled")
end
end
---------------------------
------- DIAGNOSTICS -------