feat: improve keymaps
This commit is contained in:
parent
a2c2022d7d
commit
d0d2757e2f
20
init.lua
20
init.lua
@ -1,8 +1,8 @@
|
|||||||
-- Custom Keymaps
|
-- Custom Keymaps
|
||||||
|
|
||||||
vim.keymap.set('i', 'jk', '<Esc>', { noremap = true, silent = true })
|
vim.keymap.set({ 'i', 'v' }, 'jk', '<Esc>', { noremap = true, silent = true })
|
||||||
vim.keymap.set('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
|
-- Then, because we use the `opts` key (recommended), the configuration runs
|
||||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
-- 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',
|
'folke/which-key.nvim',
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
opts = {
|
opts = {
|
||||||
@ -342,7 +342,7 @@ require('lazy').setup({
|
|||||||
|
|
||||||
-- Document existing key chains
|
-- Document existing key chains
|
||||||
spec = {
|
spec = {
|
||||||
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
||||||
{ '<leader>d', group = '[D]ocument' },
|
{ '<leader>d', group = '[D]ocument' },
|
||||||
{ '<leader>r', group = '[R]ename' },
|
{ '<leader>r', group = '[R]ename' },
|
||||||
{ '<leader>s', group = '[S]earch' },
|
{ '<leader>s', group = '[S]earch' },
|
||||||
@ -382,7 +382,7 @@ require('lazy').setup({
|
|||||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
-- 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()
|
config = function()
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
-- 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',
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
||||||
-- Allows extra capabilities provided by nvim-cmp
|
-- Allows extra capabilities provided by nvim-cmp
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
@ -683,9 +683,9 @@ require('lazy').setup({
|
|||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = false,
|
enable = false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
|
Loading…
x
Reference in New Issue
Block a user