Easier controls with nvim
This commit is contained in:
parent
f5c758741e
commit
897c3a7057
@ -95,6 +95,7 @@ vim.diagnostic.config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Show diagnostics on hover
|
-- Show diagnostics on hover
|
||||||
vim.api.nvim_create_autocmd({'CursorHold'}, {
|
vim.api.nvim_create_autocmd({'CursorHold'}, {
|
||||||
pattern = {'*'},
|
pattern = {'*'},
|
||||||
@ -104,12 +105,20 @@ vim.api.nvim_create_autocmd({'CursorHold'}, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Shortcuts for mapping shortcuts
|
-- Shortcuts for mapping shortcuts
|
||||||
local map = function(type, key, value)
|
local map = function(type, key, value)
|
||||||
vim.api.nvim_buf_set_keymap(0, type, key, value, { noremap = true, silent = true });
|
vim.api.nvim_buf_set_keymap(0, type, key, value, { noremap = true, silent = true });
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('i', '<Tab>', function()
|
||||||
|
if vim.fn.pumvisible() == 1 then
|
||||||
|
return '<C-n>'
|
||||||
|
else
|
||||||
|
return '<Tab>'
|
||||||
|
end
|
||||||
|
end, { silent = true, expr = true })
|
||||||
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user