diff options
author | sefidel <contact@sefidel.net> | 2024-01-07 17:12:31 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-01-07 19:39:05 +0900 |
commit | 0ae469e9515f549e7af3eeeb9c2f8fc9bef783e7 (patch) | |
tree | afd832094ab861d3b8797e52d4adfc62dd0f90b0 /fnl/nvrc | |
parent | cc00bbdf9ef125d0975b6b741082165a344e032f (diff) | |
download | nvimrc-0ae469e9515f549e7af3eeeb9c2f8fc9bef783e7.tar.gz nvimrc-0ae469e9515f549e7af3eeeb9c2f8fc9bef783e7.zip |
feat(keymaps): add lsp keybinds
Diffstat (limited to 'fnl/nvrc')
-rw-r--r-- | fnl/nvrc/keymaps.fnl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fnl/nvrc/keymaps.fnl b/fnl/nvrc/keymaps.fnl index a1342e8..ebbbe49 100644 --- a/fnl/nvrc/keymaps.fnl +++ b/fnl/nvrc/keymaps.fnl @@ -1,6 +1,8 @@ (import-macros {: map!} :nvrc.macro.keymap) (import-macros {: setv!} :nvrc.macro.set) +;; TODO: move plugin-specific keybinds to packs/ + (map! [nv :silent] :<space> "<Nop>") (setv! mapleader " ") (setv! maplocalleader ",") @@ -68,6 +70,18 @@ (map! [v] :<A-e> ":m '>+1<cr>gv=gv") (map! [v] :<A-r> ":m '<-2<cr>gv=gv") +; LSP +(map! [n] :fl (vim.lsp.buf.declaration)) +(map! [n] :fd (vim.lsp.buf.definition)) +(map! [n] :fm (vim.lsp.buf.format)) +(map! [n] :fa (vim.lsp.buf.code_action)) +(map! [n] :fu (vim.lsp.buf.implementation)) +(map! [n] :fi (vim.lsp.buf.incoming_calls)) +(map! [n] :fo (vim.lsp.buf.outgoing_calls)) +(map! [n] :frl (vim.lsp.buf.references)) +(map! [n] :frc (vim.lsp.buf.clear_references)) +(map! [n] :frr (vim.lsp.buf.rename)) + (map! [n] :<leader>k (vim.lsp.buf.hover)) (map! [n] :<leader>l (vim.diagnostic.open_float nil {:focus false})) (map! [n] :<leader>b ((. (require :dap) :toggle_breakpoint))) |