Commit Graph

22 Commits

Author SHA1 Message Date
Akash Yadav b40d52e6cf fix(editor/treesitter): add checks to handle analyze workers destroyed state 2023-12-29 10:43:45 +05:30
Akash Yadav cd55f9d662 fix(editor): Dispatchers.IO thread pool is exhausted if files are continuously opened and closed (fixes #1551) 2023-12-18 00:11:26 +05:30
Akash Yadav 433201bd4d fix(editor/treesitter): avoid unnecessary transition from Java to JNI 2023-11-22 11:29:23 +05:30
Akash Yadav cdc9ddb265 fix(editor/treesitter): occasional crash in TsBracketPairs
This is caused by the incorrect order of conditions when checking whether the languageSpec.bracketsQuery can be accessed.
2023-11-18 13:26:31 +05:30
Akash Yadav ed24faaae3 fix(editor/treesiter): inline TSQueryCursor.safeExecQueryCursor API 2023-11-16 18:40:25 +05:30
Akash Yadav 35b7185ce1 fix: replace usage of sparse arrays with AndroidX Collections 2023-11-05 23:51:31 +05:30
Akash Yadav 6ba102b609 fix(editor/treesitter): TsAnalyzeWorker fails if initial content of editor is empty 2023-10-27 22:10:10 +05:30
Akash Yadav dd8dca9a7c fix: add TracingEditorRenderer to analyze editor's drawing performance 2023-10-27 22:10:08 +05:30
Akash Yadav 42bbe6a39c fix(editor/treesitter): IOOB exception in TsAnalyzeWorker when deleting text 2023-10-27 22:10:07 +05:30
Akash Yadav 31285710f5 fix(editor/treesitter): parse syntax tree in same coroutine 2023-10-27 22:10:05 +05:30
Akash Yadav d3c11397af fix(editor/treesitter): reduce delay for cancelling previous parse 2023-10-27 22:10:04 +05:30
Akash Yadav 42ae28a0b9 refactor: rename 'TSAnalyzeManager' to 'TsAnalyzeManager' for consistency 2023-10-23 21:38:51 +05:30
Akash Yadav 6d8cbf7a42 fix(editor/treesitter): local variables are not highlighted properly 2023-10-23 21:36:54 +05:30
Akash Yadav 7923243b3b fix(editor/treesitter): reimplement TsAnalyzeManager for better thread safety and error handling 2023-10-23 21:27:30 +05:30
Akash Yadav 29ca7bc64f fix(actions): id of ActionItem is not logged correctly after execution 2023-10-18 12:22:32 +05:30
Akash Yadav 33e6a4b7ad fix: do not unnecessarily initialize TsScopedVariables to avoid querying the whole tree 2023-10-16 22:17:51 +05:30
Akash Yadav 0a5a5400a5 fix: occasional crash in TsLooperThread when text is edited too frequently 2023-10-16 22:15:47 +05:30
Akash Yadav 3ecf4d7259 fix: TsBracketPairs uses recycled TSNode instances 2023-10-15 23:54:53 +05:30
Akash Yadav 088bdce6c6 fix: properly implement TSTree edition and query execution 2023-10-15 23:47:20 +05:30
Akash Yadav f2cfd865e8 fix: opened files are not highlighted with tree sitter
This happens because the tree-sitter nodes and trees are inaccessible when the files are opened
2023-10-15 18:38:43 +05:30
Akash Yadav d5910c6fc0 fix(editor): various improvements related to tree sitter code analysis
- Integrate the 'language-treesitter' module from sora-editor into the IDE itself for better control and customization of the tree sitter analysis.

- Invalidate line span generator when tree is edited - This is required because TSTree instances are not thread-safe and the spans generator tries to query the tree after it is edited.
 This results in SEGV_MAPERR errors in native code because the TSNodes are invalidatd after TSTree.edit() calls and the cursor tries to query those invalidated nodes.

- Recycle and reuse TS* instances - When analyzing the source code using Tree Sitter, a huge number of objects are created and deleted. This results in an increased of times the garbage
 collector is invoked.
2023-10-15 17:55:11 +05:30
Akash Yadav 971fc605ff fix: include language-treesitter from sora-editor locally 2023-10-13 23:03:57 +05:30