aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/server_configurations/erg_language_server.lua
blob: 7f2daf700a4fc178a50bb7011abf78b20e6e235c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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]],
    },
  },
}