Skip to content

Commit

Permalink
feat: add the official Nextflow Language Server nextflow_ls (#3423)
Browse files Browse the repository at this point in the history
* feat: add nextflow_ls
  • Loading branch information
mehalter authored Nov 7, 2024
1 parent 5230260 commit 3ae9e50
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions lua/lspconfig/configs/nextflow_ls.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,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' },
},
},
},
}
```
]],
},
}

0 comments on commit 3ae9e50

Please sign in to comment.