Commit Graph

3563 Commits (55b50d9e8368793d764d36c0f363f31252900b87)
 

Author SHA1 Message Date
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>
2 years ago
Michael Davis 9f676dab57 add test textobjects queries for erlang,gleam,go,python,rust 2 years ago
Connor Lay (Clay) 67f6c85792 text-objects: add test capture & elixir queries 2 years ago
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
2 years ago
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>
2 years ago
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`).
2 years ago
Mathis Brossier 8c64c3dfa3
mouse selection now uses character indexing (#2839) 2 years ago
farwyler cad4e03a00
adds missing tree-sitter-comment injection for js/ts (#2763) 2 years ago
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
2 years ago
Joe e2878a6e21
Add noctis bordo theme (#2830) 2 years ago
Skyler Hawthorne 5f7c247430 replace phrase in tests 3 years ago
Skyler Hawthorne 665286c199 factor new Application with file arg to function 3 years ago
Skyler Hawthorne 65bf6836b7 update docs for integration tests 3 years ago
Skyler Hawthorne 086b63ab1b add integration-test cargo alias 3 years ago
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
3 years ago
Skyler Hawthorne fac36bc5ea add test for write-quit happy path 3 years ago
Skyler Hawthorne 7c0bca186c rename test helpers 3 years ago
Skyler Hawthorne 526c9be8ca consolidate idle timer logic, make conditional 3 years ago
Skyler Hawthorne 374724f5ac ignore failing write path tests until fixes are merged 3 years ago
Skyler Hawthorne 8d8d389536 rename top level module to satisfy cargo fmt 3 years ago
Skyler Hawthorne acf931709a use a read only file to ensure write failure 3 years ago
Skyler Hawthorne ef8fe5a5ce use system's appropriate line ending 3 years ago
Skyler Hawthorne 28e94fb261 need the full languages config for integration tests 3 years ago
Skyler Hawthorne 4e34ee7d2e don't read from stdin for integration tests 3 years ago
Skyler Hawthorne cb0440be85 use env var for integration test log level 3 years ago
Skyler Hawthorne 652cdda833 use test terminal backend for integration tests 3 years ago
Skyler Hawthorne ed950fcc56 Add more context; Editor::open doesn't need to own path 3 years ago
Skyler Hawthorne 1533f48934 use Results in integration tests for more error context 3 years ago
Skyler Hawthorne 2fbf833630 add integration feature to github tests 3 years ago
Skyler Hawthorne 2386c81ebc use idle timer instead of fixed timeout 3 years ago
Skyler Hawthorne 40120967e9 tests for buffer-close 3 years ago
Skyler Hawthorne 07fc80aece tests for serialized writes 3 years ago
Skyler Hawthorne ee705dcb33 use main application event loop
Use the Application's main event loop to allow LSP, file writes, etc
3 years ago
Skyler Hawthorne 36e5809f63 add test for ensuring the initial cursor on a newly opened file 3 years ago
Skyler Hawthorne 267605d147 reorganize tests into groups 3 years ago
Skyler Hawthorne 84bbe6b8f3 refactor helpers, use new test helpers 3 years ago
Skyler Hawthorne 0f3c10a021 Fix initial selection of Document in new view
When a new View of a Document is created, a default cursor of 0, 0 is
created, and it does not get normalized to a single width cursor until
at least one movement of the cursor happens. This appears to have no
practical negative effect that I could find, but it makes tests difficult
to work with, since the initial selection is not what you expect it to be.

This changes the initial selection of a new View to be the width of the
first grapheme in the text.
3 years ago
Skyler Hawthorne 502d3290fb improve test harness
* Use new macro syntax for encoding sequences of keys
* Make convenience helpers for common test pattern
* Use indoc for inline indented raw strings
* Add feature flag for integration testing to disable rendering
3 years ago
Blaž Hrastnik 308cab3e5c Integration testing harness 3 years ago
Blaž Hrastnik adb6cd5376 Simplify handle_terminal_events signature 3 years ago
Skyler Hawthorne 0623a72599 move config parsing back into main 3 years ago
A-Walrus ad15e7b5e8
Add "<<=" operator to Rust syntax highlighting (#2805) 3 years ago
Michael Davis 45ce1ebdb6
embed jsonrpc types from jsonrpc-core crate (#2801)
We should not depend on jsonrpc-core anymore:

* The project just announced it's no longer actively maintained[^1],
  preferring their new implementation in `jsonrpsee`.
* The types are too strict: we would benefit from removing some
  `#[serde(deny_unknown_fields)]` annotations to allow language
  servers that disrespect the spec[^2].
* We don't use much of the project. Just the types out of core.
  These are easy to embed directly into the `helix-lsp` crate.

[^1]: https://github.com/paritytech/jsonrpc/pull/674
[^2]: https://github.com/helix-editor/helix/issues/2786
3 years ago
Clay b13e534b92
HEEx: upgrade version and support new special_attribute node (#2800) 3 years ago
Henry 15807d5f27
simplify some keymap key names follow up tests (#2694) 3 years ago
Grenier Célestin 33ea3eff05
Update theme base16_default (`ui.menu`) (#2794) 3 years ago
nosa 21d12e1487
Restore section spacing in tutor. (#2791) 3 years ago
Gygaxis Vainhardt debd2405d9
views -> buffers in write-all (#2788) 3 years ago
Axot 4d604d3b50
Add clojure language support (#2780)
Co-authored-by: Mateusz Ledwoń <mateusz.ledwon@iteo.com>
3 years ago
nosa 3b1866f959
update tutor (#2716)
* update tutor

* Capitalize "command mode ".

* Update runtime/tutor.txt

Editing mistake.

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

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