We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Tree-sitter can use incremental parsing to speedup the re-parsing of files, see https://tree-sitter.github.io/tree-sitter/using-parsers#editing.
Currently modelica-language-server always parses the whole file on every change:
modelica-language-server/server/src/analyzer.ts
Line 73 in a52ced7
To incrementally parse a file the language server needs to track changes from the client. So all changed locations need to be added to the tree:
// first parsing const sourceCode = 'let x = 1; console.log(x);'; const tree = parser.parse(sourceCode); // Replace 'let' with 'const' const newSourceCode = 'const x = 1; console.log(x);'; tree.edit({ startIndex: 0, oldEndIndex: 3, newEndIndex: 5, startPosition: {row: 0, column: 0}, oldEndPosition: {row: 0, column: 3}, newEndPosition: {row: 0, column: 5}, }); const newTree = parser.parse(newSourceCode, tree);
(from https://github.com/tree-sitter/tree-sitter/blob/master/lib/binding_web/README.md#editing)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Tree-sitter can use incremental parsing to speedup the re-parsing of files, see https://tree-sitter.github.io/tree-sitter/using-parsers#editing.
Currently modelica-language-server always parses the whole file on every change:
modelica-language-server/server/src/analyzer.ts
Line 73 in a52ced7
To incrementally parse a file the language server needs to track changes from the client. So all changed locations need to be added to the tree:
(from https://github.com/tree-sitter/tree-sitter/blob/master/lib/binding_web/README.md#editing)
The text was updated successfully, but these errors were encountered: