Commit Graph

381 Commits (f9ad6ef571d315f6ae065e26c7079702fe97f286)

Author SHA1 Message Date
mattwparas f9ad6ef571 remove unnecessary keybinding functions 2024-02-20 08:51:49 -08:00
mattwparas d7ef4824e1 remove global keybindings thread local 2024-02-20 08:46:51 -08:00
mattwparas 759d32e8ac remove repr c 2024-02-19 20:45:08 -08:00
mattwparas cf967ed71e addressing more comments 2024-02-14 16:59:35 -08:00
mattwparas eb20adbaad add new xtask for code generation of core libraries 2024-02-13 21:00:21 -08:00
mattwparas 38f344c21c removing the language and theme configurations in favor of a better implementation in the future 2024-02-04 10:21:05 -08:00
mattwparas 392275ddb2 merge latest from master 2024-01-30 20:07:31 -08:00
Pascal Kuthe 87a720c3a1
make path changes LSP spec conform (#8949)
Currently, helix implements operations which change the paths of files
incorrectly and inconsistently. This PR ensures that we do the following
whenever a buffer is renamed (`:move` and workspace edits)

* always send did_open/did_close notifications
* send will_rename/did_rename requests correctly
  * send them to all LSP servers not just those that are active for a
    buffer
  * also send these requests for paths that are not yet open in a buffer (if
    triggered from workspace edit).
  * only send these if the server registered interests in the path
* autodetect language, indent, line ending, ..

This PR also centralizes the infrastructure for path setting and
therefore `:w <path>` benefits from similar fixed (but without didRename)
2024-01-29 01:34:45 +09:00
Michael Davis 8b6565c839 Respect injections in :tree-sitter-highlight-name 2024-01-28 18:13:33 +09:00
Nick d8b8d2fda6
Fix error message shown for goto references (#9382) 2024-01-25 14:11:12 +09:00
Pascal Kuthe 8e592a151f refactor completion and signature help using hooks 2024-01-23 11:20:19 +09:00
mattwparas d6c3804ed8 use in memory representation of configuration 2024-01-20 21:32:12 -08:00
Michael Davis 1f916e65cf Create helix-stdx crate for stdlib extensions
helix-stdx is meant to carry extensions to the stdlib or low-level
dependencies that are useful in all other crates. This commit starts
with all of the path functions from helix-core and the CWD tracking that
lived in helix-loader.

The CWD tracking in helix-loader was previously unable to call the
canonicalization functions in helix-core. Switching to our custom
canonicalization code should make no noticeable difference though
since `std::env::current_dir` returns a canonicalized path with
symlinks resolved (at least on unix).
2024-01-18 10:57:53 +09:00
Daniel Sedlak af8e524a7d
Address clippy lints (#9371) 2024-01-17 12:40:45 -06:00
Michael Davis eca3ccff76
Select subtree within injections in :tree-sitter-subtree (#9309)
`:tree-sitter-subtree` could previously only print subtrees of nodes
in the root injection layer. We can improve on that by finding the layer
that contains the given byte range and printing the subtree within that
layer. That gives more useful results when a selection is within an
injection layer.
2024-01-15 15:34:38 +09:00
Gabriel Dinner-David 84e24b33dc
make sure to sync views when applying edits to unfocused views (#9173) 2024-01-09 10:21:16 +09:00
Philipp Mildenberger 41ca46cf8c
Initialize diagnostics when opening a document (#8873) 2024-01-09 10:01:04 +09:00
Michael Davis 0cbd8d3df1
Check for rename support before showing LSP rename prompt (#9277) 2024-01-09 09:55:11 +09:00
mattwparas 01996b2bec No more passing around the helix context for every function call 2024-01-01 21:18:07 -08:00
ath3 9ba691cd3a
Support drawing popup frame (#4313)
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2023-12-19 10:17:12 +09:00
TornaxO7 914c83420b
fix `:indent-style` crash (#9087)
* removing unreachable statement in `:indent-style`

* update checks when setting indent line and update docs

* `cargo xtask docgen`
2023-12-15 19:05:04 +01:00
Cole Helbling 8b0ae3d279
bump MSRV to 1.70.0 (#8877)
* rust-toolchain.toml: bump MSRV to 1.70.0

With Firefox 120 released on 21 November 2023, the MSRV is now 1.70.0.

* Fix cargo fmt with Rust 1.70.0

* Fix cargo clippy with Rust 1.70.0

* Fix cargo doc with Rust 1.70.0

* rust-toolchain.toml: add clippy component

* .github: bump dtolnay/rust-toolchain to 1.70

* helix-term: bump rust-version to 1.70

* helix-view/gutter: use checked_ilog10 to count digits

* helix-core/syntax: use MAIN_SEPARATOR_STR constant

* helix-view/handlers/dap: use Display impl for displaying process spawn error

* WIP: helix-term/commands: use checked math to assert ranges cannot overlap
2023-11-25 13:55:49 +01:00
Yomain e868678139
Add command to move files with LSP support (#8584)
* Added rename command

* Added an error if the new path already exists

* Fixed wrong command name being used

* fixed clippy suggestions

* removed didRenameFiles call, fixed early return due to path Err

* added ':rnm' alias to ':rename'

* code cleanup

* formatting

* removed debug line

* cargo fmt

* Improved new buffer error message

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Removed unnecessary path normalizing

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update helix-term/src/commands/typed.rs

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* feat: change `rename` command to `move`

* feat: add multi lsp support when moving files

* feat: allow lsp calls with a custom timeout

* feat: sending lsp file_changed event once file has moved

---------

Co-authored-by: ontley <theontley@gmail.com>
Co-authored-by: ontley <67148677+ontley@users.noreply.github.com>
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
2023-11-08 12:38:17 -06:00
Skyler Hawthorne 10b178e94b
swap yank command registers (#8708)
#8703 swapped the `+` and `*` registers, but did not swap them in the
corresponding yank commands.
2023-11-04 09:35:38 +09:00
mattwparas 0b5501d175 clean up 2023-10-30 19:44:30 -07:00
mattwparas 4550faf50f fix build issues 2023-10-03 11:13:54 -07:00
mattwparas fbabc40930 merge with event system 2023-10-03 11:09:33 -07:00
mattwparas cc65e583f4 checkpoint before event system 2023-10-03 10:16:30 -07:00
mattwparas 30dba6a6de add one more keybinding 2023-09-30 21:55:09 -07:00
mattwparas c0fdbc1148 start theme api 2023-09-27 15:13:02 -07:00
Pascal Kuthe dbfa2a63fa
refactor completion and signature help using hooks 2023-09-26 22:14:46 +02:00
mattwparas 76de40c1ed have some comments on the global search 2023-09-26 13:12:32 -07:00
mattwparas 0b107d6f41 deprecate old keybinding scheme 2023-09-26 13:08:13 -07:00
mattwparas baa753176a add more functions for document and editor api 2023-09-18 22:00:03 -07:00
mattwparas 6a9d0b3c64 reverse keymap overlay 2023-09-14 17:50:31 -07:00
mattwparas db3e9ed31d Merge remote-tracking branch 'origin' into mwp-steel-integration 2023-09-14 08:53:23 -07:00
mattwparas 500963b1c5 clean up warnings 2023-09-13 20:55:26 -07:00
mattwparas 2d4bc31d54 reorganize top level to use precedence for multiple plugins 2023-09-13 20:49:38 -07:00
Em Zhan 7090555dab
Add `insert-final-newline` config option (#8157)
Co-authored-by: Xalfer <64538944+Xalfer@users.noreply.github.com>
2023-09-11 19:06:25 -05:00
Luke Halasy b959162ceb
Add tree-sitter-highlight-name command (#8170)
* adds treesitter-highlight-name command

* commit documentation changes

* moves the get_highlight_name function into core/syntax

* rename get_highlight_name function to get_highlight_for_node_at_position

* addresses pr comments: moves fn into helper fn, simplifies a lot

* commit updated documentation changes

* changes scope method to return &str so that callers can decide whether or not to own
2023-09-10 14:57:44 +02:00
Weiyuan Wu 8017bb2999
add redraw command (#6949)
Co-authored-by: Roberto Vidal <vidal.roberto.j@gmail.com>
2023-09-08 10:46:36 +09:00
Lorenzo Bellina e8fc77fe98
Maintain the current cursor's position and view in the vsplit/hsplit commands too (#8109)
Co-authored-by: Benjamin Bouvier <public@benj.me>
2023-09-04 12:39:48 +09:00
Pascal Kuthe 0cb595e226
transition to nucleo for fuzzy matching (#7814)
* transition to nucleo for fuzzy matching

* drop flakey test case

since the picker streams in results now any test that relies
on the picker containing results is potentially flakely

* use crates.io version of nucleo

* Fix typo in commands.rs

Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>

---------

Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>
2023-08-30 13:26:21 +09:00
mattwparas cb93a68595 fix borrow mut error 2023-08-29 09:44:17 -07:00
mattwparas 0eb0be55a3 slim down interfact even more 2023-08-26 18:13:55 -07:00
mattwparas 7d63468b83 cleanup 2023-08-26 17:18:13 -07:00
mattwparas 18fa67d157 more clean up 2023-08-24 20:01:49 -07:00
mattwparas 279f5eddb3 add feature flag 2023-08-24 18:12:15 -07:00
mattwparas 81243247c6 nuke the dlopen stuff 2023-08-24 08:41:43 -07:00
mattwparas 7da809a780 fix borrow mut errors 2023-08-23 22:12:25 -07:00