Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning & error suppression for LSP #95

Merged
merged 2 commits into from
May 27, 2024
Merged

Conversation

CabalCrow
Copy link
Contributor

This adds several warning & error suppressions for the tsserver lsp. Doesn't actually change any functionality (if you tree-sitter generate you will see that nothing would get changed).

  • add type docs to functions
  • supress tsserver errors (they are not actual errors, tsserver just can't properly diagnose the grammar.js)
  • add _ to unused arguments

@fdncred
Copy link
Collaborator

fdncred commented May 27, 2024

I don't have a problem with this PR but what is tsserver?

@CabalCrow
Copy link
Contributor Author

It is an lsp (language server protocol) for typescript. I was looking for an LSP to use with grammar.js. I asked in the Matrix channel for tree-sitter what LSP is commonly used to edit that file & was told typescript is the answer. If you check the grammar.js of other tree-sitter projects you will probably also find comments related to tsserver.

@fdncred
Copy link
Collaborator

fdncred commented May 27, 2024

ok, that makes sense that you'd use the typescript lsp for grammar.js. seem benign enough.

@fdncred fdncred merged commit 552a4a4 into nushell:main May 27, 2024
3 checks passed
@CabalCrow CabalCrow deleted the cleanup branch May 27, 2024 14:46
mrdgo pushed a commit to mrdgo/tree-sitter-nu that referenced this pull request Sep 23, 2024
This adds several warning & error suppressions for the tsserver lsp.
Doesn't actually change any functionality (if you tree-sitter generate
you will see that nothing would get changed).

- add type docs to functions
- supress tsserver errors (they are not actual errors, tsserver just
can't properly diagnose the grammar.js)
- add _ to unused arguments
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