Commit Graph

3493 Commits (0571fa4d56a7905da669d637195490dc0f4eacc1)
 

Author SHA1 Message Date
Tim Siegel 0571fa4d56 tutor: Clarify first multi-cursor example
If the reader is unfortunate enough to place the cursor at the beginning
of the line on step #1, subsequent steps will fail.
2 years ago
Tim Siegel 6db39eacd3 tutor: Clarify forward reference to "select command"
The phrase "Like the select command" suggests that the reader has been
introduced to select already. That doesn't happen until the next
chapter.
2 years ago
Michael Davis e16c632760
Apply transactions to the jumplist for undo/redo (#4227)
Undo/redo/earlier/later call `Document::apply_impl` which applies
transactions to the document. These transactions also need to be
applied to the view as in 0aedef0.
2 years ago
Armin Ronacher 7f75458e6f
Fix some commands not showing names in palette (#4223) 2 years ago
Lennard Hofmann a24fae3b3c
Update tree-sitter-lua and add textobjects for Lua (#3552) 2 years ago
Graic 68909dcef4
Fix append cursor location when selection anchor is at end of document (#4147) 2 years ago
Jacob Kiesel c54a0363bb
Rearrange README.md slightly (#4206) 2 years ago
Brian Orwe f4d96b2ca3
Fix confusion with using --hsplit --vsplit on startup at same time (#4202) 2 years ago
Daniel Ebert 081327695f Rename extend indent captures.
Clarify comments in indent code.
2 years ago
Daniel Ebert dc443487d4 Slightly change the behavior of the `@stop-extend` capture.
This improves the behavior in case of multiple nested extensions.
2 years ago
Daniel Ebert 2b02785f19 Improve code style for tree-sitter indentation.
Split extend logic into a separate file.
2 years ago
Triton171 05832f90cb Fix a bug that caused the indent for the line below to also be added in rare cases at the beginning of a file. 2 years ago
Triton171 1ceecbd062 Fix clippy warning. 2 years ago
Triton171 8f19956218 Add python indentation support to docs.
Document @extend-indented and @stop-extend captures for indent queries.
2 years ago
Triton171 3ab9abb642 Add `extend-indented` and `stop-extend` captures for indent queries.
Improve and re-enable python indent queries.
2 years ago
Alex 8c4ae4df1c
update everforest theme (#3998) 2 years ago
Stuart Baker ce2a5b6d9f
Add colours "color-modes" to ayu_light theme (#4109)
* Rename "dark gray" to "light gray"

* Add colours for statusline modes

* Use UI background for inactive panes
2 years ago
Pascal Kuthe 543d75da23
do not reparse unmodified injections (#4146) 2 years ago
Alexis (Poliorcetics) Bourget b58899bc8e fix: remove unneeded allocations when calling helix_view::Info::new 2 years ago
Alexis (Poliorcetics) Bourget 28cb89eadb chore: fix clippy linting 2 years ago
Michael Davis 65febe0cf4
Overlay all diagnostics with highest severity on top (#4113)
Here we separate the diagnostics by severity and then overlay the Vec
of spans for each severity on top of the highlights. The error
diagnostics end up overlaid on the warning diagnostics, which are
overlaid on the hints, overlaid on info, overlaid on any other severity
(default), then overlaid on the syntax highlights.

This fixes two things:

* Error diagnostics are now always visible when overlapped with other
  diagnostics.
* Ghost text is eliminated.
    * Ghost text was caused by duplicate diagnostics at the EOF:
      overlaps within the merged `Vec<(usize, Range<usize>)>` violate
      assumptions in `helix_core::syntax::Merge`.
    * When we push a new range, we check it against the last range and
      merge the two if they overlap. This is safe because they both
      have the same severity and therefore highlight.

The actual merge is skipped for any of these when they are empty, so
this is very fast in practice. For some data, I threw together an FPS
counter which renders as fast as possible and logs the renders per
second.

With no diagnostics, I see an FPS gain from this change from 868 FPS
to 878 (+1.1%) on a release build on a Rust file. On an Erlang file
with 12 error diagnostics and 6 warnings in view (233 errors and 66
warnings total), I see a decrease in average FPS from 795 to 790
(-0.6%) on a release build.
2 years ago
Pascal Kuthe 1a87cbd508 remove filterting with C-space from picker 2 years ago
Pascal Kuthe 7af599e0af Treat space as a seperator instead of a character in fuzzy picker 2 years ago
Michael Davis c388e16e09 Add a helper function for applying transactions
It is easy to forget to call `Document::apply` and/or `View::apply` in
the correct order. This commit introduces a helper function which
closes over both calls.
2 years ago
Michael Davis 0aedef0333 Apply transactions to Views
This change adds View::apply calls for all Document::apply call-sites,
ensuring that changes to a document do not leave invalid entries in
the View's jumplist.
2 years ago
Michael Davis d418f0795d Add View::apply for adjusting jumplist ranges
Applying a transaction to a View adjusts the ranges in the jumplist
to ensure that they remain within the text of the document and follow
regular selection invariants (for example, must be have a width of at
least one).
2 years ago
Blaž Hrastnik a85e386298
picker: Highlight the document on idle timeout 2 years ago
Gokul Soumya 001858b11f
Propagate idle timeout event to components (#3172) 2 years ago
dependabot[bot] 5e1c589d43
build(deps): bump serde_json from 1.0.85 to 1.0.86 (#4187)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
gbprod 9f36468b15
Change twig tree-sitter grammar (#4176) 2 years ago
Sumit Sahrawat a079f2c9bd
Add some vertical characters to the editor.indent-guides documentation (#4163)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
David 7af7dadd17
Add instructions for gnome desktop support using the `.desktop` file (#4165) 2 years ago
Brandon Dong 530f9e3c53
Fix goto/view center mismatch (#4135) 2 years ago
Chickenkeeper 8e8ba06f60
Improve C# syntax highlighting (#4118) 2 years ago
S1m d27551d814
Use different cursor color for primary cursor for ayu_mirage (#4140) 2 years ago
Mike Sampson 9b7f349f5c
tutor: 5.5 add missing words (#4160) 2 years ago
A-Walrus c15f1ea274
Add cursorcolumn (#4084)
* 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.
2 years ago
Brandon Dong 18cfe864f4
Fix incorrect scrolloff default in documentation (#4136) 2 years ago
Oleksii Dorozhkin 4d4be0e880
Update sonokai.toml (#4089) 2 years ago
allanderek 9ca4ac6901
Pallettise the bogster theme and, more importantly, add support for color-modes to the bogster theme. (#4121) 2 years ago
Jonathan 4595683622
Fix tutor typo (#4116) 2 years ago
A-Walrus c927d61791
Fix bugs in search wraparound message (#4101) 2 years ago
Jaden ccb38e7696
doc: add theme inheritance example (#4096) 2 years ago
Poliorcetics ed5febf4b3
doc: add example to disable arrow keys in insert mode (#4088) 2 years ago
dependabot[bot] 581fe5c675
build(deps): bump thiserror from 1.0.36 to 1.0.37 (#4095)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
dependabot[bot] 6b0fffb647
build(deps): bump tokio from 1.21.1 to 1.21.2 (#4094)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
dependabot[bot] 7c33b9c76d
build(deps): bump smallvec from 1.9.0 to 1.10.0 (#4093)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
Skyler Hawthorne 27b70696df
Exit gracefully when close operation fails (#4081)
If the close method fails, the editor will quit before restoring the
terminal. This causes the shell to break if, e.g. the LS times out
shutting down.

This fixes this by always restoring the terminal after closing, and
printing out a message to stderr if there is an error.
2 years ago
Michael Davis 6cca7375ec
Automatically track pseudo-pending text (#4077)
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`).
2 years ago
Karsten Gebbert 9124c231f4
respond to SIGUSR1 by reloading config (#3952)
* respond to SIGUSR1 by reloading config

* document USR1 signal handling
2 years ago