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:
2024-09-26 10:10:06 +02:00
parent db62337357
commit c80752ebea
4 changed files with 70 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
-- Setup fzf-lua keybindings
-- Setup fzf-lua keybindings and some other searches
local fzf = require('fzf-lua')
vim.keymap.set('n', '<leader>ff', fzf.files, { desc = "Find file" })
vim.keymap.set('n', '<leader>fs', fzf.blines, { desc = "Search buffer" })
@@ -43,3 +43,22 @@ workspaces_fzf_picker = function(opts)
end, opts)
end
vim.keymap.set('n', '<leader>w', workspaces_fzf_picker, { desc = "Workspaces" } )
------------------------------------------
--
-- Word higlighting
--
------------------------------------------
local mywords = require('mywords')
vim.keymap.set('n', '<space>mm', mywords.hl_toggle, { desc = "Highlight current word" })
vim.keymap.set('n', '<space>mr', mywords.hl_toggle_regex, { desc = "Highlight regexp" })
vim.keymap.set('n', '<space>mc', mywords.uhl_all, { desc = "Clear all highlights" })
------------------------------------------
--
-- Shortcuts which are known from Emacs
--
------------------------------------------
vim.keymap.set('n', '<C-W>1', ":wincmd o<CR>", { desc = "Win: close others" })
vim.keymap.set('n', '<C-W>0', ":only<CR>", { desc = "Win: close current" })