From 77389ca5ceb92e5a6859983e1763e8c9157b5658 Mon Sep 17 00:00:00 2001 From: 🐈 <88maomao@gmail.com> Date: Mon, 22 Feb 2021 19:51:32 +0200 Subject: Add configuration for Erlang Language Server --- lua/lspconfig/erlangls.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/lspconfig/erlangls.lua (limited to 'lua') diff --git a/lua/lspconfig/erlangls.lua b/lua/lspconfig/erlangls.lua new file mode 100644 index 00000000..0bc1a859 --- /dev/null +++ b/lua/lspconfig/erlangls.lua @@ -0,0 +1,23 @@ +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. +]]; + default_config = { + root_dir = [[root_pattern('rebar.config', 'erlang.mk', '.git') or util.path.dirname(fname)]] + } + }; +} -- cgit v1.2.3-70-g09d2