aboutsummaryrefslogtreecommitdiff
path: root/helix-term
Commit message (Collapse)AuthorAge
* add register completion (#9936)Kirawi2024-03-19
|
* Ignore more version control systems (#9935)Tobias Hunger2024-03-19
| | | | Ignore `.pijul` and `.jj` as well as `.git`. This makes hx so much more usable with VCSes other than git!
* Prevent `shell_keep_pipe` from stopping on nonzero exit status code (#9817)Cyrill Schenkel2024-03-19
| | | | | | | | | | | | The `shell_impl` and `shell_impl_async` functions no longer return `success` because it was always `true`. If the command didn't succeed both functions would return an `Err`. This was also the reason, why `shell_keep_pipe` didn't work. It relied upon the value of `success` and aborted in case of an `Err`. It now removes any selection for which `shell_impl` returns `Err`. If the command always fails, the selections are preserved and an error message is displayed in the status bar.
* Do not stop reloading docs on error (#9870)Luis Useche2024-03-19
| | | | | | | | | | In the `reload-all` command, we should not stop reloading the documents if one error is found. Instead, we should report the error and continue trying to reload the current open documents. This is useful in cases where a backing file does not exist temporarily (e.g. when editing a git patch in the outstanding chain that doesn't have a file just yet). This change also remove the error messages in the cases where the backing is `None`, like in new docs or `tutor`.
* Optimize getting a relative pathmo8it2024-03-19
|
* add 'file-absolute-path' to statusline (#4535)Dan Cardamore2024-03-17
| | | | | | | | | | | * feat: add 'file-abs-path' to statusline (#4434) * cleanup implementation * rename to be non-abbreviated names --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Keybind for Extend/shrink selection up and down (#9080)Emi2024-03-17
| | | | | | | | | | | | | | | | | | | * implement another selection modifying command * Selection feels more ergonomic in case of swapping the direction. This also fixes a problem when starting at an empty line. * rename select_line_up/down to select_line_above/below * apply clippy suggestion of using cmp instead of if-chain * revert `Extent` implementing `Clone/Copy` * move select_line functions below extend_line implementations * implement help add function, which saturates at the number of text lines --------- Co-authored-by: Emi <emanuel.boehm@gmail.com>
* Handle starting and continuing the count separately (#9887)Michael Davis2024-03-15
|
* Add a yank diagnostic command (#9640)Kirawi2024-03-15
| | | | | | | | | * yank diagnostic command * improve success message * move to a typed command * docgen
* build(deps): bump open from 5.0.1 to 5.1.2 (#9854)dependabot[bot]2024-03-12
| | | | | | | | | | | | | | | | Bumps [open](https://github.com/Byron/open-rs) from 5.0.1 to 5.1.2. - [Release notes](https://github.com/Byron/open-rs/releases) - [Changelog](https://github.com/Byron/open-rs/blob/main/changelog.md) - [Commits](https://github.com/Byron/open-rs/compare/v5.0.1...v5.1.2) --- updated-dependencies: - dependency-name: open dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* helix-term: allow to backspace out-of the command prompt (#9828)Markus F.X.J. Oberhumer2024-03-09
|
* Fix panic in surround_replace/delete nested multi-cursor (#9815)Mike Trinkala2024-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test Document ------------- ``` {{ } } ``` Steps To Reproduce ------------------ 1. 2j # move_visual_line_down 1. C # copy_selection_on_next_line 1. mdm # surround_delete Debug ----- `assertion failed: last <= from', transaction.rs:597:13` Release ------- `called `Result::unwrap()` on an `Err` value: Char range out of bounds: char range 18446744073709551614..18446744073709551615, Rope/RopeSlice char length 7', ropey-1.6.1/src/rope.rs:546:37` Description ----------- Processing the surrounding pairs in order violates the assertion the ranges are ordered. To handle nested surrounds all positions have to be sorted. Also surround_replace has to track the proper replacement character for each position.
* build(deps): bump arc-swap from 1.6.0 to 1.7.0 (#9809)dependabot[bot]2024-03-06
|
* Fix panic when using surround_replace/delete (#9796)Mike Trinkala2024-03-03
| | | | | | | | | | | | | | | | | | | | | | 1. Create a document containing `{A}` 1. C-w v # vsplit 1. gl # goto_line_end 1. b # move_prev_word_start 1. ` # switch_to_lowercase 1. mrm( # surround replace 1. C-w v # vsplit In the debug build surround_replace/delete will immedately assert with `assertion failed: last <= from', transaction.rs:597:13`. The splits and lowercase conversion are not needed to trigger the bug. In the release build the surround becomes `)a(` and the last vsplit causes the transaction to panic. `internal error: entered unreachable code: (Some(Retain(18446744073709551573)))', transaction.rs:185:46` Since the selection direction is backwards get_surround_pos returns the pairs reversed but the downstream code assumes they are in the forward direction.
* Fix panic when using join_selections_space (#9783)Mike Trinkala2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | Joining lines with Alt-J does not properly select the inserted spaces when the selection contains blank lines. In the worst case it panics with an out of bounds index. thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Char index out of bounds: char index 11, Rope/RopeSlice char length 10' Steps to reproduce: * Create a new document ``` a b c d e ``` * % (Select all) * Alt-J (join and select the spaces)
* Support LSP diagnostic tags (#9780)Michael Davis2024-03-02
|
* Avoid cloning the whole paragraph content just for rendering (#9739)Mo2024-02-27
| | | | | * Avoid cloning the whole paragraph content just for rendering * Fix tests
* toggling of block comments (#4718)Gabriel Dinner-David2024-02-27
|
* build(deps): bump tempfile from 3.10.0 to 3.10.1 (#9733)dependabot[bot]2024-02-27
| | | | | | | | | | | | | | | Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.10.0 to 3.10.1. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.0...v3.10.1) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* switch to regex-cursor (#9422)Pascal Kuthe2024-02-26
|
* LSP: Normalize diagnostic file pathsMichael Davis2024-02-25
|
* LSP: Key diagnostics off file path instead of URIMichael Davis2024-02-25
| | | | | | | | | URIs need to be normalized to be comparable. For example a language server could send a URI for a path containing '+' as '%2B' but we might encode this in something like 'Document::url' as just '+'. We can normalize the URI straight into a PathBuf though since this is the only value we compare these diagnostics URIs against. This also covers edge-cases like windows drive letter capitalization.
* Optimization of tilde expansion (#9709)Mo2024-02-24
| | | | | | | | | | | | | | | | * Use next and avoid a redundant prefix strip * Avoid allocations Especially when `expand_tilde` is claled on a path that doesn't contain a tilde. * Add a test * Use Into<Cow<…>> * Put the expand_tilde test at the end of the file * Remove unused importsw
* Use a hook for resolving completion itemsMichael Davis2024-02-23
| | | | | | Previously we used the IdleTimeout event to trigger LSP `completion/resolveItem` requests. We can now refactor this to use an event system hook instead and lower the timeout.
* Make mouse click extend selection in select mode (#5436)Jonathan LEI2024-02-19
| | | | | * Make mouse click extend selection in select mode * chore: better readability with `Option::take()`
* fix LSP ComplitionTriggerKind value for `TriggerKind::Auto` (#9660)nkitsaini2024-02-19
|
* Scroll cursor and page together (neovim-like scrolling) (#8015)AlexanderDickie2024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * neovim like scroll function * clear line annotations outside of move_vertically/_visual * add nvim scroll function to commands * assign nvim-scroll to C-d and C-u (half page scrolls) * dont remove backspace and space mapping * move non-softwrap logic to seperate function, call this in nvim-scroll fn * Revert "move non-softwrap logic to seperate function, call this in nvim-scroll fn" This reverts commit e4905729c338a2260e6981f1d8fac022897b4191. * Revert "clear line annotations outside of move_vertically/_visual" This reverts commit 1df3fefe55afc840d1ab5094b2116d1127fc363f. * add TODO for when inline diagnostics gets merged * move nvim-scroll logic into scroll(), dont respect scrolloff * run cargo fmt * run cargo clippy * update documenation for Ctrl-d and Ctrl-u remap
* Allow numbers as second input event (#8471)Mehdi Abedi2024-02-14
| | | | | | | | | | | | | | | * Make sure pending key list is empty when count handling This will allow using numbers as second key event. * count handling; add an exception for 'g' * Lookup the key event before considering a number as count * Avoid the allocation of another vec for the pending keys --------- Co-authored-by: x <x@torrent>
* Add changes to history when paste-replacing (#9625)Mihir Gadgil2024-02-13
|
* fix lsp config reload (#9415)kyfanc2024-02-13
| | | | | | | | `syn_loader` was replaced rather than interior value being replace, old value was still being referenced and not updated after `:config-refresh`. By using `ArcSwap` like for `config`, each `.load()` call will return the most updated value. Co-authored-by: kyfan <kyfan@email>
* build(deps): bump toml from 0.7.6 to 0.8.10 (#9539)dependabot[bot]2024-02-12
| | | | | | | | | | | | | | Bumps [toml](https://github.com/toml-rs/toml) from 0.7.6 to 0.8.10. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.6...toml-v0.8.10) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump tempfile from 3.9.0 to 3.10.0 (#9538)dependabot[bot]2024-02-12
| | | | | | | | | | | | | | | Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.9.0 to 3.10.0. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.9.0...v3.10.0) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* follow neovim's truecolor detection (#9577)Kirawi2024-02-11
|
* Add glob file type support (#8006)Galen Abell2024-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace FileType::Suffix with FileType::Glob Suffix is rather limited and cannot be used to match files which have semantic meaning based on location + file type (for example, Github Action workflow files). This patch adds support for a Glob FileType to replace Suffix, which encompasses the existing behavior & adds additional file matching functionality. Globs are standard Unix-style path globs, which are matched against the absolute path of the file. If the configured glob for a language is a relative glob (that is, it isn't an absolute path or already starts with a glob pattern), a glob pattern will be prepended to allow matching relative paths from any directory. The order of file type matching is also updated to first match on globs and then on extension. This is necessary as most cases where glob-matching is useful will have already been matched by an extension if glob matching is done last. * Convert file-types suffixes to globs * Use globs for filename matching Trying to match the file-type raw strings against both filename and extension leads to files with the same name as the extension having the incorrect syntax. * Match dockerfiles with suffixes It's common practice to add a suffix to dockerfiles based on their context, e.g. `Dockerfile.dev`, `Dockerfile.prod`, etc. * Make env filetype matching more generic Match on `.env` or any `.env.*` files. * Update docs * Use GlobSet to match all file type globs at once * Update todo.txt glob patterns * Consolidate language Configuration and Loader creation This is a refactor that improves the error handling for creating the `helix_core::syntax::Loader` from the default and user language configuration. * Fix integration tests * Add additional starlark file-type glob --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Fix scroll track (#9508)ath32024-02-09
|
* Fix pulldown_cmark breaking changes to tag typesMichael Davis2024-02-07
| | | | | | | * Tags and TagEnd are now separate enums since <https://redirect.github.com/raphlinus/pulldown-cmark/pull/517>. * The `Tag::Heading` member has been changed from a tuple variant to a struct variant.
* build(deps): bump pulldown-cmark from 0.9.6 to 0.10.0dependabot[bot]2024-02-07
| | | | | | | | | | | | | | Bumps [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) from 0.9.6 to 0.10.0. - [Release notes](https://github.com/raphlinus/pulldown-cmark/releases) - [Commits](https://github.com/raphlinus/pulldown-cmark/compare/v0.9.6...v0.10.0) --- updated-dependencies: - dependency-name: pulldown-cmark dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump libc from 0.2.152 to 0.2.153 (#9541)dependabot[bot]2024-02-07
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix division by zero when prompt completion area is too small (#9524)Diego2024-02-06
|
* Use range positions to determine insert_newline motion (#9448)Waleed Dahshan2024-01-29
| | | | | | | * use anchor and head positions to determine motion * use range cursor to decide extending or shifting * add condition to cursor moving back on normal
* make path changes LSP spec conform (#8949)Pascal Kuthe2024-01-28
| | | | | | | | | | | | | | | | | 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)
* Add icon to Windows executable (#9104)NitinKM2024-01-28
| | | | | | | | | | | * injecting the icon through a resource file, no extra deps * formatted * scripted rc compilation * formatted and restructured * simplified conditional func call
* Respect injections in :tree-sitter-highlight-nameMichael Davis2024-01-28
|
* Fix error message shown for goto references (#9382)Nick2024-01-25
|
* Re-export `which` from `helix-stdx::env`Michael Davis2024-01-24
| | | | | | | | | | We use `which::which` in many crates, so `which` was a separate dependency across all of them. We can centralize `which` into the stdx crate so it's easy for all crates to depend on it. I also moved the rest of `helix-view/src/env.rs` into helix-stdx's `env` module since it only contained a thin wrapper around `which` and `std::env`.
* build(deps): bump smallvec from 1.12.0 to 1.13.1 (#9405)dependabot[bot]2024-01-23
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor completion and signature help using hooksPascal Kuthe2024-01-23
|
* Add hook/event systemPascal Kuthe2024-01-23
|
* Create helix-stdx crate for stdlib extensionsMichael Davis2024-01-18
| | | | | | | | | | | | | 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).
* Address clippy lints (#9371)Daniel Sedlak2024-01-17
|