usability improvements

- add autocmds to highlight yanking and disabling line numbers in Oil
- lsp-zero: fix 'gd' command by setting 'preserve_mappings' to false
- lualine: show clock, simplify statusline, shorten mode name
- oil: decrease float window size, add 'q' hotkey to close window
- prefs: show line numbers again, disable additional mode showing
- add todo-comments.nvim
- remap: add keymap to find all TODOs/FIXME/XXX etc.
This commit is contained in:
Oliver Ladner 2024-03-05 21:32:07 +01:00
commit 480a5c2fff
10 changed files with 96 additions and 21 deletions

18
lua/weeheavy/autocmd.lua Normal file
View file

@ -0,0 +1,18 @@
-- Highlight yanked text on e.g. yy,yap etc.
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup("weeheavy-highlight-yank", { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
-- Disable (relative) line numbers on Oil windows
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("weeheavy-no-line-numbers-in-oil", { clear = true }),
pattern = { "oil" },
callback = function()
vim.opt.relativenumber = false
vim.opt.number = false
end,
})