Merge work
This commit is contained in:
@ -7,7 +7,6 @@ vim.g.loaded_netrwPlugin = 1
|
|||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
vim.opt.history = 1000
|
vim.opt.history = 1000
|
||||||
vim.opt.ruler = true
|
vim.opt.ruler = true
|
||||||
vim.opt.ruler = true
|
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.showcmd = true
|
vim.opt.showcmd = true
|
||||||
vim.opt.ttimeoutlen = 100
|
vim.opt.ttimeoutlen = 100
|
||||||
@ -84,11 +83,11 @@ vim.api.nvim_create_autocmd({'FocusGained', 'BufEnter', 'CursorMoved', 'CursorMo
|
|||||||
command = 'silent! checktime'
|
command = 'silent! checktime'
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('BufEnter', {
|
-- vim.api.nvim_create_autocmd('BufEnter', {
|
||||||
group = 'VimIntern',
|
-- group = 'VimIntern',
|
||||||
pattern = '*',
|
-- pattern = '*',
|
||||||
command = 'silent! lcd %:p:h'
|
-- command = 'silent! lcd %:p:h'
|
||||||
})
|
-- })
|
||||||
|
|
||||||
-- Open nvim-tree when starting Neovim in a specific directory or any of its subdirectories
|
-- Open nvim-tree when starting Neovim in a specific directory or any of its subdirectories
|
||||||
vim.api.nvim_create_autocmd("VimEnter", {
|
vim.api.nvim_create_autocmd("VimEnter", {
|
||||||
@ -133,6 +132,15 @@ vim.api.nvim_create_user_command('TrimWhiteSpace', function()
|
|||||||
vim.cmd('%s/\\s\\+$//e')
|
vim.cmd('%s/\\s\\+$//e')
|
||||||
end, {})
|
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 -------
|
------- DIAGNOSTICS -------
|
||||||
|
|||||||
@ -60,6 +60,7 @@ vim.keymap.set('n', '<leader>cws', vim.lsp.buf.workspace_symbol, { desc = 'LSP W
|
|||||||
vim.keymap.set('n', '<leader>ch', vim.lsp.buf.hover, { desc = 'LSP Hover' })
|
vim.keymap.set('n', '<leader>ch', vim.lsp.buf.hover, { desc = 'LSP Hover' })
|
||||||
vim.keymap.set('n', '<leader>cH', vim.lsp.buf.signature_help, { desc = 'LSP Signature Help' })
|
vim.keymap.set('n', '<leader>cH', vim.lsp.buf.signature_help, { desc = 'LSP Signature Help' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, { desc = 'LSP Code Action' })
|
vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, { desc = 'LSP Code Action' })
|
||||||
|
vim.keymap.set('n', '<leader>cde', ToggleDiagnostics, { desc = 'Toggle Diagnostics' })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -44,14 +44,14 @@ cmp.setup({
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp', priority = 1000 },
|
||||||
{ name = 'vsnip' },
|
{ name = 'buffer', priority = 800, keyword_length = 2 },
|
||||||
{ name = 'path' },
|
{ name = 'copilot', priority = 700 },
|
||||||
{ name = 'cmp_yanky' },
|
{ name = 'path', priority = 600 },
|
||||||
{ name = 'git' },
|
{ name = 'cmp_yanky', priority = 500 },
|
||||||
{ name = 'copilot' },
|
{ name = 'git', priority = 400 },
|
||||||
-- }, {
|
{ name = 'vsnip', priority = 300 },
|
||||||
{ name = 'buffer', keyword_length = 2 },
|
{ name = 'nvim_lua', priority = 200 },
|
||||||
}),
|
}),
|
||||||
|
|
||||||
formatting = {
|
formatting = {
|
||||||
|
|||||||
Reference in New Issue
Block a user