diff options
| author | Michael Green <micke.green@gmail.com> | 2021-03-22 23:44:28 +0100 |
|---|---|---|
| committer | Michael Green <micke.green@gmail.com> | 2021-03-22 23:44:28 +0100 |
| commit | 74e840afd0b159071f85a1f7ebc69d23a367611d (patch) | |
| tree | 7d12ecb9c6833d92428268456fd1ba9f9368f624 /lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-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.lua | 32 |
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 |
