Open chrisgrieser opened 10 months ago
Thanks for the suggestion! It sounds like an LSP client feature to me. Are you using neovim?
yeah, I am.
Nonetheless, I think simply adding a diagnostic stating "config invalid" would already help a lot, and that could be done without any changes on lsp client side?
The issue is that lsp only checks source code not config YAML. It may be worth adding editing support for rule completion/diagnostic in LSP.
When you use ast-grep as LSP, you are not informed when the linting is not performed due to an invalid rule. Took me a while to come up with the idea to try
ast-grep scan
in the terminal, which revealed that an invalid rule was the cause:I'd suggest displaying a diagnostic at line one with the info "invalid rule...", to inform the user why no linting is taking place.