summaryrefslogtreecommitdiff
path: root/.config/nvim/ftplugin/html.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 20:17:26 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 20:17:26 +0200
commit88616bde7c7b5b25f505997aa2171245f7341453 (patch)
tree7232fff70899952e2f91cb8b5d39c496840105db /.config/nvim/ftplugin/html.lua
parent8c0ace95e67f76b900cacd8daa38faa1444cb3b9 (diff)
Updates to lang stuff
Diffstat (limited to '.config/nvim/ftplugin/html.lua')
-rw-r--r--.config/nvim/ftplugin/html.lua27
1 files changed, 15 insertions, 12 deletions
diff --git a/.config/nvim/ftplugin/html.lua b/.config/nvim/ftplugin/html.lua
index 312301b..d673a26 100644
--- a/.config/nvim/ftplugin/html.lua
+++ b/.config/nvim/ftplugin/html.lua
@@ -1,14 +1,17 @@
--- npm install -g vscode-html-languageserver-bin
-local capabilities = vim.lsp.protocol.make_client_capabilities()
-capabilities.textDocument.completion.completionItem.snippetSupport = true
+if not require("cfg.utils").check_lsp_client_active "html" then
+ -- npm install -g vscode-html-languageserver-bin
+ local capabilities = vim.lsp.protocol.make_client_capabilities()
+ capabilities.textDocument.completion.completionItem.snippetSupport = true
+
+ require("lspconfig").html.setup {
+ cmd = {
+ "node",
+ DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js",
+ "--stdio",
+ },
+ on_attach = require("cfg.lsp").common_on_attach,
+ capabilities = capabilities,
+ }
+end
-require("lspconfig").html.setup {
- cmd = {
- "node",
- DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js",
- "--stdio",
- },
- on_attach = require("lsp").common_on_attach,
- capabilities = capabilities,
-}
vim.cmd "setl ts=2 sw=2"