Commit graph

1072 commits

Author SHA1 Message Date
91eba39019
fix(win32 gui): prevent index out of bounds in d3d11.paint 2025-01-20 19:46:22 +01:00
102a00098e
build: update thespian for minor performance improvements 2025-01-20 19:45:44 +01:00
feca5e8fd9
build: always optimize dependencies (again) 2025-01-20 16:40:46 +01:00
29f8b4680d
fix: disable mouse_idle_timer
It's not very important and it's too spammy which makes debug builds slow.
2025-01-20 15:49:16 +01:00
51e8e9c1ab
build: update zig-tracy to support win32 2025-01-20 15:33:52 +01:00
5b5fd26bdf
feat(win32 gui): add tracy zones to win32 gui renderer 2025-01-20 15:07:42 +01:00
Jonathan Marler
620e44ef02 win32 gui: fix high cpu usage, validate window in WM_PAINT
Looks like I probably accidently removed the calls to BeginPaint and
EndPaint in WM_PAINT, which, would cause the OS to think that the
window contents are never validated and will continuously send us WM_PAINT
messages.  I've added these back in and now flow is back to low CPU usage
especially when idle.
2025-01-20 14:56:32 +01:00
386094001d
fix(vim-mode): prefer smart_move_begin of vim normal mode 'I' binding 2025-01-19 14:17:29 +01:00
e705d4ba01
fix(vim-mode): vim-mode bindings to enter insert mode 2025-01-19 14:15:44 +01:00
7dd61c4ba5
fix(keybind): provide fallback handling for legacy terminals the don not provide shifted key info 2025-01-19 14:05:36 +01:00
70c4c78138
feat(vim-mode): simplify vim mode bindings 2025-01-19 14:04:33 +01:00
42bc301426
fix(win32 gui): fix windows build broken by rename_symbol 2025-01-19 14:03:38 +01:00
9fc8e3edc3
fix(editor): send editor view and cursor position updates when number of document lines changes
closes #162
2025-01-19 12:10:59 +01:00
9f29853cd6
Merge pull request #149 from travisstaloch/lsp-rename
implement lsp rename
2025-01-18 23:33:25 +01:00
461726e10e
feat: add pause_undo and resume_undo commands
closes #91
2025-01-18 22:59:50 +01:00
4277f0f57b
feat(lsp): rename_symbol: add support for LSPs that do send document updates for renames 2025-01-18 20:34:14 +01:00
80cb31f75a
feat: copy current line if there is no selection
closes #160
2025-01-18 17:16:00 +01:00
edwloef
9ed9ec6360 add systemverilog lsp and formatter 2025-01-18 17:07:04 +01:00
f61c6c7f87
fix: cancel when clicking outside of a palette instead of activating the current item 2025-01-18 12:52:55 +01:00
0eec33c35e
fix: remove incomplete add_split bindings 2025-01-17 21:14:25 +01:00
48efa5536f
fix: use after free on fast project switching 2025-01-17 21:13:47 +01:00
d2735a5dd7
fix: prevent an integer overflow in editor.cancel_all_selections() on project switch 2025-01-17 20:52:34 +01:00
e1b1591167
feat(win32 gui): add font selection palette
closes #102
2025-01-17 20:32:20 +01:00
Jonathan Marler
3e953981fe win32 gui: add Fonts type to get list of available fonts
Adds a Fonts type the render interface.  Here's an example of how
you could use this in `gui.zig`:

```zig
    const fonts = render.Fonts.init();
    defer fonts.deinit();
    const count = fonts.count();
    std.log.info("{} fonts", .{count});
    for (0..count) |font_index| {
        const name = fonts.getName(font_index);
        std.log.info("font {} '{}'", .{ font_index, std.unicode.fmtUtf16Le(name.slice()) });
    }
```
2025-01-17 16:19:19 +01:00
04b77b4d28
fix(lsp): rename_symbol: convert columns to byte offsets and back 2025-01-17 15:56:46 +01:00
c8aa40895e
build(version): add tracking branch and upstream to version output 2025-01-17 13:02:30 +01:00
61d9f583a8
feat(emacs): add lsp-mode emacs keybindings 2025-01-17 12:33:02 +01:00
f659fcf586
feat(lsp): rename_symbol: add checks to file uri decoding 2025-01-16 23:40:10 +01:00
00efee6c02
fix(lsp): rename_symbol: fix error.InvalidMessage on multifile responses 2025-01-16 23:24:48 +01:00
155c1f663d
feat(lsp): rename_symbol: treat out-of-file edits as references 2025-01-16 23:02:52 +01:00
a449e0ec97
feat(lsp): rename_symbol: add cursors at rename points for interactive rename 2025-01-16 22:23:03 +01:00
e597fee2e5
feat(lsp): rename_symbol: decode and normalize file uri 2025-01-16 22:22:34 +01:00
Travis Staloch
bfdeffc70f
lsp-rename: minor cosmetic cleanups 2025-01-16 22:04:38 +01:00
Travis Staloch
860c36266c
keybinds: changes related to lsp rename
* vim mode: bind 'grn' to rename_symbol
* flow mode: bind F4 to toggle_input_mode
2025-01-16 22:04:38 +01:00
Travis Staloch
1c37de6c29
feat(lsp): buffer renames in order to send a single, atomic message 2025-01-16 22:04:38 +01:00
Travis Staloch
1fd4455adb
feat(lsp): initial support for textDocument/rename
flow keybinds: changes f2 from toggle_input_mode to rename_symbol and
moves toggle_input_mode command to ctrl+shift+f2 (since ctrl+f2 is
already bound to insert_command_name)

the replacement text is hard coded for now. i've checked that replace
works with zls and pylsp which send WorkspaceEdit response messages in
different shapes - zls sends shape `{"changes": {}}` while pylsp sends
`{"documentChanges": []}`.

currently the 'rename_symbol_item' commands are sent one at a time.
however they should be buffered and be performed between one
buf_for_update, update_buf pair.  this will be addressed in a follow up.
2025-01-16 22:04:35 +01:00
Jonathan Marler
7558a63819 win32 gui: decouple screen renderer from text renderer
I tried adding Andrew's TrueType renderer as an option, however, I
realized it doesn't work with zig 0.13.0, so it'll have to wait.

Until then here's the changes needed to decouple the screen/text rendering
which would make it easier to add more text renderers and just cleans
things up a bit more in general.
2025-01-15 21:16:51 -07:00
Jonathan Marler
ce068ee0dc direct3d: hoist flow types out, provide cell type, don't block GPU
Changes d3d11 to accept an array of cells to render that have already been
rendered to a texture and converted to texture coordinates.  This minimizes
the time we have to map the shader cell buffer which blocks the GPU from
using it.
2025-01-15 22:40:37 +01:00
Jonathan Marler
96c56c7124 win32 gui: get correct window size even when maximized 2025-01-15 22:32:45 +01:00
dcddd373b5
feat(find_in_files): clear file list and log if no matches are found 2025-01-15 14:23:30 +01:00
400af298d7
fix: perform utf-8 sanitazation on buffer insert_chars 2025-01-15 11:52:24 +01:00
9d6b760f03
feat: remove single trailing new line in shell_execute_insert 2025-01-15 11:26:17 +01:00
1c5dc9064d
feat(selection): add Selection.is_reversed helper function 2025-01-15 10:12:06 +01:00
Jonathan Marler
0f08b3930f win32 gui: fallback to non-debug d3d if create fails (requires sdk) 2025-01-14 23:37:28 +01:00
35ca71e032
feat: add config option gutter_symbols 2025-01-14 21:37:54 +01:00
da6bb18abb
build: update libvaxis 2025-01-14 20:13:34 +01:00
df84b4e709
feat(themes): add mellow theme and remove dead spacedust link 2025-01-14 19:54:52 +01:00
6530a7a51c
feat(win32 gui): add reset_fontsize and rest_fontface commands 2025-01-14 19:54:51 +01:00
Jonathan Marler
a5622af68d win32 gui: keep window aspect ratio during resizing
Now instead of snapping to a size after releasing the mouse from resizing
the window, the window will incrementally snap to a good size while the
window is being resized.
2025-01-14 17:55:44 +01:00
e09df735a5
feat: remove existing cursor if clicked again in add cursor mode
closes #146
2025-01-14 17:48:26 +01:00