You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked into ancestors, but I think the information is not relevant here. It makes the messages very verbose. As an end user of the language server, the fact that everything is based on ASTs, is an implementation detail.
I’m not saying it should be a default. It isn’t in vfile-reporter either.
But I see if quite different. There are many reasons for errors to be thrown. I think users and the code that emits errors should decide whether the positional info and other info in the AST is an “implementation detail” or not.
One example of diagnostic related information is when you make a TypeScript type error in VSCode.
In this screenshot, main.d.ts(115, 5): The expected type comes from property 'character' which is declared here on type 'Position' is a rendered diagnostic related information. I’m not really sure if diagnostic related information is the correct field for such a trace, but it has crossed my mind. I’m not really sure if it’s even ordered.
I like the traceLimit option from vfile-reporter. We could use that, and default to 0.
wooorm
changed the title
Support node ancesters via a configuration option
Support node ancestors via a configuration option
Sep 24, 2024
Initial checklist
Problem
Originally posted by @wooorm in #57 (review)
Originally posted by @remcohaszing in #57 (comment)
Originally posted by @wooorm in #57 (comment)
Solution
Add option
showAncestors
. If this is true, the ancestry will be added to the LSP diagnostic message.Alternatives
showAncestors
was chosen arbritrarily. The name could be different.DiagnosticRelatedInformation
instead of appending to the message. This makes the trace clickable, but it renders differently.The text was updated successfully, but these errors were encountered: