From 74e840afd0b159071f85a1f7ebc69d23a367611d Mon Sep 17 00:00:00 2001 From: Michael Green Date: Mon, 22 Mar 2021 23:44:28 +0100 Subject: Added the dot language server to the mix - Following recommendations and removing default conf - Following existing language servers with default root_dir --- lua/lspconfig/dotls.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lua/lspconfig/dotls.lua (limited to 'lua') 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 -- cgit v1.2.3-70-g09d2