aboutsummaryrefslogtreecommitdiff
path: root/helix-term
Commit message (Collapse)AuthorAge
* Fix process spawning error handling (#3349)PiergiorgioZagaria2022-08-30
| | | | | * Fix process spawning error handling * Log stderr in any case
* Derive Document language name from languages.toml name key (#3338)Michael Davis2022-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Derive Document language name from `languages.toml` `name` key This changes switches from deriving the language name from the `languages.toml` `scope` key to `name` (`language_id` in the `LanguageConfiguration` type). For the most part it works to derive the language name from scope by chopping off `source.` or `rsplit_once` on `.` but for some languages we have now like html (`text.html.basic`), it doesn't. This also should be a more accurate fallback for the `language_id` method which is used in LSP and currently uses the `rsplit_once` strategy. Here we expose the language's name as `language_name` on `Document` and replace ad-hoc calculations of the language name with the new method. This is most impactful for the `file-type` statusline element which is using `language_id`. * Use `Document::language_name` for the `file-type` statusline element The `file-type` indicator element in the statusline was using `Document::language_id` which is meant to be used to for telling Language Servers what language we're using. That works for languages with `language-server` configurations in `languages.toml` but shows text otherwise. The new `Document::language_name` method from the parent commit is a more accurate way to determine the language.
* let extend-line respect range direction (#3046)Bob2022-08-29
| | | | | | | | | | | | | * let extend-line respect range direction * fix extend above logic * keep `x` existing binding * Update book/src/keymap.md Co-authored-by: Ivan Tham <pickfire@riseup.net> Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Add bracketed paste (#3233)Charlie Groves2022-08-29
|
* Fix markdown indented code block rendering (#3503)Clay2022-08-24
|
* fix: Reset document mode when losing focusBlaž Hrastnik2022-08-23
| | | | Fixes #3090
* Editor: remove duplication for view focus/swap commandsBlaž Hrastnik2022-08-23
|
* Reduce health tick widthIvan Tham2022-08-23
| | | | Use the same tick as book to reduce margin of whitespace errors.
* Update to crossterm-0.25 (#3390)Charlie Groves2022-08-22
|
* Switch to `tabpad` configuration option (#3458)A-Walrus2022-08-21
| | | | Virtual whitespace tabs are created from the `tab` character padded with `tabpad` up to the tab width.
* style: fixes `unused_parens` warnings on nightly builds (#3471)Saber Haj Rabiee2022-08-18
|
* Adjust `m` textobject description and minor code clarification (#3343)Daniel S Poulin2022-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update description of `m` textobject to its actual functionality Sometime recently the functionality of `m` was changed to match the nearest pair to the cursor, rather than the former functionality of matching the pair only if the cursor was on one of the brace characters directly. * Rename surround methods to reflect that they work on pairs The current naming suggests that they may work generally on any textobject, whereas their implementation really focuses on pairs. * Change description of m textobject to match actual functionality The current implementation of `m` no longer merely looks at the pair character the cursor is on, but actually will search for the pair (defined in helix-core/src/surround.rs) that encloses the cursor, and not the entire selection. * Accept suggested wording change Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Prefix pair surround for consistency Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* remove duplicate entries from theme picker (#3439)ChrHorn2022-08-15
|
* Fix conditional setting of stdin handle on Windows (#3379)Kyle L. Davis2022-08-12
| | | | | | | | | * Revert 3121353c6ab2fbc5fced28f075c7fc45b53b661e * Switch to conditional compilation * Run formatter * Switch from conditional compilation to compile-time bool
* Add custom event type replacing crossterm's Event (#3169)Gokul Soumya2022-08-09
| | | | | | | | | | Ported over from 61365dfbf3 in the `gui` branch. This will allow adding our own events, most notably an idle timer event (useful for adding debounced input in [dynamic pickers][1] used by interactive global search and workspace symbols). [1]: https://github.com/helix-editor/helix/pull/3110 Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Add completion for nested settings (#3183)A-Walrus2022-08-06
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Remove C-n and C-p from the insert mode keymap (#3340)Michael Davis2022-08-06
| | | | | | | | | | | | | | These are read-line-like bindings which we'd like to minimize in insert mode in general. In particular these two are troublesome if you have a low `editor.idle-timeout` config and are using LSP completions: the behavior of C-n/C-p switches from moving down/up lines to moving down/up the completion menu, so if you hit C-n too quickly expecting to be in the completion menu, you'll end up moving down a line instead. Using C-p moves you back up the line but doesn't re-trigger the completion menu. This kind of timing related change to behavior isn't realistically that big of a deal but it can be annoying.
* Fix tab highlight when tab is partially visible (#3313)A-Walrus2022-08-06
| | | | | | | | | | * Fix tab highlight when tab is partially visible * Make it style based, and not truncation based Dealing with truncating is a mess, especially when it comes to wide unicode graphemes. This way it should work no matter what. * Inline style calculation into branches
* Fix indent guide styling (#3324)A-Walrus2022-08-06
| | | | | | | | | | | | | | * Fix incorrect indent guide styling Before the indent guides on top of whitespace inherited the theme from them. Now they do not. * Fix dark_plus theme indent_guides * Use whitespace style as fallback for indent-guide * Fix dark_plus theme indent_guides * Move indent_guide style patching out of loop
* Avoid setting stdin handle when not necessary (#3248)Dario Oddenino2022-08-05
| | | | | | | | | | | | | | * Avoid setting stdin handle when not necessary Avoid setting the stdin handle in `shell_impl` when the input argument is None. This permits to run commands with no stdin with :sh * refactoring to avoid code duplication * making clippy happy * Process variable name fix
* Detect indent-style in `:set-language` (#3330)Michael Davis2022-08-05
| | | | | | | Indent style may change when choosing a language with `:set-language`. Line-endings most likely will not change, but `:set-language` should have a similar effect as reloading a file (`:reload`), plus the two are currently grouped in the implementation and line-ending detection is not particularly expensive.
* Avoid copying fragments (#3136)Matthias Deiml2022-08-04
| | | | | | | * Avoid copying fragments * Add slice / slices method * Better documentation for fragment and slice methods
* Resolve clippy lints (#3307)Omnikar2022-08-04
|
* add a CLI flag for specifying config file location (#2666)Michael Davis2022-08-04
|
* Change default formatter for any language (#2942)PiergiorgioZagaria2022-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change default formatter for any language * Fix clippy error * Close stdin for Stdio formatters * Better indentation and pattern matching * Return Result<Option<...>> for fn format instead of Option * Remove unwrap for stdin * Handle FormatterErrors instead of Result<Option<...>> * Use Transaction instead of LspFormatting * Use Transaction directly in Document::format * Perform stdin type formatting asynchronously * Rename formatter.type values to kebab-case * Debug format for displaying io::ErrorKind (msrv fix) * Solve conflict? * Use only stdio type formatters * Remove FormatterType enum * Remove old comment * Check if the formatter exited correctly * Add formatter configuration to the book * Avoid allocations when writing to stdin and formatting errors * Remove unused import Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* feat: support grammar cross-compilationyvt2022-08-02
|
* build(deps): bump arc-swap from 1.5.0 to 1.5.1 (#3290)dependabot[bot]2022-08-02
| | | | | | | | | | | | | | | | | Bumps [arc-swap](https://github.com/vorner/arc-swap) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/vorner/arc-swap/releases) - [Changelog](https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md) - [Commits](https://github.com/vorner/arc-swap/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: arc-swap 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>
* Modified restore_term fn in application.rs. Changed '\x1B[2 q' to '\x1B[0 q' ↵Eric K2022-08-02
| | | | to restore cursor to user default after exiting helix (#3289)
* Fix align_selection behaviour with tabs (#3276)A-Walrus2022-07-31
|
* Add cwd parameter which is not optional anymore (#3240)Danilo Spinella2022-07-31
|
* Add rust-version (MSRV) to helix-term package (#3244)Danilo Spinella2022-07-31
|
* clipboard: add logging and healthcheck (#3271)Amit Beka2022-07-31
| | | | | | | * add logging to clipboard setup * healthcheck: add clipboard provider name Co-authored-by: amitbeka <--->
* Don't add empty prompt input to history (#3259)A-Walrus2022-07-30
|
* Fix byte index error in signature help highlightingGokul Soumya2022-07-29
| | | | | | | | | | | | | | | The language server sends a char offset range within the signature help label text to highlight as the current parameter, but helix uses byte offset ranges for rendering highlights. This was brought up in the [review of the original signature help PR][1], but the ranges were being highlighted correctly, and there were no out of bound or indexing panics. Turns out rust-analyzer was [incorrectly sending byte offsets] instead of char offsets and this made it seem like all was well and good with offsets in helix during initial testing. [1]: https://github.com/helix-editor/helix/pull/1755#discussion_r906715371 [2]: https://github.com/rust-lang/rust-analyzer/pull/12272
* Use OR of all selections in search_selection command (#3138)MilanVasko2022-07-27
| | | Closes #2312
* add configurable / theme-able statusline separator string (#3175)Seth Bromberger2022-07-26
| | | | | | | | | | | * add configurable separator element to statusline * themable separator * clippy fixes * changed default separator to │ * doc updates
* add position-percentage as a statusline indicator (#3168)Seth Bromberger2022-07-26
| | | | | | | | | * added position-pct as a statusline indicator * removed unnecessary mutable reference * pct -> percent * percent -> percentage
* Shorten embedded command descriptions (#3070)Gokul Soumya2022-07-26
| | | | | | | | | * Shorten embedded command descriptions - Compact descriptions in command palette and infobox * Shorten typed command descriptions * Fix typo in decrement command description
* Suport diagnostic code (#3096)Erasin2022-07-26
| | | | | | | * add code for diagnostic. This PR provides a solution to resolve #2994. missing Code Actions for lsp * remote unused import
* add spacer element to statusline (#3165)Seth Bromberger2022-07-26
| | | | | * add spacer element to statusline * docs
* Auto pair-removal (#2940)Houkime2022-07-22
| | | | | | | | | | | | | | | * auto pair-removal Fixes https://github.com/helix-editor/helix/issues/1673 * autopairs removal: use doc autopairs * autopairs-removal: limit to one-char selections * use single_grapheme() to check if range is one char * fix errouneous deletes of " and other symmetric autopairs when at buffer start Co-authored-by: Houkime <>
* keep jump/file history when using :split (#3031)Robin2022-07-22
| | | | | | | * keep jump/file history when using :split * move history cloning into the switch function Co-authored-by: Robin <robinvandijk@klippa.com>
* jumplist picker (#3033)Bob2022-07-22
| | | | | | | | | | | | | * jumplist picker * remove jumps slicing Co-authored-by: Benoît Cortier <bcortier@proton.me> * remove unnecessary deref format! parameter Co-authored-by: Benoît Cortier <bcortier@proton.me> Co-authored-by: Benoît Cortier <bcortier@proton.me>
* add statusline element to display file line endings (#3113)Alexis Kalabura2022-07-21
| | | | | | | | | * add statusline element to display file line endings * run cargo fmt --all * change the word *ending* from plural to singular * support for the unicode-lines feature flag
* fix: Indent levels could bleed over on the left edgeBlaž Hrastnik2022-07-20
| | | | | | Fixes #3087 Refs #3105 # modified: theme.toml
* Add lsp signature help (#1755)Gokul Soumya2022-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lsp signature help * Do not move signature help popup on multiple triggers * Highlight current parameter in signature help * Auto close signature help * Position signature help above to not block completion * Update signature help on backspace/insert mode delete * Add lsp.auto-signature-help config option * Add serde default annotation for LspConfig * Show LSP inactive message only if signature help is invoked manually * Do not assume valid signature help response from LSP Malformed LSP responses are common, and these should not crash the editor. * Check signature help capability before sending request * Reuse Open enum for PositionBias in popup * Close signature popup and exit insert mode on escape * Add config to control signature help docs display * Use new Margin api in signature help * Invoke signature help on changing to insert mode
* build(deps): bump grep-searcher from 0.1.8 to 0.1.10 (#3101)dependabot[bot]2022-07-19
| | | | | | | | | | | | | | | | | Bumps [grep-searcher](https://github.com/BurntSushi/ripgrep) from 0.1.8 to 0.1.10. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-searcher-0.1.8...grep-searcher-0.1.10) --- updated-dependencies: - dependency-name: grep-searcher 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>
* build(deps): bump grep-regex from 0.1.9 to 0.1.10 (#3102)dependabot[bot]2022-07-19
| | | | | | | | | | | | | | | | | Bumps [grep-regex](https://github.com/BurntSushi/ripgrep) from 0.1.9 to 0.1.10. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-regex-0.1.9...grep-regex-0.1.10) --- updated-dependencies: - dependency-name: grep-regex 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>
* support prefilling prompt (#2459)Bob2022-07-18
| | | | | | | | | * support prefilling prompt * introduce with_line builder method in Prompt * extract show_prompt * use textobject_word as fallback input
* Set the selection point of the first file correctly (#3073)Narazaki Shuji2022-07-18
|