diff --git a/init.lua b/init.lua index f23748a6..ec610920 100644 --- a/init.lua +++ b/init.lua @@ -671,7 +671,7 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, + clangd = {}, -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 474a4774..da094b58 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -16,12 +16,7 @@ vim.cmd [[ ]] -- Set the blinking cursor settings -vim.api.nvim_create_autocmd('VimEnter', { - callback = function() - vim.notify 'Setting guicursor via VimEnter' - vim.opt.guicursor = 'n-v:block,i:ver25,r-cr-o:hor20,a:blinkwait700-blinkoff400-blinkon250' - end, -}) +vim.opt.guicursor = 'n-v:block,i:ver25,r-cr-o:hor20,a:blinkwait700-blinkoff400-blinkon250' -- Remap for dealing with word wrap in v mode vim.keymap.set('v', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) @@ -45,4 +40,11 @@ map('n', '', '', { noremap = false }) map('n', 's', 'v', { noremap = true }) map('n', 'v', 's', { noremap = true }) +-- Mapping for delete into black hole register in normal mode +-- and replace visual selection with yanked text (unnamed register) without losing it. +-- Example: yiw or yi" to yank some text => xiwP or xiw"P to replace. +-- => visual select and x to replace. +vim.keymap.set('n', 'x', '"_d', { desc = 'Delete to black hole register' }) +vim.keymap.set('v', 'x', '"_dP', { desc = 'Replace selection with yanked text' }) + return {}