From 454f688e8086e5d4c9248916b78b19cb82b411ee Mon Sep 17 00:00:00 2001 From: Andy Teijelo Date: Mon, 7 Nov 2022 09:16:43 -0500 Subject: [PATCH] Add vala plugin; several keymaps --- lua/user/keymaps.lua | 29 ++++++++++++++++++++++++----- lua/user/lsp/handlers.lua | 1 + lua/user/plugins.lua | 2 ++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index 564eb51..7d0b457 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -98,9 +98,28 @@ keymap("n", "", "lua require'dap'.terminate()", opts) -- Shift+F5 --keymap("n", "", "VimspectorRestart", opts) -- Ctrl+Shift+F5 --keymap("n", "di", "VimspectorBalloonEval", opts) --- move.vim -vim.keymap.set('n', '', 'MoveLine(1)', opts) -vim.keymap.set('n', '', 'MoveLine(-1)', opts) -vim.keymap.set('v', '', 'MoveBlock(1)', opts) -vim.keymap.set('v', '', 'MoveBlock(-1)', opts) +-- move.nvim +vim.keymap.set('n', '', ':MoveLine(1)', opts) +vim.keymap.set('n', '', ':MoveLine(-1)', opts) +vim.keymap.set('x', '', ':MoveBlock(1)', opts) +vim.keymap.set('x', '', ':MoveBlock(-1)', opts) +-- disable arrow keys +keymap("n", "", "", opts) +keymap("n", "", "", opts) +keymap("n", "", "", opts) +keymap("n", "", "", opts) +keymap("i", "", "", opts) +keymap("i", "", "", opts) +keymap("i", "", "", opts) +keymap("i", "", "", opts) + +-- move through wrapped lines +keymap("n", "j", "gj") +keymap("n", "k", "gk") + +-- use Alt + ijkl to move in insert mode +keymap("i", "", "", opts) +keymap("i", "", "", opts) +keymap("i", "", "gj", opts) +keymap("i", "", "gk", opts) diff --git a/lua/user/lsp/handlers.lua b/lua/user/lsp/handlers.lua index b9fcf89..66ebb31 100644 --- a/lua/user/lsp/handlers.lua +++ b/lua/user/lsp/handlers.lua @@ -68,6 +68,7 @@ local function lsp_keymaps(bufnr) keymap(bufnr, "n", "li", "LspInfo", opts) keymap(bufnr, "n", "lI", "LspInstallInfo", opts) keymap(bufnr, "n", "la", "lua vim.lsp.buf.code_action()", opts) + keymap(bufnr, "n", "", "lua vim.lsp.buf.code_action()", opts) keymap(bufnr, "n", "lj", "lua vim.diagnostic.goto_next({buffer=0})", opts) keymap(bufnr, "n", "lk", "lua vim.diagnostic.goto_prev({buffer=0})", opts) keymap(bufnr, "n", "lr", "lua vim.lsp.buf.rename()", opts) diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index 2357ca7..839d309 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -116,6 +116,8 @@ return packer.startup(function(use) use { "j-hui/fidget.nvim", commit = "2cf9997d3bde2323a1a0934826ec553423005a26" } use { "mg979/vim-visual-multi" } + use { 'vala-lang/vala.vim' } + -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins if PACKER_BOOTSTRAP then