summaryrefslogtreecommitdiff
path: root/fnl/config/lsp/lspconfig.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config/lsp/lspconfig.fnl')
-rw-r--r--fnl/config/lsp/lspconfig.fnl40
1 files changed, 0 insertions, 40 deletions
diff --git a/fnl/config/lsp/lspconfig.fnl b/fnl/config/lsp/lspconfig.fnl
deleted file mode 100644
index 74faa26..0000000
--- a/fnl/config/lsp/lspconfig.fnl
+++ /dev/null
@@ -1,40 +0,0 @@
-;; Setup of lsps.
-
-(fn on-attach []
- (vim.api.nvim_create_autocmd :LspAttach
- {:callback (fn [args]
- (let [keymaps (require :config.lsp.keymaps)
- bufnr (. args :buf)]
- (keymaps.on-attach bufnr)))}))
-
-(fn capabilities []
- (let [cmp-lsp (require :cmp_nvim_lsp)]
- (cmp-lsp.default_capabilities (vim.lsp.protocol.make_client_capabilities))))
-
-(fn mason-opts [servers]
- {:ensure_installed (vim.tbl_keys servers) :automatic_installation true})
-
-(fn setup []
- (require :config.lsp.diagnostics)
- (let [lspconfig (require :lspconfig)
- mason-lspconfig (require :mason-lspconfig)
- servers (require :config.lsp.servers)]
- (on-attach)
- (mason-lspconfig.setup (mason-opts servers))
- (mason-lspconfig.setup_handlers [(fn [server-name]
- (let [server-config (. lspconfig
- server-name)
- opts (or (. servers server-name)
- {})]
- (tset opts :capabilities
- (capabilities))
- (server-config.setup opts)))])))
-
-{1 :neovim/nvim-lspconfig
- :event :BufReadPre
- :dependencies [:mason.nvim
- :williamboman/mason-lspconfig.nvim
- :b0o/SchemaStore.nvim
- :hrsh7th/cmp-nvim-lsp]
- :config (fn []
- (setup))}