Word highlighting, lsp_signature, calendar and settings / keybindings
Plugins: - added word highlighting plugin mywords - added lsp_signature plugin to show parameter signature while typing a function call - added calendar.vim - added lush.nvim needed for some theme definitions, though not for the nice and current default lunaperche Keybindings: - <space>m[mrc] for mywords - <C-W>0 and <C-W>1 for window close / make single - <C-,> for lsp references - <C-.> for lsp definitions Options: - highlight last search term - add I to shortmess to start with an empty file instead of splash screen - fzf uses default-title as theme - fzf registered as vim.ui.select implementation - which_key shows global definitions, too
This commit is contained in:
11
lua/lsp.lua
11
lua/lsp.lua
@@ -25,8 +25,9 @@ require('mason-lspconfig').setup({
|
||||
-- Customized on_attach function
|
||||
-- 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', '<space>e', vim.diagnostic.open_float, { noremap = true, silent = true, desc = "Popup diagnostics" })
|
||||
-- 2024-09-23 - currently unused
|
||||
-- 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)
|
||||
|
||||
@@ -58,13 +59,13 @@ local on_attach = function(client, bufnr)
|
||||
-- 2024-09-09 - some ccflow commands
|
||||
|
||||
local fzf = require('fzf-lua')
|
||||
vim.keymap.set('n', '<space>d', fzf.diagnostics_document, { desc = "Doc diagnostics" })
|
||||
vim.keymap.set('n', '<space>d', fzf.diagnostics_document, { desc = "Document 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" })
|
||||
vim.keymap.set('n', '<C-,>', fzf.lsp_references, { desc = "Find References" })
|
||||
vim.keymap.set('n', '<C-.>', fzf.lsp_definitions, { desc = "Find References" })
|
||||
end
|
||||
|
||||
-- Set different settings for different languages' LSP
|
||||
|
||||
Reference in New Issue
Block a user