Commit graph

3967 commits

Author SHA1 Message Date
Poliorcetics
45e038f4d5
nit: remove a String allocation that is immediately used as an &str (#4277) 2022-10-14 17:35:00 -05:00
Nathaniel Graham
e80beaa7b0
Changed Selection Yank Message (#4275)
Co-authored-by: Nathaniel Graham <ngraham@protonmail.com>
2022-10-14 12:51:15 -05:00
Dario Oddenino
2d958d6c50
Add support for Purescript language (#4242) 2022-10-14 11:57:52 -05:00
IrishMaestro
13d81b7478
Created heisenberg theme for helix editor (#4209) 2022-10-13 20:35:02 -05:00
Chickenkeeper
b4e795d704
Fix C++ syntax highlighting, and improve C & WGSL highlighting (#4079) 2022-10-13 20:31:32 -05:00
Ben Lee-Cohen
cf4a5cca96
Monokai Pro Octagon statusline modes (#4247) 2022-10-13 20:26:03 -05:00
Pascal Kuthe
66a49080bc
merge underline-style and underline-color into a single table 2022-10-13 19:03:58 +02:00
Tim Siegel
5077ce76b3 tutor: Normalize key names, capitalization, etc. 2022-10-12 18:12:54 -05:00
Tim Siegel
425df93fb8 book: Refer to keys by key names, not representations
This is an attempt to clean up the inconsistent way that keys are
written in various places. These rules require the fewest changes to the
existing text.

Use the "Key name", as defined in remapping.md, which uses
"Some-Modifiers-PascalCaseKey". The "Representation", which uses
"S-M-lowercasekey", is only used for configuration entries.

For key combinations which do not present a popup, just present the keys
one after the other, with no intervening space, like `]p`.

For key combinations which present a popup, separate them with ` + `,
like `Space + f`.

The Ctrl modifier is called Ctrl, not Control.
2022-10-12 18:12:54 -05:00
Tim Siegel
e542f2e08f tutor: Minor grammar fix
No need to say additionally, as well, also, etc. One is enough.
2022-10-12 18:12:54 -05:00
Tim Siegel
f5f4d3dc2a tutor: Clarify forward reference to "primary selection" 2022-10-12 18:12:54 -05:00
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.
2022-10-12 18:12:54 -05:00
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.
2022-10-12 18:12:54 -05:00
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.
2022-10-13 00:57:40 +09:00
Armin Ronacher
7f75458e6f
Fix some commands not showing names in palette (#4223) 2022-10-12 09:02:10 -05:00
Lennard Hofmann
a24fae3b3c
Update tree-sitter-lua and add textobjects for Lua (#3552) 2022-10-12 08:45:56 -05:00
Graic
68909dcef4
Fix append cursor location when selection anchor is at end of document (#4147) 2022-10-12 08:34:35 -05:00
Pascal Kuthe
963a0ac0bb
fix terminfo detection 2022-10-12 11:33:48 +02:00
Jacob Kiesel
c54a0363bb
Rearrange README.md slightly (#4206) 2022-10-11 18:54:18 -05:00
Brian Orwe
f4d96b2ca3
Fix confusion with using --hsplit --vsplit on startup at same time (#4202) 2022-10-11 09:25:42 -04:00
Pascal Kuthe
328c4d002f
adress review comments 2022-10-11 12:11:33 +02:00
Daniel Ebert
081327695f Rename extend indent captures.
Clarify comments in indent code.
2022-10-11 16:48:04 +09:00
Daniel Ebert
dc443487d4 Slightly change the behavior of the @stop-extend capture.
This improves the behavior in case of multiple nested extensions.
2022-10-11 16:48:04 +09:00
Daniel Ebert
2b02785f19 Improve code style for tree-sitter indentation.
Split extend logic into a separate file.
2022-10-11 16:48:04 +09:00
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. 2022-10-11 16:48:04 +09:00
Triton171
1ceecbd062 Fix clippy warning. 2022-10-11 16:48:04 +09:00
Triton171
8f19956218 Add python indentation support to docs.
Document @extend-indented and @stop-extend captures for indent queries.
2022-10-11 16:48:04 +09:00
Triton171
3ab9abb642 Add extend-indented and stop-extend captures for indent queries.
Improve and re-enable python indent queries.
2022-10-11 16:48:04 +09:00
Alex
8c4ae4df1c
update everforest theme (#3998) 2022-10-11 16:43:52 +09:00
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
2022-10-11 15:48:55 +09:00
Pascal Kuthe
543d75da23
do not reparse unmodified injections (#4146) 2022-10-11 15:48:12 +09:00
Alexis (Poliorcetics) Bourget
b58899bc8e fix: remove unneeded allocations when calling helix_view::Info::new 2022-10-11 15:47:11 +09:00
Alexis (Poliorcetics) Bourget
28cb89eadb chore: fix clippy linting 2022-10-11 15:47:11 +09:00
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.
2022-10-11 15:46:47 +09:00
Pascal Kuthe
1a87cbd508 remove filterting with C-space from picker 2022-10-11 12:25:28 +09:00
Pascal Kuthe
7af599e0af Treat space as a seperator instead of a character in fuzzy picker 2022-10-11 12:25:28 +09:00
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.
2022-10-11 12:17:32 +09:00
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.
2022-10-11 12:17:32 +09:00
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).
2022-10-11 12:17:32 +09:00
Blaž Hrastnik
a85e386298
picker: Highlight the document on idle timeout 2022-10-11 09:53:55 +09:00
Gokul Soumya
001858b11f
Propagate idle timeout event to components (#3172) 2022-10-11 09:10:01 +09:00
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>
2022-10-10 18:44:40 -05:00
gbprod
9f36468b15
Change twig tree-sitter grammar (#4176) 2022-10-10 16:27:14 -05:00
Sumit Sahrawat
a079f2c9bd
Add some vertical characters to the editor.indent-guides documentation (#4163)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-10 16:23:14 -05:00
David
7af7dadd17
Add instructions for gnome desktop support using the .desktop file (#4165) 2022-10-10 12:23:36 -05:00
Brandon Dong
530f9e3c53
Fix goto/view center mismatch (#4135) 2022-10-10 12:12:48 -05:00
Chickenkeeper
8e8ba06f60
Improve C# syntax highlighting (#4118) 2022-10-10 12:07:14 -05:00
S1m
d27551d814
Use different cursor color for primary cursor for ayu_mirage (#4140) 2022-10-10 10:26:10 -05:00
Mike Sampson
9b7f349f5c
tutor: 5.5 add missing words (#4160) 2022-10-09 14:15:28 -05:00
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.
2022-10-09 03:28:42 +09:00