From 3ae9e5089e3d5e9e1371b836afe3a514cd16bc9f Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 7 Nov 2024 06:25:35 -0500 Subject: feat: add the official Nextflow Language Server nextflow_ls (#3423) * feat: add nextflow_ls --- lua/lspconfig/configs/nextflow_ls.lua | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 lua/lspconfig/configs/nextflow_ls.lua (limited to 'lua') diff --git a/lua/lspconfig/configs/nextflow_ls.lua b/lua/lspconfig/configs/nextflow_ls.lua new file mode 100644 index 00000000..20315d69 --- /dev/null +++ b/lua/lspconfig/configs/nextflow_ls.lua @@ -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' }, + }, + }, + }, +} +``` +]], + }, +} -- cgit v1.2.3-70-g09d2