Commit graph

2994 commits

Author SHA1 Message Date
Blaž Hrastnik
425de09d21 Fix tests again 2022-06-27 17:35:23 +09:00
Blaž Hrastnik
24f03097e3 Remove some more unwraps 2022-06-27 17:27:44 +09:00
Blaž Hrastnik
33d287a9ad Add a default cursorline style for the primary selection 2022-06-27 17:27:24 +09:00
Tobias Menzi
8dc86beabd
Implement cursorline (#2170)
* Implement cursorline

* Binary search possible lines
2022-06-27 17:09:34 +09:00
Gokul Soumya
a26943de4e
Right align scrollbar with track in completion popup (#2754)
- Align the scollbar to the right edge of the popup rather than at
  a margin of one.
- Add a scrollbar track and a new scope `ui.menu.scroll`.
2022-06-27 16:52:31 +09:00
Ramojus
c113531db9
add meliora theme (#2884) 2022-06-26 23:40:08 -05:00
Kihaya Sugiura
24351c20d4
languages: Fix ruby rakefile and gemfile file type (#2875) 2022-06-26 12:04:53 -05:00
Gokul Soumya
16ccc7ead8
Add single width left margin for completion popup (#2728)
* Add single width left margin for completion popup

* Clear with ui.menu style before rendering menu

When rendering a completion popup, the popup component will clear
the area with ui.popup and then the menu component would draw over
it using a table component. We remove the left edge of the area
before passing it to the table component (so that it will be left
as padding), and the table component uses ui.menu as the style.
If ui.menu and ui.popup are different the left edge of the popup
will look different from the rest of the popup. We avoid this by
clearing the whole area with ui.menu in Menu::render
2022-06-26 17:56:35 +09:00
Amit Beka
ba85779902
book: fix the description of dot repeat (#2878)
Co-authored-by: amitbeka <--->
2022-06-25 15:28:26 -05:00
Triton171
e1b1a5ebc0
Fix edge-case in tree-sitter expand_selection selection command (#2877)
Co-authored-by: Triton171 <triton0171@gmail.com>
2022-06-25 13:12:30 -05:00
two-six
18435899b2
[Theme] Acme (#2876) 2022-06-25 12:09:04 -05:00
Hekno25
33e6df8707
feat: add wgsl_analyzer as wgsl language server (#2872) 2022-06-24 16:21:26 -05:00
Saber Haj Rabiee
3dbad0442f
fixes showing the last prompt on empty input (#2870) 2022-06-24 17:14:48 +02:00
Michael Davis
d948ace67b
check selection's visible width when copying on mouse click (#2711)
* check selection's visible width when copying on mouse click

Mouse-click-up copies the selection produced by dragging. The event
is ignored if the selection has a width of 1 though so you don't
copy when clicking rather than dragging. The current check copies
text when it has a visible width of 1 but is actually multiple
characters in the rope like a CRLF line-ending. With this change
we check the unicode width of the character(s) in the selection
rather than the range length, so clicking on a CRLF line-ending
does not copy.

* use range.fragment to simplify getting the primary selection width
2022-06-24 22:58:04 +09:00
farwyler
886cff3bcc
Redetect indent and line endings after language server replaces documents (#2778)
* redetect indent and line endings after language server replaces document

* removes nested if

* always redetect indent and line endings after format

This reverts commit 764d14f55894dc7213e48022dfa0f91829b8ef59.
2022-06-24 22:56:18 +09:00
Seth Bromberger
c107f4ea49
fixes #2856 by resetting style on diagnostic (#2861) 2022-06-22 20:53:36 +02:00
Gokul Soumya
301065fe4d
Fix scrollbar length proportional to total menu items (#2860)
The scrollbar length used to increase with more entries in the menu,
which was counter-intuitive to how scrollbars worked in most
applications. Turns out there was a typo in the floor division
implementation :)
2022-06-23 03:00:12 +09:00
Erin van der Veen
b365f2d614
update tree-sitter-nickel to include ' in ident (#2859)
see https://github.com/nickel-lang/tree-sitter-nickel/pull/9
and  https://github.com/tweag/nickel/pull/737
2022-06-22 20:01:54 +09:00
Yusuf Bera Ertan
8c86cd56cb build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
dependabot[bot]
5b3b6ffc9e
build(deps): bump regex from 1.5.4 to 1.5.5 (#2851)
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.5)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-22 03:42:22 +09:00
Blaž Hrastnik
23b5b1e25a Remove a couple more unwraps 2022-06-22 02:26:24 +09:00
Blaž Hrastnik
19dccade7c
Merge pull request #2359 from dead10ck/test-harness
Integration testing harness
2022-06-21 18:59:02 +02:00
Termina94
a17626a822
add history suggest to global search (#2717)
Co-authored-by: Dean Revell <revell@gmail.com>
2022-06-22 01:52:25 +09:00
Gokul Soumya
8e8367eea6
Refactor Margin for fine grained control (#2727) 2022-06-22 01:52:08 +09:00
ath3
ce85b9716d
Enable shellwords for Windows (with escaping disabled) (#2767) 2022-06-22 01:48:01 +09:00
Gokul Soumya
8b67acf130
Format keys identically in statusline and command palette (#2790)
The command palette previously used + as a delimiter for denoting
a single key in a key sequence, (like C+w). This was at odds with
how the statusline displayed them with pending keys (like <C-w>).
This patch changes the palette formatting to the statusline formatting
2022-06-22 01:46:50 +09:00
Gokul Soumya
8ad0b83e30 Make indent guides configurable 2022-06-21 18:43:25 +02:00
Gokul Soumya
924b4ebb39 Add theme scopes for indent guides 2022-06-21 18:43:25 +02:00
Gokul Soumya
8c4c923e80 Add indent guides support 2022-06-21 18:43:25 +02:00
Blaž Hrastnik
458b89e21d
Merge branch 'master' into test-harness 2022-06-21 18:38:21 +02:00
Matthew Toohey
6a3f7f2c39
feat: make move_vertically aware of tabs and wide characters (#2620)
* feat: make `move_vertically` aware of tabs and wide characters

* refactor: replace unnecessary checked_sub with comparison

* refactor: leave pos_at_coords unchanged and introduce separate pos_at_visual_coords

* style: include comment to explain `pos_at_visual_coords` breaking condition

* refactor: use `pos_at_visual_coords` in `text_pos_at_screen_coords`

* feat: make `copy_selection_on_line` aware of wide characters
2022-06-22 01:36:36 +09:00
Mathspy
fa4934cff9
Default rulers color to red (#2669)
* Default rulers color to red

Currently if the theme a user is using doesn't have `ui.virtual.rulers`
set and they set up a ruler it just fails silently making it really hard
to figure out what went wrong. Did they set incorrectly set the ruler?
Are they using an outdated version of Helix that doesn't support rulers?

This happened to me today, I even switched to the default theme with
the assumption that maybe my theme just doesn't have the rulers setup
properly and it still didn't work.

Not sure if this is a good idea or not, feel free to suggest better
alternatives!

* Use builtin Style methods instead of Bevy style defaults

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Only default the style if there's no ui or ui.virtual

* Update themes style from ui.virtual to ui.virtual.whitespace

* Revert ui.virtual change in onelight theme

* Prefer unwrap_or_else

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-06-22 01:35:25 +09:00
Michael Davis
9f676dab57 add test textobjects queries for erlang,gleam,go,python,rust 2022-06-21 11:32:03 -05:00
Connor Lay (Clay)
67f6c85792 text-objects: add test capture & elixir queries 2022-06-21 11:32:03 -05:00
A-Walrus
43027d9104
Display highest severity diagnostic in gutter (#2835)
* Display highest severity diagnostic in gutter

* Improve gutter diagnostic performance

Very slight improvement (doesn't really make a difference), iterates over the diagnostics of the line
once instead of twice.

* Add comment justifying unwrap
2022-06-21 08:09:43 +05:30
dependabot[bot]
009f8c4d3b
build(deps): bump anyhow from 1.0.57 to 1.0.58 (#2843)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.57...1.0.58)

---
updated-dependencies:
- dependency-name: anyhow
  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>
2022-06-21 08:08:45 +05:30
Michael Davis
0ad10ce6f7
rewrite language configuration docs (#2838)
This change moves the configuration tables from the Adding
Languages guide into the overall Languages section. It also
adds more detailed documentation on the `language-server`
configuration key and fixes a typo in the "mylang" example
(the scope was `scope.mylang` instead of `source.mylang`).
2022-06-21 01:15:50 +02:00
Mathis Brossier
8c64c3dfa3
mouse selection now uses character indexing (#2839) 2022-06-20 20:41:34 +02:00
farwyler
cad4e03a00
adds missing tree-sitter-comment injection for js/ts (#2763) 2022-06-20 10:55:51 -05:00
lazytanuki
55f4f69515
fix: do not color health summary when stdout is piped (#2836)
* fix: do not color health summary when stdout is piped

* fix: use crossterm instead of is-terminal
2022-06-20 17:07:32 +02:00
Joe
e2878a6e21
Add noctis bordo theme (#2830) 2022-06-20 09:21:21 -05:00
Skyler Hawthorne
5f7c247430 replace phrase in tests 2022-06-19 00:00:31 -04:00
Skyler Hawthorne
665286c199 factor new Application with file arg to function 2022-06-19 00:00:31 -04:00
Skyler Hawthorne
65bf6836b7 update docs for integration tests 2022-06-19 00:00:31 -04:00
Skyler Hawthorne
086b63ab1b add integration-test cargo alias 2022-06-18 23:57:47 -04:00
Skyler Hawthorne
41bf1d5811 fix(command): write-quit: do not quit if write fails
During write-quit, if the file fails to be written for any reason, helix
will still quit without saving the changes. This fixes this behavior by
introducing fallibility to the asynchronous job queues. This will also
benefit all contexts which may depend on these job queues.

Fixes #1575
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
fac36bc5ea add test for write-quit happy path 2022-06-18 23:57:47 -04:00
Skyler Hawthorne
7c0bca186c rename test helpers 2022-06-18 23:57:47 -04:00
Skyler Hawthorne
526c9be8ca consolidate idle timer logic, make conditional 2022-06-18 23:57:47 -04:00
Skyler Hawthorne
374724f5ac ignore failing write path tests until fixes are merged 2022-06-18 23:57:47 -04:00