aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/configs/nextflow_ls.lua
blob: 20315d693828bb822ce2dc48948b5129304c7f82 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
local util = require 'lspconfig.util'

return {
  default_config = {
    cmd = { 'java', '-jar', 'nextflow-language-server-all.jar' },
    filetypes = { 'nextflow' },
    root_dir = util.root_pattern('nextflow.config', '.git'),
    settings = {
      nextflow = {
        files = {
          exclude = { '.git', '.nf-test', 'work' },
        },
      },
    },
  },
  docs = {
    description = [[
https://github.com/nextflow-io/language-server

Requirements:
 - Java 17+

`nextflow_ls` can be installed by following the instructions [here](https://github.com/nextflow-io/language-server#development).

If you have installed nextflow language server, you can set the `cmd` custom path as follow:

```lua
require'lspconfig'.nextflow_ls.setup{
    cmd = { 'java', '-jar', 'nextflow-language-server-all.jar' },
    filetypes = { 'nextflow' },
    root_dir = util.root_pattern('nextflow.config', '.git'),
    settings = {
      nextflow = {
        files = {
          exclude = { '.git', '.nf-test', 'work' },
        },
      },
    },
}
```
]],
  },
}