summaryrefslogtreecommitdiff
path: root/fnl/config/lsp/keymaps.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config/lsp/keymaps.fnl')
-rw-r--r--fnl/config/lsp/keymaps.fnl38
1 files changed, 19 insertions, 19 deletions
diff --git a/fnl/config/lsp/keymaps.fnl b/fnl/config/lsp/keymaps.fnl
index 56a84a3..c60dfa9 100644
--- a/fnl/config/lsp/keymaps.fnl
+++ b/fnl/config/lsp/keymaps.fnl
@@ -1,22 +1,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)))
+(defn on-attach [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)))