aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/erg_language_server.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/erg_language_server.lua b/lua/lspconfig/server_configurations/erg_language_server.lua
new file mode 100644
index 00000000..7f2daf70
--- /dev/null
+++ b/lua/lspconfig/server_configurations/erg_language_server.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'els' },
+ filetypes = { 'erg' },
+ root_dir = function(fname)
+ return util.root_pattern 'package.er'(fname) or util.find_git_ancestor(fname)
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/erg-lang/erg-language-server
+
+ELS (erg-language-server) is a language server for the Erg programming language.
+
+`els` can be installed via `cargo`:
+ ```sh
+ cargo install els
+ ```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("package.er") or find_git_ancestor]],
+ },
+ },
+}