Skip to content

fixed syntax issue with semi-colon#8

Open
ctuni wants to merge 1 commit into
mainfrom
dev
Open

fixed syntax issue with semi-colon#8
ctuni wants to merge 1 commit into
mainfrom
dev

Conversation

@ctuni
Copy link
Copy Markdown
Owner

@ctuni ctuni commented May 8, 2026

There were a couple of issues as described by @davidmasp in his comment here.

The formatter issue could not be fixed: when users save a .nf file, Zed asks the Nextflow language server to format it. The LSP refuses and returns the error "Script could not be formatted because it has syntax errors." This comes from the language server's own internal parser, which is separate from the tree-sitter grammar.

The fix was to document in the README the workarround to skip this step as documented by @davidmasp.

The other issue, the double imports one, was fixed by adding the ";" in the include rule in the grammar:

// before
  commaSep1($.include_item)  // only handles:  include { A, B }

// after
  seq($.include_item, repeat(seq(choice(',', ';'), $.include_item)))
// now handles:  include { A; B }  AND  include { A, B }

Now double imports, semi-colon separated, look like they should!

image

@davidmasp
Copy link
Copy Markdown

Thanks a lot for this fix @ctuni ! Let me know if you want me to test it in my system again, i think if it worked in your machine it should work in mine too.

@davidmasp
Copy link
Copy Markdown

ok i tried and doesn't seem to be working for me but I am not sure I am re-building the extension correctly.

image

@davidmasp
Copy link
Copy Markdown

I rebuild the wasm exetension from the dev branch and from Zed Extensions UI, I uninstall the extension and go to Install Dev Extension and click on the folder. It doesn't let me select the actual wasm file, idk if that's what I have to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants