summaryrefslogtreecommitdiff
path: root/fnl/config/lsp/keymaps.fnl
blob: 56a84a334d20952ade5ee701881300e9571618d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
;; Key mappings for lsp.
(module config.lsp.keymaps {autoload {nvim aniseed.nvim}})

(defn keymaps [bufnr] (let [opts {:noremap true :silent true}]
                        (nvim.buf_set_keymap bufnr :n :gD
                                             "<cmd>lua vim.lsp.buf.declaration()<CR>"
                                             opts)
                        (nvim.buf_set_keymap bufnr :n :gd
                                             "<cmd>lua vim.lsp.buf.definition()<CR>"
                                             opts)
                        (nvim.buf_set_keymap bufnr :n :gI
                                             "<cmd>lua vim.lsp.buf.implementation()<CR>"
                                             opts)
                        (nvim.buf_set_keymap bufnr :n :gr
                                             "<cmd>lua vim.lsp.buf.references()<CR>"
                                             opts)
                        (nvim.buf_set_keymap bufnr :n :gl
                                             "<cmd>lua vim.diagnostic.open_float()<CR>"
                                             opts)
                        (nvim.buf_set_keymap bufnr :n :gs
                                             "<cmd>lua vim.lsp.buf.signature_help()<CR>"
                                             opts)))