aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-03-01 11:57:59 -0800
committerGitHub <noreply@github.com>2021-03-01 11:57:59 -0800
commit14ad7f6445d7993cc9a5c3fe62326f928fdb55e3 (patch)
tree68b38516fd7451ee6c81be5b29f570dfe61070b5 /lua
parent[docgen] Update CONFIG.md (diff)
parentAdd installation instructions for erlangls (diff)
downloadnvim-lspconfig-14ad7f6445d7993cc9a5c3fe62326f928fdb55e3.tar
nvim-lspconfig-14ad7f6445d7993cc9a5c3fe62326f928fdb55e3.tar.gz
nvim-lspconfig-14ad7f6445d7993cc9a5c3fe62326f928fdb55e3.tar.bz2
nvim-lspconfig-14ad7f6445d7993cc9a5c3fe62326f928fdb55e3.tar.lz
nvim-lspconfig-14ad7f6445d7993cc9a5c3fe62326f928fdb55e3.tar.xz
nvim-lspconfig-14ad7f6445d7993cc9a5c3fe62326f928fdb55e3.tar.zst
nvim-lspconfig-14ad7f6445d7993cc9a5c3fe62326f928fdb55e3.zip
Merge pull request #751 from 88maomao/erlang-ls
Add configuration for Erlang Language Server
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/erlangls.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/lua/lspconfig/erlangls.lua b/lua/lspconfig/erlangls.lua
new file mode 100644
index 00000000..8e7a6e8b
--- /dev/null
+++ b/lua/lspconfig/erlangls.lua
@@ -0,0 +1,32 @@
+local configs = require 'lspconfig/configs'
+local util = require 'lspconfig/util'
+
+
+configs.erlangls = {
+ default_config = {
+ cmd = { "erlang_ls" };
+ filetypes = { "erlang" };
+ root_dir = function(fname)
+ return util.root_pattern("rebar.config", "erlang.mk", ".git")(fname) or util.path.dirname(fname)
+ end;
+ };
+ docs = {
+ description = [[
+https://erlang-ls.github.io
+
+Language Server for Erlang.
+
+Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls)
+Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin`
+
+Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls).
+
+Installation requirements:
+ - [Erlang OTP 21+](https://github.com/erlang/otp)
+ - [rebar3 3.9.1+](https://github.com/erlang/rebar3)
+]];
+ default_config = {
+ root_dir = [[root_pattern('rebar.config', 'erlang.mk', '.git') or util.path.dirname(fname)]]
+ }
+ };
+}