From be910efb9e059a962cffc030dec7ea1ea3771e7c Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Sun, 10 Apr 2022 23:34:21 +0200 Subject: fix(lsp): remove do add opts return --- fnl/config/lsp/handlers.fnl | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'fnl/config/lsp/handlers.fnl') 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 "lua vim.lsp.buf.declaration()" opts) - (nvim.buf_set_keymap bufnr :n :gd "lua vim.lsp.buf.definition()" opts) - (nvim.buf_set_keymap bufnr :n :K "lua vim.lsp.buf.hover()" opts) - (nvim.buf_set_keymap bufnr :n :gI "lua vim.lsp.buf.implementation()" opts) - (nvim.buf_set_keymap bufnr :n :gr "lua vim.lsp.buf.references()" opts) - (nvim.buf_set_keymap bufnr :n :gl "lua vim.diagnostic.open_float()" opts) - (nvim.buf_set_keymap bufnr :n :q "lua vim.diagnostic.setloclist()" opts)))) + (nvim.buf_set_keymap bufnr :n :gD "lua vim.lsp.buf.declaration()" opts) + (nvim.buf_set_keymap bufnr :n :gd "lua vim.lsp.buf.definition()" opts) + (nvim.buf_set_keymap bufnr :n :K "lua vim.lsp.buf.hover()" opts) + (nvim.buf_set_keymap bufnr :n :gI "lua vim.lsp.buf.implementation()" opts) + (nvim.buf_set_keymap bufnr :n :gr "lua vim.lsp.buf.references()" opts) + (nvim.buf_set_keymap bufnr :n :gl "lua vim.diagnostic.open_float()" opts) + (nvim.buf_set_keymap bufnr :n :q "lua vim.diagnostic.setloclist()" 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) -- cgit v1.2.3-70-g09d2