Commit graph

1251 commits

Author SHA1 Message Date
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
0791a82ca0
fix: mismatched enable_/disable_ fast_scroll/jump_mode bindings
The release bindings were missed in #145.
2025-01-14 17:48:26 +01:00
Jonathan Marler
eb1caf5237 remove Direct2D renderer
Removes the old slow Direct2D renderer which has become obselete with
the new Direct3D11 renderer.  Note that Direct2D is built on top of
Direct3D so there's really no reason to keep it around.
2025-01-14 17:17:34 +01:00
edwloef
faabd69191 swap enable_fast_scroll and enable_jump_mode keybinds 2025-01-14 16:56:22 +01:00
cc853fcc1c
build: update libvaxis for *BSD support
closes #148
2025-01-14 16:52:29 +01:00
d58f1964bf
fix(build): don't declare d2d mutiple times in package_release builds 2025-01-14 16:11:17 +01:00
9cc5c9711b
fix(win32 gui): avoid a panic on invalid utf-8 2025-01-14 13:08:27 +01:00
Jonathan Marler
27f256a7c5 switch to a monochrome texture for the font rendering 2025-01-13 22:15:11 -07:00
Jonathan Marler
5b83619f7a win32 gui: replace D2D renderer with D3d11 shader 2025-01-13 05:06:57 -07:00
Jonathan Marler
157dc3d47c win32 gui: a few fixes 2025-01-12 17:44:06 +01:00
Jonathan Marler
e542ccb8f1 win32 gui: track and use window bounds to prevent infinite shrinkage 2025-01-10 23:11:28 +01:00
7d138a742c feat(win32 gui): add set_fontface and set_fontsize commands 2025-01-10 23:10:59 +01:00
97cc7be97c
feat: add keybind to generate and insert 4 bytes of random hex data 2025-01-10 22:57:20 +01:00
Jonathan Marler
a0cee00f66 win32 gui: make an effort to bring window to the top/foreground 2025-01-10 22:35:50 +01:00
João Pedro
a21f0e6ac5 Fix half and whole page movements 2025-01-10 22:34:42 +01:00
5300e3346d feat(win32 gui): add adjust_fontsize command to zoom in/out 2025-01-09 20:08:12 +01:00
Jonathan Marler
fd86653db1 win32 gui: more fixes/edge cases 2025-01-09 17:17:50 +01:00
Jonathan Marler
87a355b854 win32 gui: shrink window to be a multiple of size width
Let the win32 voodoo flow...
2025-01-09 17:17:50 +01:00
Jonathan Marler
59bb2c0b45 fix bug in assumption that all include files are json files 2025-01-09 07:10:50 +01:00
Jonathan Marler
4cc7eeed59 config: improve errors
Config errors now include filename and line number. I also reworded the
errors themselves since the error message now includes the filename/line
number, it's clear it's a config file error.
2025-01-08 23:16:58 +01:00
63d5cb7208
fix(config): add gui_config to file_types 2025-01-08 22:25:04 +01:00
caeb3fc338
feat(config): migrate to a simpler config file format 2025-01-08 22:14:29 +01:00