feat: improve keymaps

This commit is contained in:
itsscb 2025-04-02 09:36:09 +02:00
parent a2c2022d7d
commit d0d2757e2f

View File

@ -1,8 +1,8 @@
-- Custom Keymaps
vim.keymap.set('i', 'jk', '<Esc>', { noremap = true, silent = true })
vim.keymap.set('v', 'jk', '<Esc>', { noremap = true, silent = true })
vim.keymap.set({ 'i', 'v' }, 'jk', '<Esc>', { noremap = true, silent = true })
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
--[[
@ -296,7 +296,7 @@ require('lazy').setup({
-- Then, because we use the `opts` key (recommended), the configuration runs
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
{ -- Useful plugin to show you pending keybinds.
{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
opts = {
@ -342,7 +342,7 @@ require('lazy').setup({
-- Document existing key chains
spec = {
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' },
@ -382,7 +382,7 @@ require('lazy').setup({
{ 'nvim-telescope/telescope-ui-select.nvim' },
-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
@ -490,7 +490,7 @@ require('lazy').setup({
'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP.
{ 'j-hui/fidget.nvim', opts = {} },
{ 'j-hui/fidget.nvim', opts = {} },
-- Allows extra capabilities provided by nvim-cmp
'hrsh7th/cmp-nvim-lsp',
@ -683,9 +683,9 @@ require('lazy').setup({
['rust-analyzer'] = {
diagnostics = {
enable = false,
}
}
}
},
},
},
},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--