]> git.r.bdr.sh - rbdr/dotfiles/blobdiff - config/nvim/lua/lsp.lua
Merge branch 'main' of git.sr.ht:~rbdr/dotfiles
[rbdr/dotfiles] / config / nvim / lua / lsp.lua
index eb8b98f86b8339069380bf426c49181a4ada16f6..8f7edbdcdb49f8226b6cf131fe12a83e5ec34fbe 100644 (file)
@@ -1,25 +1,20 @@
 local lspconfig = require('lspconfig')
 local lspconfig = require('lspconfig')
+local coq = require('coq')
 local capabilities = vim.lsp.protocol.make_client_capabilities()
 capabilities.textDocument.completion.completionItem.snippetSupport = true
 
 local capabilities = vim.lsp.protocol.make_client_capabilities()
 capabilities.textDocument.completion.completionItem.snippetSupport = true
 
-lspconfig.tsserver.setup {}
-lspconfig.eslint.setup{}
-lspconfig.svelte.setup{}
-lspconfig.pyright.setup {}
-lspconfig.dartls.setup{}
-lspconfig.rust_analyzer.setup {
+lspconfig.tsserver.setup(coq.lsp_ensure_capabilities({}))
+lspconfig.eslint.setup(coq.lsp_ensure_capabilities({}))
+lspconfig.svelte.setup(coq.lsp_ensure_capabilities({}))
+lspconfig.pyright.setup(coq.lsp_ensure_capabilities({}))
+lspconfig.dartls.setup(coq.lsp_ensure_capabilities({}))
+lspconfig.rust_analyzer.setup(coq.lsp_ensure_capabilities({
   -- Server-specific settings. See `:help lspconfig-setup`
   settings = {
     ['rust-analyzer'] = {},
   },
   -- Server-specific settings. See `:help lspconfig-setup`
   settings = {
     ['rust-analyzer'] = {},
   },
-}
-lspconfig.cssls.setup {
-  capabilities = capabilities,
-}
-lspconfig.html.setup {
-  capabilities = capabilities,
-}
-lspconfig.lua_ls.setup{}
+}))
+lspconfig.lua_ls.setup(coq.lsp_ensure_capabilities({}))
 
 -- Global mappings.
 -- See `:help vim.diagnostic.*` for documentation on any of the below functions
 
 -- Global mappings.
 -- See `:help vim.diagnostic.*` for documentation on any of the below functions