aboutsummaryrefslogtreecommitdiff
path: root/helix-view
Commit message (Collapse)AuthorAge
* minor: Silence noisy language server not found error in logBlaž Hrastnik2024-01-24
|
* 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`.
* minor: Silence noisy set_error logBlaž Hrastnik2024-01-24
| | | | Outside of debugging tests, it makes no sense to log this.
* 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).
* make sure to sync views when applying edits to unfocused views (#9173)Gabriel Dinner-David2024-01-09
|
* Normalize `S-<lower-ascii>` keymaps to uppercase ascii (#9213)Michael Davis2024-01-09
|
* Initialize diagnostics when opening a document (#8873)Philipp Mildenberger2024-01-09
|
* don't automatically dismiss zero width diagnostics (#9280)Pascal Kuthe2024-01-09
|
* consistent diagnostic sortingPascal Kuthe2023-12-27
|
* make diagnostics stick to word boundariesPascal Kuthe2023-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diagnostics are currently extended if text is inserted at their end. This is desirable when inserting text after an identifier. For example consider: let foo = 2; --- unused variable Renaming the identifier should extend the diagnostic: let foobar = 2; ------ unused variable This is currently implemented in helix but as a consequence adding whitespaces or a type hint also extends the diagnostic: let foo = 2; -------- unused variable let foo: Bar = 2; -------- unused variable In these cases the diagnostic should remain unchanged: let foo = 2; --- unused variable let foo: Bar = 2; --- unused variable As a heuristic helix will now only extend diagnostics that end on a word char if new chars are appended to the word (so not for punctuation/ whitespace). The idea for this mapping was inspired for the word level tracking vscode uses for many positions. While VSCode doesn't currently update diagnostics after receiving publishDiagnostic it does use this system for inlay hints for example. Similarly, the new association mechanism implemented here can be used for word level tracking of inlay hints. A similar mapping function is implemented for word starts. Together these can be used to make a diagnostic stick to a word. If that word is removed that diagnostic is automatically removed too. This is the exact same behavior VSCode inlay hints eixibit.
* Add config to mark diagnostic sources as persistentPascal Kuthe2023-12-27
|
* Support drawing popup frame (#4313)ath32023-12-19
| | | Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Make the indent heuristic configurableDaniel Ebert2023-12-15
|
* build(deps): bump once_cell from 1.18.0 to 1.19.0 (#9053)dependabot[bot]2023-12-12
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* use workspace inheritance for common version (#8925)Skyler Hawthorne2023-12-05
|
* build(deps): bump url from 2.4.1 to 2.5.0 (#8991)dependabot[bot]2023-12-05
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump clipboard-win from 4.5.0 to 5.0.0 (#8927)dependabot[bot]2023-11-28
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* set Cargo feature resolver to v2 (#8917)Fomalhaut Weisszwerg2023-11-27
| | | | | | | | | | | | | | | | | | | * fix: version of Cargo feature resolver. This commit solve the ambiguity to determin the version of resolver. To get more detail, see the following two documents: - https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions - https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html * unified: Rust edition in all workspaces. Now, the Rust 2021 is available in all workspaces. * fined up: Cargo.toml by using workspace inheritance. To get more detail of the `workspace.package` table, see a following document: - https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table
* update which crate to 5.0.0 (#8902)Davide Ferrero2023-11-25
| | | | | * update which crate to 5.0.0 * update which crate to 5.0.0
* bump MSRV to 1.70.0 (#8877)Cole Helbling2023-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* open urls with goto_file command (#5820)Matouš Dzivjak2023-11-21
| | | | | | | | | | | | | | | | * feat(commands): open urls with goto_file command Add capability for `goto_file` command to open an URL under cursor. Fixes: https://github.com/helix-editor/helix/issues/1472 Superseds: https://github.com/helix-editor/helix/pull/4398 * open files inside helix * address code review * bump deps * fix based on code review comments
* Swap system and primary clipboard registers (#8703)Omnikar2023-11-03
|
* Make parse_macro work for "-" outside "<..>" (#8475)Bjorn Ove Hay Andersen2023-10-12
| | | | | * Translate to when a part of the outher string in * Changed the if a little
* 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`.