From 0ae469e9515f549e7af3eeeb9c2f8fc9bef783e7 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 7 Jan 2024 17:12:31 +0900 Subject: feat(keymaps): add lsp keybinds --- fnl/nvrc/keymaps.fnl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'fnl') 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] : "") (setv! mapleader " ") (setv! maplocalleader ",") @@ -68,6 +70,18 @@ (map! [v] : ":m '>+1gv=gv") (map! [v] : ":m '<-2gv=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] :k (vim.lsp.buf.hover)) (map! [n] :l (vim.diagnostic.open_float nil {:focus false})) (map! [n] :b ((. (require :dap) :toggle_breakpoint))) -- cgit 1.4.1