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
There are two models for incremental code analysis:
run a file watcher, and check the project again if files changed.
perform (syntax/type) check files on demand, and reuse results if the analysis's inputs are not changed.
rust-analyzer currently uses the former model, and they are switching language queries to the latter one as much as possible, because we usually don't have to check all modules in a project to execute some specific language query.
tinymist currently uses the latter model, but we also see the benefit if tinymist also supports former one. If so, we can run code analysis only when the user saves files.
Examples/Questions
This will allow configuration "tinymist.codeAnalysisWhen" to specify how lazy the language server checks the code:
When user edits the file to query code completion at 1, 2, or 3, tinymist must query the cached result of type checking and get the corresponding types of symbol. Currently, we use the typst::syntax::Span to encode the reference (name), but it will be soonly buggy if we only run type check on save, as the typst::syntax::Span doesn't resist changes of AST nodes at the same depth.
The text was updated successfully, but these errors were encountered:
There are two models for incremental code analysis:
rust-analyzer currently uses the former model, and they are switching language queries to the latter one as much as possible, because we usually don't have to check all modules in a project to execute some specific language query.
tinymist currently uses the latter model, but we also see the benefit if tinymist also supports former one. If so, we can run code analysis only when the user saves files.
Examples/Questions
This will allow configuration
"tinymist.codeAnalysisWhen"
to specify how lazy the language server checks the code:Question: we are missing a way to encode reference (name) of definition stably across editions.
When user edits the file to query code completion at
1
,2
, or3
, tinymist must query the cached result of type checking and get the corresponding types of symbol. Currently, we use thetypst::syntax::Span
to encode the reference (name), but it will be soonly buggy if we only run type check on save, as thetypst::syntax::Span
doesn't resist changes of AST nodes at the same depth.The text was updated successfully, but these errors were encountered: