feat: add more mappings

This commit is contained in:
tsorabel-pc 2024-03-06 23:02:01 +01:00 committed by tsorabel
parent f1894507ad
commit 504fc007d3
3 changed files with 22 additions and 7 deletions

View File

@ -734,7 +734,6 @@ require('lazy').setup({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'tsserver' },
},
}
end,
@ -872,3 +871,22 @@ require('lazy').setup({
-- The line beneath this is called `modeline`. See `:help modeline`
-- 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' })

View File

@ -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')

View File

@ -20,9 +20,11 @@ return {
-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
-- 'microsoft/vscode-js-debug',
-- Add your own debuggers here
'leoluz/nvim-dap-go',
-- 'mxsdev/nvim-dap-vscode-js',
},
config = function()
local dap = require 'dap'
@ -86,5 +88,6 @@ return {
-- Install golang specific config
require('dap-go').setup()
-- require('nvim-dap-vscode-js').setup()
end,
}