aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authortakuto <pysan3@gmail.com>2022-10-02 09:25:43 +0900
committerGitHub <noreply@github.com>2022-10-02 08:25:43 +0800
commit4186d34bf4334c55b227074ce010aad08297ce2e (patch)
treed0068316a3993ae1cf161c42fb48ee70df549230 /lua
parentdocs: `vim.lsp.buf.formatting()` is deprecated (#2166) (diff)
downloadnvim-lspconfig-4186d34bf4334c55b227074ce010aad08297ce2e.tar
nvim-lspconfig-4186d34bf4334c55b227074ce010aad08297ce2e.tar.gz
nvim-lspconfig-4186d34bf4334c55b227074ce010aad08297ce2e.tar.bz2
nvim-lspconfig-4186d34bf4334c55b227074ce010aad08297ce2e.tar.lz
nvim-lspconfig-4186d34bf4334c55b227074ce010aad08297ce2e.tar.xz
nvim-lspconfig-4186d34bf4334c55b227074ce010aad08297ce2e.tar.zst
nvim-lspconfig-4186d34bf4334c55b227074ce010aad08297ce2e.zip
feat: add erg-language-server support (#2165)
* feat: add erg-language-server support * fix(erg-language-server): update root directory pattern * fix(erg-language-server): fixed typo in description
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]],
+ },
+ },
+}