mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 14:52:04 +00:00
Update keybinds
This commit is contained in:
@@ -7,7 +7,6 @@ end
|
||||
|
||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
M.capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
-- M.capabilities = cmp_nvim_lsp.update_capabilities(M.capabilities)
|
||||
M.capabilities = cmp_nvim_lsp.default_capabilities(M.capabilities)
|
||||
|
||||
M.setup = function()
|
||||
@@ -55,32 +54,16 @@ end
|
||||
local function lsp_keymaps(bufnr)
|
||||
local opts = { noremap = true, silent = true }
|
||||
local keymap = vim.api.nvim_buf_set_keymap
|
||||
keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||
keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||
keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||
keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||
keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
|
||||
keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", opts)
|
||||
keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<cr>", opts)
|
||||
keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", opts)
|
||||
keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<cr>", opts)
|
||||
keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<cr>", opts)
|
||||
keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<cr>", opts)
|
||||
vim.cmd([[command! Format execute "lua vim.lsp.buf.format()"]])
|
||||
keymap(bufnr, "n", "<leader>li", "<cmd>LspInfo<cr>", opts)
|
||||
keymap(bufnr, "n", "<leader>lI", "<cmd>LspInstallInfo<cr>", opts)
|
||||
keymap(bufnr, "n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts)
|
||||
keymap(bufnr, "n", "<leader>lj", "<cmd>lua vim.diagnostic.goto_next({buffer=0})<cr>", opts)
|
||||
keymap(bufnr, "n", "<leader>lk", "<cmd>lua vim.diagnostic.goto_prev({buffer=0})<cr>", opts)
|
||||
keymap(bufnr, "n", "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<cr>", opts)
|
||||
keymap(bufnr, "n", "<leader>ls", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
keymap(bufnr, "n", "<leader>lq", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts)
|
||||
end
|
||||
|
||||
M.on_attach = function(client, bufnr)
|
||||
-- if client.name == "tsserver" then
|
||||
-- client.resolved_capabilities.document_formatting = false
|
||||
-- end
|
||||
--
|
||||
-- if client.name == "sumneko_lua" then
|
||||
-- client.resolved_capabilities.document_formatting = false
|
||||
-- end
|
||||
|
||||
lsp_keymaps(bufnr)
|
||||
local status_ok, illuminate = pcall(require, "illuminate")
|
||||
if not status_ok then
|
||||
@@ -106,17 +89,17 @@ M.on_attach = function(client, bufnr)
|
||||
"alpha",
|
||||
"NvimTree",
|
||||
},
|
||||
-- filetypes_allowlist: filetypes to illuminate, this is overriden by filetypes_denylist
|
||||
-- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
|
||||
filetypes_allowlist = {},
|
||||
-- modes_denylist: modes to not illuminate, this overrides modes_allowlist
|
||||
modes_denylist = {},
|
||||
-- modes_allowlist: modes to illuminate, this is overriden by modes_denylist
|
||||
-- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
|
||||
modes_allowlist = {},
|
||||
-- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
|
||||
-- Only applies to the 'regex' provider
|
||||
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
|
||||
providers_regex_syntax_denylist = {},
|
||||
-- providers_regex_syntax_allowlist: syntax to illuminate, this is overriden by providers_regex_syntax_denylist
|
||||
-- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist
|
||||
-- Only applies to the 'regex' provider
|
||||
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
|
||||
providers_regex_syntax_allowlist = {},
|
||||
|
||||
Reference in New Issue
Block a user