aboutsummaryrefslogtreecommitdiff
path: root/helix-view
Commit message (Collapse)AuthorAge
* Filter out language servers which fail to spawn (#8374)woojiq2023-09-26
|
* Allow specifying a different style for diff indicator in vcs gutter. (#8343)Alexis Mousset2023-09-20
| | | | | This allows using a background in diff style (for nice patch file coloring) while keeping the gutter indicator nice (and using appropriate colors).
* Add `insert-final-newline` config option (#8157)Em Zhan2023-09-12
| | | Co-authored-by: Xalfer <64538944+Xalfer@users.noreply.github.com>
* Lower idle-timeout to 250msBlaž Hrastnik2023-09-11
| | | | | | The aim is to make it slow enough it only triggers during a typing pause, but not too slow. Initial value was chosen as a safe slow default but I've been using 250 for a while.
* Fix various typos (#8233)Alexis Mousset2023-09-10
|
* Add tree-sitter-highlight-name command (#8170)Luke Halasy2023-09-10
| | | | | | | | | | | | | | | * 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
* Detect tmux clipboard provider on macOS (#8182)Jonathan LEI2023-09-06
|
* use which on formatter command (#8064)Ezekiel Warren2023-08-30
|
* Rename reset to default (#8114)chtenb2023-08-30
| | | Use `default` instead of `reset`, as this is the conventional name for ANSI codes 39/49. The word `reset` should be reserved for ANSI code `0`, which resets both fg and bg colors at once, while also removing all modifiers. While the code uses the value name `Reset`, this is misleading and should not leak into the user space.
* transition to nucleo for fuzzy matching (#7814)Pascal Kuthe2023-08-30
| | | | | | | | | | | | | | | | | | * 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>
* add `reset` to the color palette (#8083)West2023-08-29
|
* Translate new ScrollLeft/ScrollRight crossterm mouse eventsMichael Davis2023-08-22
|
* build(deps): bump crossterm from 0.26.1 to 0.27.0dependabot[bot]2023-08-22
| | | | | | | | | | | | | | | Bumps [crossterm](https://github.com/crossterm-rs/crossterm) from 0.26.1 to 0.27.0. - [Release notes](https://github.com/crossterm-rs/crossterm/releases) - [Changelog](https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossterm-rs/crossterm/compare/0.26.1...0.27.0) --- updated-dependencies: - dependency-name: crossterm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* create separate timer for redraw requests (#8023)Pascal Kuthe2023-08-21
| | | | | | | | | | | * create separate timer for redraw requests * Update helix-view/src/editor.rs Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Remove unnecessary `Err` from `get_canonicalized_path` (#8009)nkitsaini2023-08-20
| | | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* build(deps): bump bitflags from 2.3.3 to 2.4.0 (#7943)dependabot[bot]2023-08-15
| | | | | | | | | | | | | | | | Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.3.3 to 2.4.0. - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/2.3.3...2.4.0) --- updated-dependencies: - dependency-name: bitflags 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>
* Make editor remember the latest search register (#5244)Jonathan LEI2023-08-14
|
* Update stale commentstheteachr2023-08-14
| | | | Obsoleted by https://github.com/helix-editor/helix/pull/4731
* Detect non-existent files as non-readonly (#7875)Michael Davis2023-08-08
|
* Align view for background buffer opened with `alt-ret` (#7691)woojiq2023-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(picker): `alt-ret' changes cursor pos of current file, not new one Closes #7673 * fix other pickers * symbol pickers * diagnostick pickers This is done using the already patched `jump_to_location` method. * fix global and jumplist pickers * use `view` as old_id; make `align_view` method of `Action` * test(picker): basic <alt-ret> functionality * fix: picker integrational test * fix nit Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Show whether file readonly in statusline (#7740)Connortsui202023-08-08
|
* Skip rendering gutters when gutter width exceeds view width (#7821)Anshul Dalal2023-08-08
|
* feat: smart_tabSkyler Hawthorne2023-08-01
| | | | | | Implement `smart_tab`, which optionally makes the tab key run the `move_parent_node_start` command when the cursor has non- whitespace to its left.
* Reimplement clipboard commands in terms of special regsMichael Davis2023-07-31
| | | | | | | | | | Since the clipboard provider now lives on the Registers type, we want to eliminate it from the Editor. We can do that and clean up the commands that interact with the clipboard by calling regular yank, paste and replace impls on the clipboard special registers. Eventually the clipboard commands could be removed once macro keybinding is supported.
* Preview the latest value for regular registersMichael Davis2023-07-31
| | | | | | | | | | | | | | | | | | | | | | | This fixes a discrepancy between regular registers which are used for yanking multiple values (for example via `"ay`) and regular registers that store a history of values (for example `"a*`). Previously, the preview shown in `select_register`'s infobox would show the oldest value in history. It's intuitive and useful to see the most recent value pushed to the history though. We cannot simply switch the preview line from `values.first()` to `values.last()`: that would fix the preview for registers used for history but break the preview for registers used to yank multiple values. We could push to the beginning of the values with `Registers::push` but this is wasteful from a performance perspective. Instead we can have `Registers::read` return an iterator that returns elements in the reverse order and reverse the values in `Register::write`. This effectively means that `push` adds elements to the beginning of the register's values. For the sake of the preview, we can switch to `values.last()` and that is then correct for both usage- styles. This also needs a change to call-sites that read the latest history value to switch from `last` to `first`.
* Use refactored Registers typeMichael Davis2023-07-31
| | | | | | | This is an unfortunately noisy change: we need to update virtually all callsites that access the registers. For reads this means passing in the Editor and for writes this means handling potential failure when we can't write to a clipboard register.
* Add system & primary clipboards as special registersMichael Davis2023-07-31
| | | | | | | | | | | | | | These special registers join and copy the values to the clipboards with '*' corresponding to the system clipboard and '+' to the primary as they are in Vim. This also uses the trick from PR6889 to save the values in the register and re-use them without joining into one value when pasting a value which was yanked and not changed. These registers are not implemented in Kakoune but Kakoune also does not have a built-in clipboard integration. Co-authored-by: CcydtN <51289140+CcydtN@users.noreply.github.com> Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
* Add the '%' (current filename) registerMichael Davis2023-07-31
| | | | | | | | | | This register also comes from Kakoune. It's read-only and produces the current document's name, defaulting to the scratch buffer name constant. (Also see PR5577.) Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Add '#' and '.' special registersMichael Davis2023-07-31
| | | | | | | | | | | | | | | | | | These come from Kakoune: * '#' is the selection index register. It's read-only and produces the selection index numbers, 1-indexed. * '.' is the selection contents register. It is also read-only and mirrors the contents of the current selections when read. We switch the iterators returned from Selection's `fragments` and `slices` methods to ExactSizeIterators because: * The selection contents register can simply return the fragments iterator. * ExactSizeIterator is already implemented for iterators over Vecs, so it's essentially free. * The `len` method can be useful on its own.
* Refactor Registers to take EditorMichael Davis2023-07-31
| | | | | | | | | | | | | | | | | | | | | | This sets up a new Registers type that will allow us to expand support for special registers. (See the child commits.) We start simple with the regular (`Vec<String>`) registers and the simplest special register, the black hole. In the child commits we will expand these match arms with more special registers. The upcoming special registers will need a few things that aren't possible with the current Registers type in helix-core: * Access to the `Editor`. This is only necessary when reading from registers, so the `&Editor` parameter is only added to `Registers::read`. * Returning owned values. Registers in helix-core returns references to the values backed by the `Vec<String>` but future special registers will need to return owned values. We refactor the return value of the read operations to give `Cow<str>`s and iterators over those. * Returning a `Result` for write/push functions. This will be used by the clipboard special registers.
* Prefer RopeSlice to &Rope in helix_core::syntaxMichael Davis2023-07-27
| | | | | | | | | | | | | | | Pascal and I discussed this and we think it's generally better to take a 'RopeSlice' rather than a '&Rope'. The code block rendering function in the markdown component module is a good example for how this can be useful: we can remove an allocation of a rope and instead directly turn a '&str' into a 'RopeSlice' which is very cheap. A change to prefer 'RopeSlice' to '&Rope' whenever the rope isn't modified would be nice, but it would be a very large diff (around 500+ 500-). Starting off with just the syntax functions seems like a nice middle-ground, and we can remove a Rope allocation because of it. Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
* Add support for LSP DidChangeWatchedFiles (#7665)Ryan Fowler2023-07-21
| | | | | | | | | | | | | | | | | | | * Add initial support for LSP DidChangeWatchedFiles * Move file event Handler to helix-lsp * Simplify file event handling * Refactor file event handling * Block on future within LSP file event handler * Fully qualify uses of the file_event::Handler type * Rename ops field to options * Revert newline removal from helix-view/Cargo.toml * Ensure file event Handler is cleaned up when lsp client is shutdown
* allow for higher F keys to be used (#7672)Christian Holman2023-07-19
|
* (Updated) Apply motion API refinements (#6078)Gabriel Hansson2023-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * _apply_motion generalization where possible API encourages users to not forget setting `editor.last_motion` when applying a motion. But also not setting `last_motion` without applying a motion first. * (rename) will_find_char -> find_char method name makes it sound like it would be returning a boolean. * use _apply_motion in find_char Feature that falls out from this is that repetitions of t,T,f,F are saved with the context extention/move and count. (Not defaulting to extend by 1 count). * Finalize apply_motion API last_motion is now a private field and can only be set by calling Editor.apply_motion(). Removing need (and possibility) of writing: `motion(editor); editor.last_motion = motion` Now it's just: `editor.apply_motion(motion)` * editor.last_message: rm Box wrap around Arc * Use pre-existing `Direction` rather than custom `SearchDirection`. * `LastMotion` type alias for `Option<Arc<dyn Fn(&mut Editor)>>` * Take motion rather than cloning it. Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * last_motion as Option<Motion>. * Use `Box` over `Arc` for `last_motion`. --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* use redraw handle for debouncing LSP messages (#7538)Pascal Kuthe2023-07-07
|
* Fix incorrect gutter bail message (#7534)Tom Taylor2023-07-07
|
* correctly map unsorted positions (#7471)Pascal Kuthe2023-06-28
| | | | | | | | | | | * correctly map unsorted positions * Fix typo Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Mark buffers created from stdin as modified (#7431)Michael Davis2023-06-26
| | | | | | | | | This resolves some confusing behavior where a scratch document created by piping into hx is discarded when navigating away from that document. We discard any scratch documents that are not modified and the original `Editor::new_file_from_stdin` would create unmodified documents. We refactor this function to create an empty document first and then to apply the text from stdin as a change.
* fix: Regression from d491e234f4eb4d8c3869f44ab71fedf022dc463eBlaž Hrastnik2023-06-26
|
* map positions through changes in O(N)Pascal Kuthe2023-06-25
|
* Allow ANSI colors in themes (#5119)tomleb2023-06-19
|
* Use default line ending in open command (#7357)Alex2023-06-17
|
* Add config for default line ending (#5621)Alex2023-06-16
|
* add config option for instant completion entry preview (defaulting to true).Luca Schlecker2023-06-09
| | | | Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
* Add register statusline element (#7222)spectre2562023-06-08
|
* Place `Info::from_keymap()` contents in `keymap.infobox()`:gibbz002023-06-07
| | | | | This makes it easier later control the order in which the key events are presented.
* Keymap infobox: Idiomatic body tuple.gibbz002023-06-07
| | | | | | | Does not change any behavior other than making the tuple slightly more idiomatic. Keymap infobox shows key events, then the respective description. This commit makes sure that order is used from the get go, rather than flipping it midway.
* build(deps): bump once_cell from 1.17.2 to 1.18.0 (#7248)dependabot[bot]2023-06-06
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump bitflags from 2.2.1 to 2.3.1 (#7117)dependabot[bot]2023-05-23
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Apply all review suggestions (doc_id -> id, error message, unnecessary if)Philipp Mildenberger2023-05-18
| | | | Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>