diff options
author | Adam <56338480+adastx@users.noreply.github.com> | 2021-10-05 21:12:16 +0200 |
---|---|---|
committer | Adam <56338480+adastx@users.noreply.github.com> | 2021-10-05 21:12:16 +0200 |
commit | 59e7ee298127e69c8472bb6a0930c5a105f5d12e (patch) | |
tree | 76b3984f127cae61306a3bc87715417fb679a906 /.config/nvim/lua/binds.lua | |
parent | cf353a03de1fd6e0536663c8a0be9608cc59e985 (diff) |
Neovim setup ported to lua + new plugins, picom edit so focused terminal is opaque
Diffstat (limited to '.config/nvim/lua/binds.lua')
-rw-r--r-- | .config/nvim/lua/binds.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.config/nvim/lua/binds.lua b/.config/nvim/lua/binds.lua new file mode 100644 index 0000000..5782f68 --- /dev/null +++ b/.config/nvim/lua/binds.lua @@ -0,0 +1,27 @@ +vim.g.mapleader = ' ' +vim.b.mapleader = ' ' + +local map = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +map('', 'Y', 'y$', opts) +map('n', '<C-L>', ':nohl<CR><C-L>', opts) +map('n', 'n', 'nzzzv', opts) +map('n', 'N', 'Nzzzv', opts) + +map('i', 'kj', '<Esc>', opts) +map('i', ',', ',<c-g>u', opts) +map('i', '.', '.<c-g>u', opts) +map('i', '[', '[<c-g>u', opts) +map('i', '!', '!<c-g>u', opts) +map('i', '?', '?<c-g>u', opts) + +map('n', '<leader>fu', '<cmd>Telescope lsp_references<cr>', opts) +map('n', '<leader>gd', '<cmd>Telescope lsp_definitions<cr>', opts) +map('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<cr>', opts) +map('n', '<leader>xd', '<cmd>Telescope lsp_document_diagnostics<cr>', opts) +map('n', '<leader>xD', '<cmd>Telescope lsp_workspace_diagnostics<cr>', opts) +map('n', '<leader>xn', '<cmd>lua vim.lsp.diagnostic.goto_next()<cr>', opts) +map('n', '<leader>xN', '<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>', opts) +map('n', '<leader>xx', '<cmd>Telescope lsp_code_actions<cr>', opts) +map('n', '<leader>xX', '<cmd>Telescope lsp_range_code_actions<cr>', opts) |