diff options
| author | seth <[email protected]> | 2023-04-02 21:14:36 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-04-02 21:14:36 -0400 |
| commit | 8a8be409c0f0d911eb19969c05e7f4a171a63767 (patch) | |
| tree | 3dcdd90daed9ef83527093396d185a7bfda9dbd5 /.config/nvim/lua/getchoo/keymap.lua | |
| parent | d421be1222d6744c0d738e5fbf96ee6daafd61b2 (diff) | |
copy refactor from flake for neovim config
Diffstat (limited to '.config/nvim/lua/getchoo/keymap.lua')
| -rw-r--r-- | .config/nvim/lua/getchoo/keymap.lua | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/.config/nvim/lua/getchoo/keymap.lua b/.config/nvim/lua/getchoo/keymap.lua index 9a4484c..44a05aa 100644 --- a/.config/nvim/lua/getchoo/keymap.lua +++ b/.config/nvim/lua/getchoo/keymap.lua @@ -1,7 +1,9 @@ -- --- keymaps for general plugins +-- keymaps -- +vim.g.mapleader = "," + local opts = { noremap = true, silent = true } local set = function(mode, key, cmd) vim.keymap.set(mode, key, cmd, opts) @@ -12,16 +14,28 @@ set("n", "<leader>t", function() end) for i = 1, 9 do - set("n", "<leader>" .. i, function() - local cmd = "BufferGoto " .. i - vim.cmd(cmd) - end) + set("n", "<leader>" .. i, function() + local vimcmd = "BufferLineGoToBuffer " .. i + vim.cmd(vimcmd) + end) end -set("n", "<leader>p", function() - vim.cmd("BufferPick") -end) - set("n", "<leader>q", function() - vim.cmd("BufferClose") + vim.cmd("BufferLinePickClose") end) + +if vim.g.use_lsp_plugins then + -- lsp + set("n", "<space>e", vim.diagnostic.open_float) + set("n", "[d", vim.diagnostic.goto_prev) + set("n", "]d", vim.diagnostic.goto_next) + set("n", "<space>q", vim.diagnostic.setloclist) + + set("n", "<space>f", function() + vim.cmd("Telescope") + end) + + set("n", "<space>t", function() + vim.cmd("TroubleToggle") + end) +end |
