summaryrefslogtreecommitdiff
path: root/fnl/config/lsp/handlers.fnl
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2022-04-10 23:34:21 +0200
committeraktersnurra <grydholm@kth.se>2022-04-10 23:34:21 +0200
commitbe910efb9e059a962cffc030dec7ea1ea3771e7c (patch)
treece6733d6167b7d3ee3852530437b21656bbee81f /fnl/config/lsp/handlers.fnl
parenta8ef65821f7fd7e2cdae39579e4a7dfabd75e58a (diff)
fix(lsp): remove do add opts return
Diffstat (limited to 'fnl/config/lsp/handlers.fnl')
-rw-r--r--fnl/config/lsp/handlers.fnl27
1 files changed, 14 insertions, 13 deletions
diff --git a/fnl/config/lsp/handlers.fnl b/fnl/config/lsp/handlers.fnl
index 6c3566e..950f3fb 100644
--- a/fnl/config/lsp/handlers.fnl
+++ b/fnl/config/lsp/handlers.fnl
@@ -29,22 +29,21 @@
:prefix ""}})
(defn setup []
- (do
- (apply-signs)
- (vim.diagnostic.config config)
- (set vim.lsp.handlers.textDocument/hover (vim.lsp.with { :border "rounded"} ))
- (set vim.lsp.handlers.textDocument/signatureHelp (vim.lsp.with vim.lsp.handlers.signature_help { :border "rounded"} ))))
+ (apply-signs)
+ (vim.diagnostic.config config)
+ (set vim.lsp.handlers.textDocument/hover (vim.lsp.with { :border "rounded"} ))
+ (set vim.lsp.handlers.textDocument/signatureHelp
+ (vim.lsp.with vim.lsp.handlers.signature_help { :border "rounded"} )))
(defn- lsp-keymaps [bufnr]
(let [opts { :noremap true :silent true }]
- (do
- (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 :K "<cmd>lua vim.lsp.buf.hover()<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 :<leader>q "<cmd>lua vim.diagnostic.setloclist()<CR>" opts))))
+ (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 :K "<cmd>lua vim.lsp.buf.hover()<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 :<leader>q "<cmd>lua vim.diagnostic.setloclist()<CR>" opts)))
(defn on-attach [client bufnr]
(if (= client.name :html)
@@ -57,3 +56,5 @@
(let [cmp-nvim-lsp (util.load-plugin :cmp_nvim_lsp)]
(cmp-nvim-lsp.update_capabilities capabilities))
capabilities))
+
+(setup)