Table mode, RPN calc, Python LSP and key bindings
Options and plugins: - enabled spell checker with languages de and en - RPN calculator added to cmp - Added python to lsps - fzf workspaces now always sorted by name Key bindings: - table mode added, use <leader>t and submap - File manager moved to <leader>T - Spell suggestion z= uses fzf - LSP code actions <space>ca moved to <space>c and fzf
This commit is contained in:
@@ -17,6 +17,7 @@ require('mason-lspconfig').setup({
|
||||
'yamlls',
|
||||
'tsserver',
|
||||
'gopls',
|
||||
'pylsp',
|
||||
-- 'volar',
|
||||
},
|
||||
})
|
||||
@@ -25,9 +26,9 @@ require('mason-lspconfig').setup({
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
@@ -49,7 +50,7 @@ local on_attach = function(client, bufnr)
|
||||
end, bufopts)
|
||||
-- vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
-- vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set("n", "<space>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, bufopts)
|
||||
@@ -60,6 +61,7 @@ local on_attach = function(client, bufnr)
|
||||
vim.keymap.set('n', '<space>d', fzf.diagnostics_document , { desc = "Doc diagnostics" })
|
||||
vim.keymap.set('n', '<space>D', fzf.diagnostics_workspace, { desc = "Workspace diagnostics" })
|
||||
vim.keymap.set('n', '<space>s', fzf.lsp_document_symbols, { desc = "Doc symbols" })
|
||||
vim.keymap.set('n', '<space>c', fzf.lsp_code_actions, { desc = "Code Actions" })
|
||||
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<C-[>', fzf.lsp_references, { desc = "Find References" })
|
||||
vim.keymap.set('n', '<C-]>', fzf.lsp_definitions, { desc = "Find References" })
|
||||
|
||||
Reference in New Issue
Block a user