Peter Slattery
12322796c2
Incrementally re-parse notes and scope delimiters within the range of a single edit.
2025-08-02 23:21:01 -07:00
Peter Slattery
6d7f1281b2
Allocate Scope_Delims and Notes from free list before allocating in chunks
2025-07-30 17:03:34 -07:00
Peter Slattery
69dc4f8e04
Remove Code_Index_Note_Ptr_Array from the codebase, use Code_Index_Note_List instead
2025-07-30 16:42:27 -07:00
Peter Slattery
76863fc03a
Fully remove Code_Index_Nest_Ptr_Array from the codebase, use Code_Index_Nest_List instead
2025-07-30 16:27:50 -07:00
Peter Slattery
1dfc106e8c
Parse delimiters before creating the nests tree
2025-07-30 15:38:49 -07:00
Peter Slattery
ee082e42d1
tree_sitter_parse_full_file_async no longer updates the code index
2025-07-16 19:43:14 -07:00
Peter Slattery
a072229d20
Removing unused function get_token_array_from_buffer_no_wait
...
- I added this previously, and the need for it has disappeared
2025-07-16 19:41:03 -07:00
Peter Slattery
a34a24f4e7
Passing the old and new ranges from buffer_edit_range to Buffer_Tree_Sitter_Data so it can be accessed in the tick for incremental code index updating
2025-07-16 11:31:55 -07:00
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
84b1b15fbb
Implement get_token_array_from_buffer_no_wait to return an empty array if the lex task is currently running
2025-07-14 11:19:27 -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
58374ba625
Incorporating the nest query into the cpp tags query
2025-07-13 11:17:56 -07:00
Peter Slattery
67e0420eb1
Indenting 4coder_code_index.cpp
2025-07-13 11:15:48 -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
60e850b2ff
Add bash support
2025-07-12 12:19:23 -07:00
Peter Slattery
877527e918
Cleaning up noisy build logs
2025-07-11 17:58:58 -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
Peter Slattery
1a97b41257
Add tree sitter to compile command
2025-07-10 06:01:48 -07:00
Peter Slattery
8a918eef82
Checking for color support in build scripts
2025-07-10 06:01:34 -07:00
Peter Slattery
d615358064
Updated build scripts to use common include flags
2025-07-08 10:05:45 -07:00
Peter Slattery
0b712c50e9
Added tree-sitter to project and got it building as a static library
2025-07-07 20:26:10 -07:00
Peter Slattery
d8d99eefdd
Removing tracking for generated files
2025-07-07 19:40:08 -07:00
Peter Slattery
73492010b3
render_buffer no longer overwrites the cpp token coloring for keywords
2025-07-07 19:39:30 -07:00
Peter Slattery
3dafcdd950
QOL underline all visible instances of the token the cursor is within
2025-07-07 15:16:07 -07:00
Peter Slattery
50c53649a2
QOL jump stack
2025-07-07 14:47:14 -07:00
Peter Slattery
322f690afc
QOL column alignment
2025-07-07 14:31:41 -07:00
Peter Slattery
ea389639b3
Search lister jumps
2025-07-07 14:08:40 -07:00
Peter Slattery
01a06a59c7
Cull lister render
2025-07-07 14:07:26 -07:00
Peter Slattery
051b5068e5
Fix redo off by one error
2025-07-07 14:06:38 -07:00
Peter Slattery
1c9fd3e16f
goto_next_jump accounts for .cursor_at_end
2025-07-07 14:03:24 -07:00
flyingsolomon
0ee8e3904a
Update code/platform_win32/4ed_dx11_render.cpp
...
Co-authored-by: Simon Anciaux <14198779+mrmixer@users.noreply.github.com>
2025-07-07 13:55:28 -07:00
fs
27b4626907
Added a check for badly defined scissor rectangles that caused a crash when resizing the window with dx11 backend
2025-07-07 13:55:14 -07:00
Peter Slattery
9e58435637
Fix font rendering on mac
2025-07-07 13:54:26 -07:00
Simon Anciaux
6469fe5a0f
Removed test setup, and small clean up.
2025-07-07 13:25:15 -07:00
Ed Ye
0f5d46f5a4
remove old comment
2025-07-07 13:24:46 -07:00
Ed Ye
87d0eb9cf3
update opengl version to 3.2 on linux and update glsl version to 150
2025-07-07 13:24:06 -07:00
Edward Ye
b834dbb451
change mac metal renderer to properly handle texture array
2025-07-07 13:23:11 -07:00
Simon Anciaux
b2bdc515ec
Mac version of the fix. Not working at the moment.
...
It needs an implementation for `free_texture` in 4ed_metal_render.mm (like `get_texture_of_dim`, and `fill_texture`).
We also need to make sure that the texture (`handle` parameter in get_texture_of_dim and fill_texture) is not zero as the original fix expect 0 to signify "invalid texture". More specifically in `4ed_font_provider_freetyp.cpp` there is `if (texture) { fill the texture }`
and in `4ed_font_set.cpp` there is `if ( slot->face->texture != 0 ) { graphics_free_texture(...);}`
2025-07-07 13:22:32 -07:00