diff --git a/dot_config/nvim/lua/mappings.lua b/dot_config/nvim/lua/mappings.lua index 1345016..f30bb45 100644 --- a/dot_config/nvim/lua/mappings.lua +++ b/dot_config/nvim/lua/mappings.lua @@ -3,6 +3,55 @@ local set_keymap = require('common').set_keymap -- reload vimrc set_keymap('n', 'sv', 'Reload') +-- basic +set_keymap('n', 'q', 'q!') +set_keymap('n', 'x', 'x') +-- moving +set_keymap('n', '', 'I') +set_keymap('n', 'j', 'gj') +set_keymap('n', 'k', 'gk') +-- editing +set_keymap('n', 'Y', 'y$') +set_keymap('n', '', 'm .-2') +set_keymap('n', '', 'm .+1') +set_keymap('i', '', 'ddi') +-- splits +set_keymap('n', 's', 'v') +set_keymap('n', 'j', 'j') +set_keymap('n', 'k', 'k') +set_keymap('n', 'h', 'h') +set_keymap('n', 'l', 'l') +-- tabs +set_keymap('n', '', 'gT') +set_keymap('n', '', 'gt') +set_keymap('n', 't[', 'tabmove -1') +set_keymap('n', 't]', 'tabmove +1') +set_keymap('n', '1', '1gt') +set_keymap('n', '2', '2gt') +set_keymap('n', '3', '3gt') +set_keymap('n', '4', '4gt') +set_keymap('n', '5', '5gt') +set_keymap('n', '6', '6gt') +set_keymap('n', '7', '7gt') +set_keymap('n', '8', '8gt') +set_keymap('n', '9', '9gt') +set_keymap('n', '0', 'tablast') +-- LSP +set_keymap('n', 'ld', 'lua vim.lsp.buf.definition()') +set_keymap('n', 'lD', 'lua vim.lsp.buf.declaration()') +set_keymap('n', 'lt', 'lua vim.lsp.buf.type_definition()') +set_keymap('n', 'li', 'lua vim.lsp.buf.implementation()') +set_keymap('n', 'K', 'lua vim.lsp.buf.hover()') +set_keymap('n', 'U', 'lua vim.lsp.buf.signature_help()') +set_keymap('n', 'lr', 'lua vim.lsp.buf.references()') +set_keymap('n', 'ls', 'lua vim.lsp.buf.document_symbol()') +set_keymap('n', 'lS', 'lua vim.lsp.buf.workspace_symbol()') +set_keymap('n', 'lR', 'lua vim.lsp.buf.rename()') +set_keymap('n', 'lf', 'lua vim.lsp.buf.formatting()') +-- plug manager +set_keymap('n', 'pi', 'PaqInstall') +set_keymap('n', 'pu', 'PaqUpdate') +set_keymap('n', 'pc', 'PaqClean') -- hop set_keymap('n', 'hw', 'HopWord') set_keymap('n', 'hl', 'HopLine') diff --git a/dot_config/nvim/lua/options.lua b/dot_config/nvim/lua/options.lua index e24092d..8792693 100644 --- a/dot_config/nvim/lua/options.lua +++ b/dot_config/nvim/lua/options.lua @@ -22,8 +22,8 @@ opt.shiftwidth = 2 -- window opt.number = true -- editing -vim.g.mapleader = ',' -vim.g.maplocalleader = ',' +vim.g.mapleader = ' ' --space +vim.g.maplocalleader = ' ' opt.whichwrap = 'b,s,<,>,[,]' opt.backspace = {'indent', 'eol', 'start'} opt.list = true diff --git a/dot_config/nvim/lua/plugins/telescope.lua b/dot_config/nvim/lua/plugins/telescope.lua index 6a9d5c5..08f0567 100644 --- a/dot_config/nvim/lua/plugins/telescope.lua +++ b/dot_config/nvim/lua/plugins/telescope.lua @@ -3,6 +3,7 @@ require('telescope').load_extension('heading') local set_keymap = require('../common').set_keymap set_keymap('n', 'ff', 'Telescope find_files') +set_keymap('n', 'p', 'Telescope find_files') -- alternative cuz im used to it from vscode set_keymap('n', 'fd', 'Telescope git_files') set_keymap('n', 'fg', 'Telescope live_grep') set_keymap('n', 'fb', 'Telescope buffers')