aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMichael Green <micke.green@gmail.com>2021-03-22 23:44:28 +0100
committerMichael Green <micke.green@gmail.com>2021-03-22 23:44:28 +0100
commit74e840afd0b159071f85a1f7ebc69d23a367611d (patch)
tree7d12ecb9c6833d92428268456fd1ba9f9368f624 /lua
parent[docgen] Update CONFIG.md (diff)
downloadnvim-lspconfig-74e840afd0b159071f85a1f7ebc69d23a367611d.tar
nvim-lspconfig-74e840afd0b159071f85a1f7ebc69d23a367611d.tar.gz
nvim-lspconfig-74e840afd0b159071f85a1f7ebc69d23a367611d.tar.bz2
nvim-lspconfig-74e840afd0b159071f85a1f7ebc69d23a367611d.tar.lz
nvim-lspconfig-74e840afd0b159071f85a1f7ebc69d23a367611d.tar.xz
nvim-lspconfig-74e840afd0b159071f85a1f7ebc69d23a367611d.tar.zst
nvim-lspconfig-74e840afd0b159071f85a1f7ebc69d23a367611d.zip
Added the dot language server to the mix
- Following recommendations and removing default conf - Following existing language servers with default root_dir
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/dotls.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/lua/lspconfig/dotls.lua b/lua/lspconfig/dotls.lua
new file mode 100644
index 00000000..0aa198e4
--- /dev/null
+++ b/lua/lspconfig/dotls.lua
@@ -0,0 +1,32 @@
+local configs = require 'lspconfig/configs'
+local util = require 'lspconfig/util'
+
+local server_name = "dotls"
+local bin_name = "dot-language-server"
+
+local root_files = {
+ '.git',
+}
+
+configs[server_name] = {
+ default_config = {
+ cmd = {bin_name, "--stdio"};
+ filetypes = {"dot"};
+ root_dir = function(filename)
+ return util.root_pattern(unpack(root_files))(filename) or
+ util.path.dirname(filename)
+ end;
+ };
+ docs = {
+ description = [[
+https://github.com/nikeee/dot-language-server
+
+`dot-language-server` can be installed via `npm`:
+```sh
+npm install -g dot-language-server
+```
+ ]];
+ };
+};
+
+-- vim:et ts=2 sw=2