aboutsummaryrefslogtreecommitdiff
path: root/helix-view
Commit message (Collapse)AuthorAge
* Add cursorcolumn (#4084)A-Walrus2022-10-08
| | | | | | | | | | | | | | | * Implement cursorcolumn * Add documentation * Separate column style from line with fallback * Fallback to cursorcolumn first * Switch to non-fallback try_get_exact Add new function `try_get_exact`, which doesn't perform fallback, and use that instead because the fallback behaviour is being handled manually.
* Automatically track pseudo-pending text (#4077)Michael Davis2022-10-03
| | | | | | | | | | | | | | | | | | This change automatically tracks pending text for for commands which use on-next-key callbacks. For example, `t` will await the next key event and "t" will be shown in the bottom right-hand corner to show that we're in a pending state. Previously, the text for these on-next-key commands needed to be hard-coded into the command definition which had some drawbacks: * It was easy to forget to write and clear the pending text. * If a command was remapped in a custom config, the pending text would still show the old key. With this change, pending text is automatically tracked based on the key events that lead to the command being executed. This works even when the command is remapped in config and when the on-next-key callback is nested under some key sequence (for example `mi`).
* Change focus to modified docs on quit (#3872)A-Walrus2022-10-03
| | | | | | | | | | | | | | | | | | * Change focus to modified docs on quit When quitting with modified documents, automatically switch focus to one of them. * Update helix-term/src/commands/typed.rs Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com> * Make it work with buffer-close-all and the like * Cleanup Use Cow instead of String, and rename DoesntExist -> DoesNotExist Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
* Add option to skip the first indent guide (#3819)Robin2022-10-03
| | | | | | | | | | | | | | | | | | | | | | | * Add option to skip the first indent guide * reorder skip_first option * change indent-guides.skip_first to a number * rename skip -> skip_levels * add skip_levels to the book * Update book/src/configuration.md Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com> * Update helix-term/src/ui/editor.rs Co-authored-by: Michael Davis <mcarsondavis@gmail.com> Co-authored-by: Robin <robinvandijk@klippa.com> Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com> Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Find workspace from document path (#3553)ath32022-10-03
|
* feat(statusline): add option to show total line numbers in file (#3960)Joshua Pauline2022-10-03
| | | | | * feat(statusline): add option to show total line numbers in file * feat(line numbers): add config to doc book
* Add configureable statusline mode names (#3311)PeepNSheep2022-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added 'long-mode' statusline element * Added customizable statusline mode names * Removed a string clone * Added documentation * Updated documentation, moved modenames to a seperate section * Update configuration.md * Documentation update * Documentation update * Documentation update * Update configuration.md * Update configuration.md * Fixed merge error * Update configuration.md * Update configuration.md
* Inherit theme (#3067)Christoph Schmidler2022-10-03
| | | | | | | | | | | | | | | | | | | * Add RawTheme to handle inheritance with theme palette * Add a intermediate step in theme loading it uses RawTheme struct to load the original ThemePalette, so we can merge it with the inherited one. * Load default themes via RawThemes, remove Theme deserialization * Allow naming custom theme same as inherited one * Remove RawTheme and use toml::Value directly * Resolve all review changes resulting in a cleaner code * Simplify return for Loader::load * Add implementation to avoid extra step for loading of base themes
* Add goto preview (#2982)Joe2022-10-03
|
* build(deps): bump once_cell from 1.14.0 to 1.15.0 (#3987)dependabot[bot]2022-09-26
| | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Re-sort diagnostics after transaction transform (#3895)Michael Davis2022-09-20
| | | | | | | | Applying document-change transactions to diagnostic ranges is not stable with respect to the ordering of diagnostics. This can cause diagnostics to become temporarily unordered with some edits to a document, which can eventually break some invariants/assumptions in syntax::merge. With this change, Document::diagnostics are always sorted.
* Switch to Result for invalid languageA-Walrus2022-09-10
|
* Add error handling to set language commandA-Walrus2022-09-10
| | | | | If you type a nonexistant language an appropriate message will show, and the language won't be changed.
* Remove LspNotDefined, instead return an Option<>Blaž Hrastnik2022-09-07
|
* Handle formatter errors, and save anyway (#3684)A-Walrus2022-09-07
| | | If formatting fails, report error to log and save without formatting.
* build(deps): bump once_cell from 1.13.1 to 1.14.0 (#3715)dependabot[bot]2022-09-05
| | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Look for the external formatter before invoking it (#3670)Michael Davis2022-09-04
| | | | | | | | Currently it is not possible to save a file with a language that has an external formatter configuration unless the external formatter is installed, even if the language has a Language Server configuration capable of auto-format. This change checks that the external formatter exists before using it to create a formatting callback.
* Fix cargo doc warnings, and add GitHub action to ensure it (#3650)A-Walrus2022-09-03
|
* Expand doc/view macros to allow fetching specific idBlaž Hrastnik2022-09-03
| | | | This simplifies the code and hides away unwraps
* initial implementation of bufferline (#2759)aaron4042022-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation of bufferline * fixed lint * changed to 'bufferline', added enum for config modes, some cleanup * fixed lint * added file modification indicator * removed redundant code, added proper themeing with fallback, changed 'file modified' indicator * remove commented code * Update helix-term/src/ui/editor.rs simplify text and offset computation Co-authored-by: Gokul Soumya <gokulps15@gmail.com> * add ui.bufferline.background key for themes Co-authored-by: lazytanuki <43273245+lazytanuki@users.noreply.github.com> * address PR comments * Update helix-term/src/ui/editor.rs * simplify computation of editor area: * change to set_stringn to avoid overflow * Update configuration.md Updates documentation to reflect decision re: defaulting to never showing bufferline. * addressed pr comments * fix build error * address pr comments * revert accidental change Co-authored-by: Gokul Soumya <gokulps15@gmail.com> Co-authored-by: lazytanuki <43273245+lazytanuki@users.noreply.github.com> Co-authored-by: Seth Bromberger <sbromberger@users.noreply.github.com>
* Fix closing buffer with custom keymap (#3633)A-Walrus2022-09-01
| | | | | * Fix closing buffer with custom keymap * Add comment explaining if
* Make mode editor-wide rather than per-documentBlaž Hrastnik2022-09-01
|
* fix: Don't translate mouse up events as downBlaž Hrastnik2022-08-31
|
* 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.
* Allow less than and greater than in macros (#3556)A-Walrus2022-08-30
| | | | | * Allow less than and greater than in macros * Fix failing test
* Add bracketed paste (#3233)Charlie Groves2022-08-29
|
* Add wezterm to get_terminal_provider (#3588)unrelentingtech2022-08-29
| | | https://github.com/wez/wezterm is a terminal emulator with its own built-in multiplexer
* fix: Reset document mode when losing focusBlaž Hrastnik2022-08-23
| | | | Fixes #3090
* Editor: remove duplication for view focus/swap commandsBlaž Hrastnik2022-08-23
|
* Update to crossterm-0.25 (#3390)Charlie Groves2022-08-22
|
* One more windows fix...Blaž Hrastnik2022-08-22
|
* Fix compilation on windowsBlaž Hrastnik2022-08-22
|
* Make external terminal provider configurableBlaž Hrastnik2022-08-22
| | | | Fixes #1699
* 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.
* 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>
* Fix comment (#3334)Kyle L. Davis2022-08-06
|
* Resolve clippy lints (#3307)Omnikar2022-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>
* Fix LF line-endings (#3316)Charlie Groves2022-08-03
|
* 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>
* clipboard: add logging and healthcheck (#3271)Amit Beka2022-07-31
| | | | | | | * add logging to clipboard setup * healthcheck: add clipboard provider name Co-authored-by: amitbeka <--->
* 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
* Rename padding to spacer, remove by defaultBlaž Hrastnik2022-07-26
|
* Make gutters padding automatic (#3163)Ivan Tham2022-07-26
| | | | Remove padding gutter type, and automatically add 1 padding if gutters is non-empty.
* add spacer element to statusline (#3165)Seth Bromberger2022-07-26
| | | | | * add spacer element to statusline * docs
* Fix different document panic (#3160)Kyle L. Davis2022-07-23
| | | Would panic when given the view for the current document for a different document.
* Indent with tabs by default (#3095)Mr. E2022-07-22
|
* 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>