Commit Graph

16 Commits

Author SHA1 Message Date
Peter Slattery b56bd7caa8 Move code index updating to happen to modified buffers on the tick hook. This will unify the separate paths for updating the code index. 2025-07-16 11:24:23 -07:00
Peter Slattery 94991304b5 Temporarily move all tree-sitter operations to be synchronous 2025-07-16 11:21:41 -07:00
Peter Slattery 3f9b803c62 Move tree-sitter code index updating to an async process to unblock the ui while processing large files 2025-07-14 11:22:39 -07:00
Peter Slattery ae7440aa0b custom_render_buffer only requests the token array if it's being used for a feature the user actually requested since requesting the tokens needs to take the lock on the token array. 2025-07-14 11:22:08 -07:00
Peter Slattery 9ecf49d278 Add typescript support and document how to add a language 2025-07-13 14:37:25 -07:00
Peter Slattery a5f13529c3 Set a per-language flag for enabling virtual indentation 2025-07-13 14:02:32 -07:00
Peter Slattery 5ed8767819 Buffering code index updates when there are many modified buffers within a single frame 2025-07-13 13:46:55 -07:00
Peter Slattery 18428ec90d Pull tree_sitter_code_index_update_single_buffer out as it's own routine, and use it in tree_sitter_parse_asyn__inner to avoid setting the buffer_modified flag 2025-07-13 13:27:21 -07:00
Peter Slattery 5ccd6dd2ab Implemented tree_sitter_code_index_update_tick - populates Code_Index_Nests and Code_Index_Notes from each languages Tags query
Switched tree_sitter_list_all_query_results to list Code_Index_Note's matching a Code_Index_Note_Kind in each file
- remove old query types NESTS, FUNCTIONS, TYPES
2025-07-13 11:19:29 -07:00
Peter Slattery 336a98f701 Switched to using the default highlight and tags queries for cpp, jai, bash. 2025-07-13 08:44:45 -07:00
Peter Slattery c5a462993d Pull language registration into individual per-language files 2025-07-12 12:21:31 -07:00
Peter Slattery 324a78ae1e Implemented function and type queries.
Implemented tree_sitter_list_all_* commands
2025-07-11 17:18:11 -07:00
Peter Slattery 086ac34c4d Jai syntax highlighting 2025-07-10 12:10:17 -07:00
Peter Slattery 79695eca2c tree sitter logic handles edits to a parsed buffer
- async_task_cancel_nowait implementation
2025-07-10 09:14:35 -07:00
Peter Slattery 43fb4a757a Implement Tree_Sitter_Language_Definition, handle registering languages by extension, and looking up the appropriate language definition for a buffer.
custom_begin_buffer uses new functions to identify which files to treat as code
implement custom_render_buffer which uses tree sitter data to color tokens
2025-07-10 08:53:54 -07:00
Peter Slattery 7caaed736b Initial tree sitter usage:
- identify buffer language
- custom_begin_buffer sets up necessary tree sitter state, and kicks off a parse task
- custom_end_buffer cleans up tree sitter data and kills async parse tasks
- tree_sitter_parse_async/__inner uses tree sitter api to get a tree of the buffer's code and stores it on the buffers managed scope
- tree_sitter_write_tree prints tree to a special *tree* buffer
- use new build scripts in 4coder project
2025-07-10 07:08:27 -07:00