feat: add more mappings
This commit is contained in:
parent
71d5792e45
commit
3a53db9eb0
20
init.lua
20
init.lua
|
@ -722,7 +722,6 @@ require('lazy').setup({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
{ name = 'tsserver' },
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
@ -854,3 +853,22 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
--
|
||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
-- Set current wordl
|
||||||
|
map({ 'n' }, '<leader>cw', ':%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>', { desc = '[C]ut [W]orld' })
|
||||||
|
|
||||||
|
-- Close buffer
|
||||||
|
map({ 'n' }, '<leader>x', '<cmd>bd<CR>', { desc = 'Close buffer' })
|
||||||
|
|
||||||
|
-- misc mappings
|
||||||
|
map('n', 'n', 'nzzzv')
|
||||||
|
map('n', 'N', 'Nzzzv')
|
||||||
|
|
||||||
|
-- Create new vertical buffer
|
||||||
|
map({ 'n' }, '<leader>wb', '<cmd>vs<CR>', { desc = 'New [W]orkspace [B]uffer' })
|
||||||
|
|
||||||
|
-- Resize buffer (width)
|
||||||
|
map({ 'n' }, '<C-m>', '<cmd>vertical res -5^M<CR>', { desc = 'Buffer - width' })
|
||||||
|
map({ 'n' }, '<C-n>', '<cmd>vertical res +5^M<CR>', { desc = 'Buffer + width' })
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map({ 'n' }, '<leader>cw', ':%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>', { desc = '[C]ut [W]orld' })
|
|
||||||
map({ 'n' }, '<leader>x', '<cmd>bd<CR>', { desc = 'Close buffer' })
|
|
||||||
map('n', 'n', 'nzzzv')
|
|
||||||
map('n', 'N', 'Nzzzv')
|
|
|
@ -17,9 +17,11 @@ return {
|
||||||
-- Installs the debug adapters for you
|
-- Installs the debug adapters for you
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
-- 'microsoft/vscode-js-debug',
|
||||||
|
|
||||||
-- Add your own debuggers here
|
-- Add your own debuggers here
|
||||||
'leoluz/nvim-dap-go',
|
'leoluz/nvim-dap-go',
|
||||||
|
-- 'mxsdev/nvim-dap-vscode-js',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
|
@ -83,5 +85,6 @@ return {
|
||||||
|
|
||||||
-- Install golang specific config
|
-- Install golang specific config
|
||||||
require('dap-go').setup()
|
require('dap-go').setup()
|
||||||
|
-- require('nvim-dap-vscode-js').setup()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue