master #5

Merged
Trivernis merged 342 commits from Mirrors/helix:master into master 1 year ago

342 Commits (main)

Author SHA1 Message Date
Aleksey Kuznetsov 2904a10fb1
Add xib and storyboard file types (#6407) 1 year ago
Pascal Kuthe f9a25a7e09 detailed snippet tests 1 year ago
Pascal Kuthe 85c9dbf603 accept bracket snippet variables without default 1 year ago
Pascal Kuthe 47420db516 accept empty snippet regex replace elements 1 year ago
Pascal Kuthe 617f09adc4 fix single-char variable names 1 year ago
Pascal Kuthe cabb746b7d do not fail snippet parsing when control chars are not explicitly escaped 1 year ago
dependabot[bot] 52ced7e85f
build(deps): bump bitflags from 1.3.2 to 2.0.2 (#6387)
* build(deps): bump bitflags from 1.3.2 to 2.0.2

Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.0.2.
- [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/1.3.2...2.0.2)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* deps: Resolve bitflags 2.0 breaking changes

Bitflags 2.0 release made some breaking changes requiring some small
changes to the Helix codebase.

Almost all of the necessary changes are to manually `#[derive(..)]`
trait implementations which are no longer automatically derived for
all bitflags. All of these were previously automatically derived:

    #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy]

I have derived the minimum traits for each bitflag type.

The other change was to the `.bits` field. This is now a `.bits()`
method so the usage of this has been updated in the `Borders` type.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Francesc Elies 05ee673197
Show diagnostic codes for LSP diagnostics (#6378)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Thor Adam 346ddd4735
Add `switch_statement` to ecma indents (#6369) 1 year ago
zetashift 0e0c16e6fa
Add initial Smithy support (#6370) 1 year ago
Kristoffer Flottorp b0ceac608e
fleet-dark improvements (#6375)
Co-authored-by: krfl <kr.fl@outlook.com>
1 year ago
dependabot[bot] 6d5fa2045a
build(deps): bump serde from 1.0.152 to 1.0.158 (#6386)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.158.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.158)

---
updated-dependencies:
- dependency-name: serde
  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>
1 year ago
dependabot[bot] 68cfc1d6ae
build(deps): bump futures-executor from 0.3.26 to 0.3.27 (#6388)
Bumps [futures-executor](https://github.com/rust-lang/futures-rs) from 0.3.26 to 0.3.27.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.26...0.3.27)

---
updated-dependencies:
- dependency-name: futures-executor
  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>
1 year ago
dependabot[bot] 2f4eac28e5
build(deps): bump indoc from 1.0.9 to 2.0.1 (#6385)
Bumps [indoc](https://github.com/dtolnay/indoc) from 1.0.9 to 2.0.1.
- [Release notes](https://github.com/dtolnay/indoc/releases)
- [Commits](https://github.com/dtolnay/indoc/compare/1.0.9...2.0.1)

---
updated-dependencies:
- dependency-name: indoc
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
sarah 28632c6cee
Run shell commands asynchronously (#6373) 1 year ago
not 9eb11214b1
theme(rose-pine): add inlay hints (#6384)
* add `ui.virtual.inlay-hint`

* normalise line endings
1 year ago
Gautam Panchal 3da63fa481
Add instructions for installing via AppImage (#6368) 1 year ago
Skyler Hawthorne 4bdeb9927b migrate test_with_config to use AppBuilder 1 year ago
Skyler Hawthorne d3b051d28e fix test::plain
test::plain uses char indices when it should use byte indices
1 year ago
Skyler Hawthorne 58ea193054 Allow explicit newlines in test DSL
The current test DSL currently has no way to express being at the end of
a line, save for putting an explicit LF or CRLF inside the `#[|]#`. The
problem with this approach is that it can add unintended extra new lines
if used in conjunction with raw strings, which insert newlines for you.

This is a simple attempt to mitigate this problem. If there is an
explicit newline character at the end of the selection, and then it
is immediately followed by the same newline character at the right end
of the selection, this following newline is removed. This way, one can
express a cursor at the end of a line explicitly.
1 year ago
Skyler Hawthorne a264faa98d refactor test editor config 1 year ago
Skyler Hawthorne 1db252913b print doc state during tests 1 year ago
Skyler Hawthorne 5b07ce76fc make TestCase::From more generic 1 year ago
Skyler Hawthorne 8c5ec95ac0 factor write command tests to own module 1 year ago
pithlessly 78613ac0f2
Disable auto-pairing ' by default in OCaml (#6381)
Since OCaml uses 'a syntax for type variables, the editor shouldn't insert a
second ', for the same reason as Rust.
1 year ago
varon 05e7862e8f
Update nord with inlay-hints (#6376) 1 year ago
Aaron Bull Schaefer 203cf1a919
Document `ui.highlight` theme key (#6372)
This scope was added via bf5b9a9f35
1 year ago
exp80 770496511c
Fix highlighting in picker with multiple columns (#6333) 1 year ago
angelodlfrtr ac2a7731a6
Add language support for Cap’n Proto format (#6325) 1 year ago
Sora 9f5374bf47
Update tokyo-night with inlay-hints (#6349) 1 year ago
Yutaro Ohno bd473928ae
theme: update adwaita-dark for bufferline (#6342)
The adwaita-dark theme has no distinction between active and inactive
buffers on a bufferline. Add contrast to clarify differences.
1 year ago
VuiMuich a07655d55b
Update Serika themes for inlay-hints (#6344) 1 year ago
Erasin Wang b20cf15eef
Update queries for makefile (#6339)
- update variable and ref as paramter
- add target as constant
- add inject for shell_text
1 year ago
Ivan Tham 21a3fb8f29
Update ayu theme for inlay-hint (#6329)
Based on vscode ayu badge.
1 year ago
Pascal Kuthe 63c23d4bb0 fix typo
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Pascal Kuthe f87299f1b7 allow empty placeholders 1 year ago
Pascal Kuthe 90348b889f revamped snippet text element parsing
Snippet text elements can contain escape sequences
that must be treated properly. Furthermore snippets
must always escape certain characters (like `}`
or `\`). The function has been updated to account
for that. `text` is now also included with
`anything` to match the grammar and can also
match empty text. To avoid infinite loops the
`non-empty` combinator has been added which is
automatically used in the `one_or_more` and
`zero_or more` combinator where the problemn would
occur.
1 year ago
Pascal Kuthe bbf480007d always parse the entire snippet
Previously any remaining text of the snippet that could not be parsed
was ignored. This commit adds the `parse_all` function which reports
an error if any text was not consumed by the parser
1 year ago
Pascal Kuthe 7bf168dce0 set WorkspaceEditCapabilities correctly 1 year ago
Pascal Kuthe b6a4927f00 discard outdated workspace edits recived from the LS 1 year ago
Pascal Kuthe 3c9d5d0215 discard outdated diagnostics recived by the LS 1 year ago
Thomas Schollenberger 2a27d1b505
Prevent whitespace from rendering inside inlay hints (#6312)
* fix spaces and nbsps showing in inlay hints

* remove origin

* virtual tab + fix unneeded clone

* update virtual tab determining location

* fix clippy lint
1 year ago
Ryan Roden-Corrent aae8f72e2e
Add inlay-hint style for solarized themes. (#6327)
This uses the same color as comments, which is a light gray in both dark and light.
I think it also looks nice with italics.
1 year ago
Erasin Wang fb56a4bb75
Improve tree-sitter queries for vlang (#6279)
- Update hightlight
- add indents
- add textobject
- add injections
1 year ago
Erasin Wang 64c137bd3d
Update gdscript highlight (#6311)
- add gdscript2 type.builtin
- add gdscript2 keyword 'await'
- update label for more note_path
- update function and parmeter
1 year ago
Alexander Brevig 583f6a1337
feat: lint for `ui.virtual` and catch present and future virtual based features (#6320)
* feat: lint for inlay-hint.parameter and .type

* fix: lint against ui.virtual and not the new inlay-hint specifically
1 year ago
Kristoffer Flottorp 35bf54d0b2
adjust inlay hints, color modes and virtual for fleet dark (#6324)
* adjust inlay hints and color modes for fleet dark

* adjust virtual + ruler color

---------

Co-authored-by: krfl <kr.fl@outlook.com>
1 year ago
Alexander Brevig d4c0eca1da
fix: flatwhite with inlay (#6323) 1 year ago
Santiago Vrancovich ad855da12d
Improved file reload error message (#6274) 1 year ago
Jens Getreu 3a4c3598d1
Autumn theme: add gray tone for inlay-hint (#6316)
Co-authored-by: Jens Getreu <getreu@getreu@web.de>
1 year ago
Blaž Hrastnik 75ebc1fcbc
fix compilation 1 year ago
Kyle Smith 27aa919f1c
Only complete appropriate arguments for typed commands. (#5966) 1 year ago
Jonatan Pettersson d479adfdc6
Add undercurl config option #6196 (#6253)
If set to 'true' this option will force terminal undercurl support.
1 year ago
dependabot[bot] 3e03a1a99b
build(deps): bump serde from 1.0.152 to 1.0.155 (#6303)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.155.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.155)

---
updated-dependencies:
- dependency-name: serde
  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>
1 year ago
dependabot[bot] 400697fc68
build(deps): bump gix from 0.39.0 to 0.41.0 (#6306)
Bumps [gix](https://github.com/Byron/gitoxide) from 0.39.0 to 0.41.0.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/gix-v0.39.0...gix-v0.41.0)

---
updated-dependencies:
- dependency-name: gix
  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>
1 year ago
Michael Davis fb4d703b9f Update Nix highlights
* Switch nix grammar repository location to the new repo. The author
  has transferred the repository to 'nix-community'.
* Capture ':' and '...' as 'punctuation.delimiter'.
1 year ago
Michael Davis cdd6c8d91e Update Erlang highlights
* Macros that start with underscore were incorrectly marked as
  'comment.unused' rather than 'keyword.directive' due to an ordering
  issue of those two patterns.
* Recognize escripts as Erlang by the shebang.
1 year ago
Michael Davis bb41a283e6
theme: Use inheritance for gruvbox themes (#6295)
These gruvbox variants were introduced before theme inheritance and
only differ by a few colors. This change cleans up the duplicated
theming with theme inheritance.
1 year ago
dependabot[bot] b558ce7148
build(deps): bump indoc from 2.0.0 to 2.0.1 (#6302)
Bumps [indoc](https://github.com/dtolnay/indoc) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/dtolnay/indoc/releases)
- [Commits](https://github.com/dtolnay/indoc/compare/2.0.0...2.0.1)

---
updated-dependencies:
- dependency-name: indoc
  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>
1 year ago
dependabot[bot] 6c4d14cb4b
build(deps): bump toml from 0.7.2 to 0.7.3 (#6305)
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/toml-rs/toml/releases)
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.2...toml-v0.7.3)

---
updated-dependencies:
- dependency-name: toml
  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>
1 year ago
dependabot[bot] 4d4bb07419
build(deps): bump libc from 0.2.139 to 0.2.140 (#6304)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.139 to 0.2.140.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.139...0.2.140)

---
updated-dependencies:
- dependency-name: libc
  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>
1 year ago
dependabot[bot] a590167533
build(deps): bump chrono from 0.4.23 to 0.4.24 (#6301)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.23 to 0.4.24.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.23...v0.4.24)

---
updated-dependencies:
- dependency-name: chrono
  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>
1 year ago
Ivan 955eb5b2de
queries/php: add missing keywords `unset` and `clone` (#6299) 1 year ago
Francesc Elies d15f9721a5
LSP: Separate diagnostic picker message and code (#6095) 1 year ago
misiasty3 db8e9f5bb2
Check language server symbol renaming support before prompting (#6257)
Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
1 year ago
Josh Bainbridge dc418bb507
Update gruvbox color themes to support inlay hint (#6285)
The gruvbox themes (gruvbox, gruvbox dark hard and guvbox light)
don't provide a colour for the new virtual inlay hints. Looking at the
original repo, and other derivatives, there doesn't appear to be a clear
definition of what inlay hints should be. Although most sources indicate
that it can be the same as the color for comments.

Considering that, this commit sets the new field on each of the three
themes to be gray1, same as commented text.

Signed-off-by: Josh Bainbridge <josh.bainbridge@gmail.com>
1 year ago
Maxwell Anderson 951aecc019
Add molokai theme (#6260) 1 year ago
workingj 66033edeaf
add ui.inlay-hint (#6292) 1 year ago
Cole Helbling 34934733b3
helix-term: send the STOP signal to all processes in the process group (#3546)
* helix-term: send the STOP signal to all processes in the process group

From kill(3p):

    If pid is 0, sig shall be sent to all processes (excluding an unspecified set
    of  system processes) whose process group ID is equal to the process group ID
    of the sender, and for which the process has permission to send a signal.

This fixes the issue of running `git commit`, attempting to suspend
helix with ^Z, and then not regaining control over the terminal and
having to press ^Z again.

* helix-term: use libc directly to send STOP signal

* helix-term: document safety of libc::kill

* helix-term: properly handle libc::kill's failure

I misread the manpage for POSIX `kill` -- it returns `-1` in
the failure case, and sets `errno`, which is retrieved via
`std::io::Error::last_os_error()`, has its string representation printed
out, and then exits with the matching status code (or 1 if, for whatever
reason, there is no matching status code).

* helix-term: expand upon why we need to SIGSTOP the entire process group

Also add a link back to one of the upstream issues.
1 year ago
Michael Davis 4f066b1cc6
LSP: No-op client/registerCapability requests (#6258) 1 year ago
Jonatan Pettersson 1126af53b4
Test indentation level calculation (#6281)
Co-authored-by: Jonatan Pettersson <jonatan.pettersson@proton.me>
1 year ago
Stanisław Borowy 39052433ed
Fix indentation level calculation for lines mixing tabs and spaces (#6278) 1 year ago
Jens Getreu 6e432e8636
Autumn theme: add `ui.virtual.inlay-hint` config (#6280)
The configuration differs between parameters (upright) and types (slanted).
1 year ago
Kirawi db8c86a9a3
dark_plus: theme inlay-hint (#6283)
Taken from the official theme:
```json
"editorInlayHint.background": "#4d4d4dcc",
"editorInlayHint.foreground": "#ffffff",
"editorInlayHint.parameterBackground": "#4d4d4dcc",
"editorInlayHint.parameterForeground": "#ffffff",
"editorInlayHint.typeBackground": "#4d4d4dcc",
"editorInlayHint.typeForeground": "#ffffff",
```
1 year ago
Erasin Wang 221a4ac883
Theme onelight add inlay-hint (#6276)
- fix: add `markup.strikethrough` for theme.md 
- add virtual.inlay-hint
- fix ui.virtual.wrap
- rename light-white to grey-300
1 year ago
Ivan 14f1a62367
theme/catppuccin: add ui.virtual.inlay-hint (#6269) 1 year ago
Jonatan Pettersson f435f3b2e9
Document how to run tests (#6268)
Co-authored-by: Jonatan Pettersson <jonatan.pettersson@proton.me>
1 year ago
Kirawi bb72079743
fleet_dark: theme inlay hints (#6266) 1 year ago
Blaž Hrastnik 81601b1c6c
fix: C++ namespace indentation
fixes #6235
1 year ago
Pascal Kuthe 171d28d2bd
indent snippets to line indent instead of completion start (#6263) 1 year ago
Poliorcetics bdcd4d9411
Feat: LSP Type Hints (#5934)
* misc: missing inline, outdated link

* doc: Add new theme keys and config option to book

* fix: don't panic in Tree::try_get(view_id)

Necessary for later, where we could be receiving an LSP response
for a closed window, in which case we don't want to crash while
checking for its existence

* fix: reset idle timer on all mouse events

* refacto: Introduce Overlay::new and InlineAnnotation::new

* refacto: extract make_job_callback from Context::callback

* feat: add LSP display_inlay_hint option to config

* feat: communicate inlay hints support capabilities of helix to LSP server

* feat: Add function to request range of inlay hint from LSP

* feat: Save inlay hints in document, per view

* feat: Update inlay hints on document changes

* feat: Compute inlay hints on idle timeout

* nit: Add todo's about inlay hints for later

* fix: compute text annotations for current view in view.rs, not document.rs

* doc: Improve Document::text_annotations() description

* nit: getters don't use 'get_' in front

* fix: Drop inlay hints annotations on config refresh if necessary

* fix: padding theming for LSP inlay hints

* fix: tracking of outdated inlay hints should not be dependant on document revision (because of undos and such)

* fix: follow LSP spec and don't highlight padding as virtual text

* config: add some LSP inlay hint configs
1 year ago
Maxicarlos08 3d230e701d
Also highlight unchecked variants of the sqlx query methods (#6256) 1 year ago
Ivan 3907358103
queries/php: add injections for regex and sql injection (#6250) 1 year ago
Dimitar Gyurov 1661e4b5e1
Add a version-control statusline element (#5682) 1 year ago
Philipp Mildenberger 98415f288f
Improved yuck highlighting (and parser), and introduced a tag.builtin scope (#6242) 1 year ago
Pascal Kuthe d63e570e0a treat replace/insertmode consistently, default to insert 1 year ago
Pascal Kuthe b1f7528090 fix snippet bugs and multicursor completion edgecases
Multicursor completions may overlap and therefore overlapping
completions must be dropped to avoid crashes. Furthermore, multicursor
edits might simply be out of range if the word before/after the cursor
is shorter. This currently leads to crashes, instead these selections
are now also removed for completions.

This commit also significantly refactors snippet transaction generation
so that tabstops behave correctly with the above rules. Furthermore,
snippet tabstops need to be carefully mapped to ensure their position
is correct and consistent with our selection semantics. Finally,
we now keep a partially updated Rope while creating snippet
transactions so that we can fill information into snippets that
depends on the position in the document.
1 year ago
Pascal Kuthe 2b64a64d7e Add API to create a Transaction from potentially overlapping changes
This commit adds new functions to `Transaction` that allow creating
edits that might potentially overlap. Any change that overlaps
previous changes is ignored. Furthermore, a utility method is added
that also drops selections associated with dropped changes (for
transactions that are created from a selection).

This is needed to avoid crashes when applying multicursor
autocompletions, as the edit from a previous cursor may overlap
with the next cursor/edit.
1 year ago
Pascal Kuthe cdec933523 avoid allocations during snippet rendering 1 year ago
Pascal Kuthe e91289fda1 Add IntoIterator implementation for Selection 1 year ago
Taylor C. Richberger 9b4326b18b allow LSP insert text to replace non-matching prefixes (#5469)
Most LSPs will complete case-insensitive matches, particularly from
lowercase to uppercase.  In some cases, notably Pyright, this is given
as a simple insert text instead of TextEdit.  When this happens, the
prefix text was left unedited.
1 year ago
paul-scott ce1fb9e64c
Generalised to multiple runtime directories with priorities (#5411)
* Generalised to multiple runtime directories with priorities

This is an implementation for #3346.

Previously, one of the following runtime directories were used:

1. `$HELIX_RUNTIME`
2. sibling directory to `$CARGO_MANIFEST_DIR`
3. subdirectory of user config directory
4. subdirectory of path to helix executable

The first directory provided / found to exist in this order was used as a
root for all runtime file searches (grammars, themes, queries).

This change lowers the priority of `$HELIX_RUNTIME` so that the user
config runtime has higher priority. More significantly, all of these
directories are now searched for runtime files, enabling a user to override
default or system-level runtime files. If the same file name appears
in multiple runtime directories, the following priority is now used:

1. sibling directory to `$CARGO_MANIFEST_DIR`
2. subdirectory of user config directory
3. `$HELIX_RUNTIME`
4. subdirectory of path to helix executable

One exception to this rule is that a user can have a `themes`
directory directly in the user config directory that has higher piority
to `themes` directories in runtime directories. That behaviour has been
preserved.

As part of implementing this feature `theme::Loader` was simplified
and the cycle detection logic of the theme inheritance was improved to
cover more cases and to be more explicit.

* Removed AsRef usage to avoid binary growth

* Health displaying ;-separated runtime dirs

* Changed HELIX_RUNTIME build from src instructions

* Updated doc for more detail on runtime directories

* Improved health symlink printing and theme cycle errors

The health display of runtime symlinks now prints both ends of the
link.

Separate errors are given when theme file is not found and when the
only theme file found would form an inheritence cycle.

* Satisfied clippy on passing Path

* Clarified highest priority runtime directory purpose

* Further clarified multiple runtime details in book

Also gave markdown headings to subsections.

Fixed a error with table indentation not building
table that also appears present on master.

---------

Co-authored-by: Paul Scott <paul.scott@anu.edu.au>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
1 year ago
gibbz00 2cf4ce2356
Fix `shrink_selection` with multiple cursors. (#6093)
* Fix #6092

Cause were some incorrect assumptions that missed an edge case in the
`Selection.contains()` calculation. Tests were added accordingly.

* Fix Selection.contains() edge-case handling.

Removing the len check short-circuit was the only thing needed as
pointed out by @dead10ck.
1 year ago
Pascal Kuthe aabc8af95d correctly store snapshots when repeating insert-mode actions
Repeating completions currently crates a savepoint when a completion
popup was triggered (so after the request completed). Just like for
normal completions the savepoint must be created at the request.

The occurrence of the completion request was previously not saved in
`last_insert`. To that end a new `InsertEvent::RequestCompletion`
variant has been added. When replayed this event creates a snapshot
that is "actived" by the `TriggerCompletion` event and subsequently
used during any `InsertEvent::CompletiuonApply` events.
1 year ago
Pascal Kuthe 8cb7cdfd7a discard stale completion requests
Completion requests are computed asynchronously to avoid common micro
freezes while editing. This means that once a completion request
completes, the state of the editor might have changed. Currently,
there is a check to ensure we are still in insert mode. However,
we also need to ensure that the view and document hasn't changed
to avoid accidentally using a savepoint with the wrong view/document.

Furthermore, the editor might request a new completion while the
previous completion request hasn't complemented yet. This can
lead to weird flickering or an outdated completion request replacing
a newer completion that has already completed (the LSP server
is not required to process completion requests in order). This change
also needed to ensure determinism/linear ordering so that completion
popup always correspond to the last completion request.
1 year ago
Pascal Kuthe e8898fd9a8 store multiple snapshots on the document at once
Fixing autocomplete required moving the document savepoint before the
asynchronous completion request. However, this in turn causes new bugs:

If the completion popup is open, the savepoint is restored when the
popup closes (or another entry is selected). However, at that point
a new completion request might already have been created which
would have replaced the new savepoint (therefore leading to incorrectly
applied complies).

This commit fixes that bug by allowing in arbitrary number of
savepoints to be tracked on the document. The savepoints are reference
counted and therefore remain valid as long as any reference to them
remains. Weak reference are stored on the document and any reference
that can not be upgraded anymore (hence no strong reference remain)
are automatically discarded.
1 year ago
Pascal Kuthe 2588fa3710 save selection before completion savepoint
Currently, the selection is not saved/restored when completion
checkpoints are applied. This is usually fine because undoing changes
usually restores maps selections back in insert mode. But this is not
always the case and especially problematic in the presence of
multi-cursor completions (since completions are applied relative to
the selection/cursor) and snippets (which can change the selection)
1 year ago
Pascal Kuthe 4300a3ad05 create savepoint before requesting completion 1 year ago
workingj bc23e54805
feat(theme): Update pop-dark statusline (#6227)
* update pop-theme for color-modes

* fixed ui.statusline.select not worrking

* adjustments for nicer statusline visuals

* added status line color
1 year ago
gibbz00 34be71fb50
Theme - auy_evolve: Up bufferline fg brightness (#6225)
Currently a bit hard to discern inactive and active buffers in a
brighter environment.
1 year ago
Kyle Smith 44ff8a1df1
LSP: Support textDocument/prepareRename (#6103)
* LSP: Support textDocument/prepareRename

'textDocument/prepareRename' can be used by the client to ask the
server the range of the symbol under the cursor which would be changed
by a subsequent call to 'textDocument/rename' with that position.

We can use this information to fill the prompt with an accurate prefill
which can improve the UX for renaming symbols when the symbol doesn't
align with the "word" textobject. (We currently use the "word"
textobject as a default value for the prompt.)

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

* clippy fixes

* rustfmt

* Update helix-term/src/commands/lsp.rs

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

* Update helix-term/src/commands/lsp.rs

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

* fix clippy from suggestions

* Update helix-term/src/commands/lsp.rs

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

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Kyle Smith 3849ca4c2a
Add test cases for existing pair matching logic. (#6027)
* Add test cases for existing pair matching logic.

* fix clippy
1 year ago
Clément Delafargue 8dd1ab4899
Softwrapping improvements (#5893)
* use max_line_width + 1 during softwrap to account for newline char

Helix softwrap implementation always wraps lines so that the newline
character doesn't get cut off so he line wraps one chars earlier then
in other editors. This is necessary, because newline chars are always
selecatble in helix and must never be hidden.

However That means that `max_line_width` currently wraps one char
earlier than expected. The typical definition of line width does not
include the newline character and other helix commands like `:reflow`
also don't count the newline character here.

This commit makes softwrap use `max_line_width + 1` instead of
`max_line_width` to correct the impedance missmatch.

* fix typos

Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>

* Add text-width to config.toml

* text-width: update setting documentation

* rename leftover config item

* remove leftover max-line-length occurrences

* Make `text-width` optional in editor config

When it was only used for `:reflow` it made sense to have a default
value set to `80`, but now that soft-wrapping uses this setting, keeping
a default set to `80` would make soft-wrapping behave more aggressively.

* Allow softwrapping to ignore `text-width`

Softwrapping wraps by default to the viewport width or a configured
`text-width` (whichever's smaller). In some cases we only want to set
`text-width` to use for hard-wrapping and let longer lines flow if they
have enough space. This setting allows that.

* Revert "Make `text-width` optional in editor config"

This reverts commit b247d526d69adf41434b6fd9c4983369c785aa22.

* soft-wrap: allow per-language overrides

* Update book/src/configuration.md

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update book/src/languages.md

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

* Update book/src/configuration.md

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>

---------

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
Co-authored-by: Alex Boehm <alexb@ozrunways.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
1 year ago
Kyle Smith f4bdbe4674
Do not add intermediate lines to jumplist with :<linenum> command. (#5751)
* Do not add intermediate lines to jumplist with :<linenum> command.

* Revert jumplist index changes.

* Reduce calculations during update cycle.

* Use jumplist for undo, set jumplist before preview.

* remove some debug logging

* Revert "remove some debug logging"

This reverts commit 5772c4327e7121c53ea0726a4d7333ae1c413ffb.

* Revert "Use jumplist for undo, set jumplist before preview."

This reverts commit f73a1b29824feaf16477b9df547fb28d9db81923.

* Add last_selection, update implementation.

* @pascalkuthe initial feedback

* Ensure ":goto 123" keybinding works as expected.

* fix clippies, prefer expect() for expect last_selection state
1 year ago
Michael Davis 0c6d25acae
DynamicPicker: Recalculate column widths for new options (#6004)
This fixes blank row text in a DynamicPicker which is initially given
no options. This can happen for language servers which respond to
the workspace symbol request for an empty query with an empty list
of symbols, and that behavior is somewhat common since returning all
symbols as the spec suggests is very expensive.

For empty options, `Picker::new` calculated the widths of each column
as 0. We can recalculate the column widths when the new options are
set to fix this. This refactor is also a good opportunity to formalize
setting new options on a picker: besides setting the new options and
calculating column widths we also want to reset the cursor and rescore
the options.
1 year ago
Michael Davis 6dc017b9e2
Jump to symbol ranges in LSP goto commands (#5986)
This follows prior changes like 42ad1a9e: we select the range given
by the language server rather than the starting point.
1 year ago
Michael Davis 170593161c
LSP: Send replies for malformed and unhandled RPC requests (#6058)
Previously we did not respond to malformed or unhandled LSP requests.
The JSONRPC spec says that all non-notification requests must have
responses:

> When a rpc call is made, the Server MUST reply with a Response,
> except for in the case of Notifications

(Note that Helix is the "Server" in this case. Also from the spec:
"The Server is defined as the origin of Response objects and the
handler of Request objects.")

So this change sends error replies for requests which can't be parsed
or handled. Request IDs are also now added to the log messages for
unhandled requests.
1 year ago
Michael Davis 563ac1a3cb tui: Log keyboard enhancement query time
In my testing this takes around 3-4ms in terminals that support the
enhanced keyboard protocol (Kitty, WezTerm) and a few hundred
microseconds in terminals that don't (st, Alacritty).
1 year ago
Michael Davis 611701c362 tui: Cache the keyboard enhancement check
Wether the host terminal supports keyboard enhancement can be cached
for the lifetime of a Helix session.

Caching this lookup prevents a potential lockup within crossterm's
event reading system where the query for the keyboard enhancement
support waits on the next keyboard event, which can happen if the
crossterm event stream is checked by `tokio::select!` in another
thread.
1 year ago
Michael Davis 3d85024717 Move terminal claim/restore code to helix-tui
This moves the `Application::claim_term` and
`helix-term::application::restore_term` functions into the helix-tui
crate. How the terminal should be claimed and restored is a TUI concern
and is implemented differently through different TUI backends.

This cleans out a lot of crossterm and TUI code in Application and
makes it easier to modify claim/restore based on information we query
from the terminal host. The child commit will take advantage of this
to cache the check for whether the host terminal supports the keyboard
enhancement protocol. Without this change, caching that information
takes much more code which is not easily reusable for anything else.

The code to restore the terminal is somewhat duplicated by this patch:
we want to restore the terminal in cases of panics. Panic handler hooks
must live for `'static` and the Application's terminal does not.
1 year ago
Pascal Kuthe 48b6aa9a69
Add command for resetting diff hunks (#5736) 1 year ago
Andrii Grynenko 8c2e447b16 Handle snippets for LSPs not providing offsets for completion 1 year ago
Andrii Grynenko 0d924255e4 Add nested placeholder parsing for LSP snippets
And fix `text` over-parsing, inspired by
d18f8d5c2d/runtime/lua/vim/lsp/_snippet.lua
1 year ago
Andrii Grynenko 1866b43cd3 Render every LSP snippets for every cursor
This refactors the snippet logic to be largely unaware of the rest of
the document. The completion application logic is moved into
generate_transaction_from_snippet which is extended to support
dynamically computing replacement text.
1 year ago
Urgau ec6e575a40 Correctly handle multiple cursors with LSP snippets 1 year ago
Pascal Kuthe ba24cfe912 Delete snippet placeholders when accepting completion
When accepting a snippet completion we automatically delete the
placeholders for now as doing so manual is quite cumbersome. In the
future we should keep these as a mark + virtual text that is
automatically removed once the cursor moves there.
1 year ago
Urgau ded4381728 Implement LSP snippet tabstops sorting and merging 1 year ago
Michael Davis d2af31b916 LSP: Advertise snippet support 1 year ago
Michael Davis b9b1ec2208 Apply snippets as transactions 1 year ago
Urgau 3f90dafa3c Remove now unused the pattern combinator 1 year ago
Urgau e973b71c83 Optimize LSP snippet parsing 1 year ago
Michael Davis 9c12e0fb76 Add parser for LSP snippet 1 year ago
Michael Davis c8e6857aff Add a parser-combinator crate
Parser-combinators are one of the simpler tools for building ad-hoc
parsers. They're a good fit because they are...

* Small: each parser / parser-combinator is around 10 LOC.
* Functional: helix_core strives to be a functional set of utilities
  usable throughout the rest of the editor.
* Flexible: use them to build any sort of ad-hoc parser. In the child
  commit, we'll parse LSP Snippet syntax using these new parser
  combinators.

Why not use an existing parser-combinator crate? Existing popular
parser-combinator crates have histories of making breaking changes
(for example nom and combine).

> Implementation note: I tried to not introduce a new trait since the
> types can be expressed in terms of `impl Fn`s. The trait is necessary
> to build `seq` implementations without a proc macro though, and also
> allows us to use `&'static str`s very conveniently: see the trait
> implementation for `&'static str`.
1 year ago
Davide Galassi f976c004e2
Allow LSP server to be stopped (#5964) 1 year ago
Erasin Wang 0e5a4e55a4
Update highlights for golang (#6204)
- update tree-sitter-go
- refine keywords
- set package as namespace
- add label
1 year ago
Erasin Wang 622f90a157
Update highlight for PHP (#6203)
- update tree-sitter-php
- add basic types, operator
- refine keyword
1 year ago
Michael Davis 136d1164e0
Pin tree-sitter at git master (#6218)
Tree-sitter has some unreleased improvements that can speed up small
queries and prevent hangs due to error recovery in some parsers. This
change pins tree-sitter to the latest master.

Neovim also pins tree-sitter to a commit on master.
1 year ago
dependabot[bot] 84be5cd52c
build(deps): bump grep-regex from 0.1.10 to 0.1.11 (#6215)
Bumps [grep-regex](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-regex-0.1.10...0.1.11)

---
updated-dependencies:
- dependency-name: grep-regex
  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>
1 year ago
dependabot[bot] 8228fb0cf7
build(deps): bump tokio from 1.25.0 to 1.26.0 (#6212)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.25.0...tokio-1.26.0)

---
updated-dependencies:
- dependency-name: tokio
  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>
1 year ago
dependabot[bot] 2417ac8a4b
build(deps): bump thiserror from 1.0.38 to 1.0.39 (#6216)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.38 to 1.0.39.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.38...1.0.39)

---
updated-dependencies:
- dependency-name: thiserror
  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>
1 year ago
dependabot[bot] 53c8dcea5b
build(deps): bump ignore from 0.4.18 to 0.4.20 (#6214)
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.18 to 0.4.20.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.18...ignore-0.4.20)

---
updated-dependencies:
- dependency-name: ignore
  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>
1 year ago
dependabot[bot] b1e7d4d9a0
build(deps): bump serde_json from 1.0.93 to 1.0.94 (#6211)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.93 to 1.0.94.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.93...v1.0.94)

---
updated-dependencies:
- dependency-name: serde_json
  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>
1 year ago
dependabot[bot] c00baf7da6
build(deps): bump grep-searcher from 0.1.10 to 0.1.11 (#6213)
Bumps [grep-searcher](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-searcher-0.1.10...0.1.11)

---
updated-dependencies:
- dependency-name: grep-searcher
  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>
1 year ago
workingj 77d6ed150c
feat(theme): Update pop-dark for color-modes (#6208) 1 year ago
Erasin Wang bc50502b1e
Update highlight for ecma/js/ts (#6205) 1 year ago
Erasin Wang cfb9986d84
Update onelight theme (#6192) 1 year ago
David Else 707457c632
Rewrite and refactor all documentation (#5534)
* Rewrite and refactor all documentation

* Rewrite and refactor the guides

* update runtime directory instructions for windows

* Update the Ubuntu 3rd party repo section with 22.10

* Merge from upstream

* Rewrite and refactor all documentation

* Apply suggestions from code review

Apply the suggestions that can be committed from the GitHub web interface.

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

* Add Windows themes folder

Co-authored-by: digidoor <37601466+digidoor@users.noreply.github.com>

* Apply the rest of the suggestions from the code review

* Revert "Apply the rest of the suggestions from the code review"

This reverts commit 498be1b7a1aec3ff567b95130148628beeef9b77.

* Revert "Merge branch 'rewrite-and-refactor-all-documentation' of github.com:David-Else/helix into rewrite-and-refactor-all-documentation"

This reverts commit 7c8404248ffef73b80b9051d5a4359c5bcfa5d1a, reversing
changes made to d932969cfc9fadda12a74cc01665919dee7152fb.

* Apply code review suggestions

* Changes after re-reading all documents

* Missed a full stop

* Code review suggestions and remove macOS and Windows specific sections

* Add OpenBSD to heading

* Add back macOS and Windows sections and further simplify and improve

* Change wording to nightly

* Remove README installation section and turn into a link

* Simplify building from source and follow code review suggestions

* Code review revisions

* Fix copy paste mistake

* Apply the latest code review suggestions

* More small code review items

* Change minor modes for code review

* Fix link and typos

* Add note that you need a c++ compiler to install the tree-sitter grammars

* Add pacman example

* Make sure all headings are lower case

* Revert to the original passage adding a reference to Windows that was missing

* Update book/src/guides/adding_languages.md

Fix grammar typo

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

* Update book/src/install.md

Fix tree sitter typo

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

* Remove TOC links to main heading

---------

Co-authored-by: CptPotato <3957610+CptPotato@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: digidoor <37601466+digidoor@users.noreply.github.com>
1 year ago
cinerea0 5ebe1014ac
docs: describe tab-width and unit subkeys (#5862) 1 year ago
Filip Dutescu 376c19e06b
feat(dap): implement Restart request (#5651)
Add a restart debug session command, which would issue a
[Restart Request][1], if the debugger supports it and a session is
running. It uses the same arguments and requests used to start the
initial session, when recreating it.

It builds upon #5532, making use of the changes to the termination
workflow of a session.

[1]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Restart

Closes: #5594

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
1 year ago
Santiago Vrancovich 39d5fb0e59
Remove centering view from Unimpaired commands (#6193)
Remove `align_view` calls from `goto_*_diag` as per issue #6177
1 year ago
Erasin Wang e6597bc992
Update queries for godot4 (#6186) 1 year ago
nuid32 def26966d2
Fix lacking space panic (#6109)
* Fix lack of space for popup crash

* Fix saturating -> wrapping

* Fix wrapping -> saturating (I am an idiot)

* Remove useless "mut" in helix-tui/src/buffer.rs

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

* Remove redundant bound-check

* Return bound-check back

* Add bound-check for set_style

* Remove set_style bound-check

* Revert bound-check

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Pascal Kuthe ccdb144665 update MSRV to 1.65 1 year ago
Sebastian Thiel 5b4e73f37d Update helix-vcs/Cargo.toml
Co-authored-by: Ivan Tham <pickfire@riseup.net>
1 year ago
Sebastian Thiel ac9e0b39f2 upgrade `git-repository` to `gix` 0.36.1; up min. rustc version to 1.64
This fixes breakage when installing `helix` due to an incorrect usage of
`as_ref()` when interacting with `bstr` in the `gitoxide` codebase.

However, this upgrade also requires a higher rustc version, as `gitoxide`
recently updated its `windows` crate version.
1 year ago
Roberto Vidal 725d9aecf0
Add support for reStructuredText (#6180) 1 year ago
Henrik Tjäder cf153080d7
Theme: Papercolor: Add ui.highlight (#6162)
Using the picker with syntax highlighting the
fallback `ui.selection` makes a lot of text,
especially for the light variant, hard to read.

Instead, use a lighter background for highlights
1 year ago
Alexander Brevig a2e54167d8
fix: Handle signals before crossterm events (#6170)
This is a workaround for a freeze when suspending Helix with C-z on
non-Windows systems. The check for the keyboard enhancement protocol
locks up crossterm's internal event reading/polling system by trying to
set up multiple concurrent readers. `input_stream.next()` sets up one
reader looking for regular crossterm events while the
`supports_keyboard_enhancement` query sets up another looking for
internal events. The latter hangs for two seconds or until the former
yields an event. By handling signals first we don't lock up the mutex
by trying to read keyboard events.
1 year ago
Nick bf872366fd
Document the file-modification-indicator statusline element (#6036) 1 year ago
Matthias Q 2bd8bc8d84
feat(prql): add prql support (#6126) 1 year ago
Pascal Kuthe 5c716af7a2
Fix scrolloff at view bottom (#6142)
Fixes a regression introduced in #5420 where a scrolloff of `x - 1`
was used instead if `x` at the bottom of the screen. This was
especially problematic if the scrolloff was set to `0` in that case
the scrolloff behaved as tough set to `-1` and the cursor disappeared
from the view if scrolled to the botoom.
1 year ago
István Donkó 2d5577dbe6
Extend the set of tags highlighted in comments (#6143) 1 year ago
nuid32 ddc5bf4e60
Fix 'attempt to divide by zero' panic (#6155) 1 year ago
Michael Davis 6e7dcb3317
CI: Update cachix/install-nix-action to v20 (#6163)
This fixes an issue with installing Nix 1.14 which causes the
cachix/cachix-action in the next step to fail.
1 year ago
Andrey Grebenyk 0625f410eb
Add graphql schema file type (#6159)
Co-authored-by: Andrey Grebenyk <GrebenyukAE@ugpa.ru>
1 year ago
NomisIV c082ef2863
Fix indentation lines (#6134) (#6136) 1 year ago
Michael Davis 27211abf06
Ignore key-release keyboard events (#6139)
Since crossterm 0.26.x, we receive press/release keyboard events on
Windows always. We can ignore the release events though to emulate
the behavior of keyboard input on Windows on crossterm 0.25.x.
1 year ago
lesleyrs 8dab8a0a03 Add shift-backspace keybind alias for backspace (#4937)
When the Kitty Keyboard Protocol is enabled, S-backspace is
distinguished from backspace with no modifiers. This is awkward when
typing because it's very easy to accidentally hold shift and press
backspace temporarily when typing capital letters.

Kakoune (which is also a Kitty Keyboard Protocol application) treats
S-backspace as backspace too:
3150e9b3cd/src/input_handler.cc (L1275)
1 year ago
Michael Davis a066815833 Enable the enhanced keyboard protocol if supported 1 year ago
Michael Davis 79bf5e3094 Update crossterm to 0.26.1
Crossterm 0.26.x includes a breaking change for the command to set the
cursor shape. This commit includes a change which uses the new type.
1 year ago
Mathieu Agopian a976786a4f
book: Document <space>h and <space>g (#6124) 1 year ago
Mofiqul 5ef3f5f59f
theme: Add Adwaita Dark (#6042) 1 year ago
Isotoxal 7b8daae395
theme: Add Everblush (#6086) 1 year ago
dependabot[bot] f02fdd2f73
build(deps): bump tempfile from 3.3.0 to 3.4.0 (#6128)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  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>
1 year ago
luetage cac4a3604c
Kanagawa: fix bufferline, theme wrap-indicators, cursor, menu, and syntax changes (#6085) 1 year ago
Adam Becker eb3086a5b3
Fix diagnostic underline colors in catppuccin themes (#6107) 1 year ago
Mathieu Agopian 98a3d46912
Add elm treesitter textobjects (#6084) 1 year ago
Matthew Toohey a4049e6f55
feat: add nasm language (#6068) 1 year ago
Sophie Dankel f69bb41169
Add language support for sway (#6023) 1 year ago
Matthias Deiml 0cbb61c3a4
Improve markdown highlights and add latex injection (#6100) 1 year ago
Yusuf Bera Ertan 309735aa2d
build(nix): fix devshell 1 year ago
Yusuf Bera Ertan e5af0f1d49
build(nix): update flake to use flake-parts and nci flake-parts module 1 year ago
Skyler Hawthorne 621ab0e57f
update tree-sitter-git-rebase hash (#6094) 1 year ago
LeoniePhiline 6494fc1daf
feat(sql): MariaDB/MySQL syntax, Apache Hive syntax, unified builtin functions, floats, negative integers (#6041)
* feat(sql): MariaDB/MySQL table options `COLLATE`, `CHARACTER SET`, `ENGINE`

Upstream changes: 286e10c5bc...30e15d45dc

* feat(sql): Optional `COLUMN` in `ALTER TABLE`

Upstream changes: 30e15d45dc...c508e6044a

* feat(sql): Add `UNSIGNED` support, refactor numeric types

Upstream changes: c508e6044a...2d1d5b68a1

* feat(sql): Add support for Apache Spark create Hive table

Upstream changes: 2d1d5b68a1...7be06f4d5e

* feat(sql): Add support for signed and unsigned floating point literals

Upstream changes: https://github.com/DerekStride/tree-sitter-sql/pull/92/files

* feat(sql): Add interval data type

Upstream changes: 13d375dea3...7b4bcd0394

* feat(sql): Add support for DROP INDEX

Upstream changes: 7b4bcd0394...173d6feb50

* feat(sql): Add MariaDB/MySQL `ALTER TABLE ... CHANGE|MODIFY ... [FIRST|AFTER]` syntax

Upstream changes: 173d6feb50...0d7a121b2a

* feat(sql): Extract fields from Apache Hive storage location and row format

Upstream changes: 0d7a121b2a...d2f0f6695f

* feat(sql): Fix unified built-in functions

Upstream changes: d2f0f6695f...e4e43ba742

* feat(sql): Support negative integers

Upstream changes: e4e43ba742...3a3f92b29c

* rework(sql): Improve `@constant.numeric` regex
1 year ago
Alexandr 8043959265
Doc string fix in selection.rs (#6077)
* Doc string fix

Delete duplicate `the`

* selection.rs doc string wording

* Remove extra whitespace at end of doc text

---------

Co-authored-by: Ivan Tham <pickfire@riseup.net>
1 year ago
dependabot[bot] 1a87d14439
build(deps): bump once_cell from 1.17.0 to 1.17.1 (#6072)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.17.0 to 1.17.1.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.17.0...v1.17.1)

---
updated-dependencies:
- dependency-name: once_cell
  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>
1 year ago
dependabot[bot] 8016dccd60
build(deps): bump tokio-stream from 0.1.11 to 0.1.12 (#6071)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.11 to 0.1.12.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.11...tokio-stream-0.1.12)

---
updated-dependencies:
- dependency-name: tokio-stream
  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>
1 year ago
dependabot[bot] 5c9f8ae2cc
build(deps): bump toml from 0.7.1 to 0.7.2 (#6070)
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/toml-rs/toml/releases)
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.1...toml-v0.7.2)

---
updated-dependencies:
- dependency-name: toml
  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>
1 year ago
dependabot[bot] d9d6796528
build(deps): bump serde_json from 1.0.92 to 1.0.93 (#6069)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.92...v1.0.93)

---
updated-dependencies:
- dependency-name: serde_json
  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>
1 year ago
Erasin 864ee8fdef
Add GNU gettext PO grammar (#5996) 1 year ago
Philipp Mildenberger b89b2eaf68
Added yuck language support (for eww) (#6064) 1 year ago
Filip Dutescu 44729fbaf9
fix(dap): validate key and index exist when requesting vars (#5628)
Check if the stack frames contain the thread id and the frame before
trying to get the frame id. If case any of the two fails to be
found, provide the user with messages to inform them of the issue and
gracefully return.

Closes: #5625

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
1 year ago
Filip Dutescu e3765ac6d2
feat(dap): send Disconnect if Terminated event received (#5532)
Send a `Disconnect` DAP request if the `Terminated` event is received.
According to the specification, if the debugging session was started by
as `launch`, the debuggee should be terminated alongside the session. If
instead the session was started as `attach`, it should not be disposed of.

This default behaviour can be overriden if the `supportTerminateDebuggee`
capability is supported by the adapter, through the `Disconnect` request
`terminateDebuggee` argument, as described in
[the specification][discon-spec].

This also implies saving the starting command for a debug sessions, in
order to decide which behaviour should be used, as well as validating the
capabilities of the adapter, in order to decide what the disconnect should
do.

An additional change made is handling of the `Exited` event, showing a
message if the exit code is different than `0`, for the user to be aware
off the termination failure.

[discon-spec]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect

Closes: #4674

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
1 year ago
Mathieu Agopian 31b0c75832
Expand contributing docs (#5967) 1 year ago
Jummit 5ff2cb24e2
Add support for the uxntal language (#6047) 1 year ago
Skyler Hawthorne 71220da139
Update tree-sitter-git-rebase (#6030) 1 year ago
gibbz00 c5c1b5af34
ayu_evolve theme: remove variable.other.member (#6028)
Passed it on as ok in the initial PR because the wrong runtime directory
was being sourced on my system. It makes the all variable members horribly
dark.
1 year ago
Austreelis f7edc34e7b
flake: pass helix' wrapper through (#5994)
This allows easily (re)making helix (wrapped)
from an overriden helix-unwrapped derivation,
e.g. if one wanted to patch helix from nix.
1 year ago
xiaoma20082008 ce0837dbb7
DAP: Add request ID to request timeout message (#6018)
This improves error logging for dap requests. Without the ID
it's hard to know which request is the one that timed out.
1 year ago
Guillaume 78a1e2db60
feat: show current language when no argument is provided (#5895) 1 year ago
Triton171 a1a6d5f334
Replace incorrect usages of tab_width with indent_width. (#5918) 1 year ago
workingj d27e808fb3
feat(theme) ajust pop-dark and clean up gutter linehlght (#5992) 1 year ago
Erasin b7fb52d0e4
fix: decode lsp url for workspace_diagnostics_picker (#6016) 1 year ago
Jonathan LEI 9368ac76b3
Ignore invalid file URIs from LSP (#6000) 1 year ago
Pascal Kuthe c332b16855
ignore case while filtering completions (#6008) 1 year ago
Michael Davis 0f64f31d8b
LSP: Add request ID to request timeout message (#6010)
This improves error logging for requests - without the ID it's hard to
know which request is the one that timed out.
1 year ago
Michael Davis d8526a752c
Use Popup::ignore_escape_key helper for completion (#6006)
The completion component has a separate branch for handling the
Escape key but it can use the `ignore_escape_key` helper added for
signature-help instead.

This should not cause a behavior change - it's just cleaning up the
completion component.
1 year ago
LeoniePhiline 4c85f4d151
Add `.env.dist` to `source.env` language scope (#6003) 1 year ago
Pascal Kuthe 1373ae07bc
Remove text bg from monokai (#6009) 1 year ago
Pascal Kuthe 715c4b24d9
Fix crash in goto_window_center at EOF (#5987) 1 year ago
dependabot[bot] 0a7c697dd7
build(deps): bump tokio from 1.24.2 to 1.25.0 (#5974)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.2 to 1.25.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits/tokio-1.25.0)

---
updated-dependencies:
- dependency-name: tokio
  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>
1 year ago
dependabot[bot] 64ca02258d
build(deps): bump cc from 1.0.78 to 1.0.79 (#5976)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.0.78 to 1.0.79.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.78...1.0.79)

---
updated-dependencies:
- dependency-name: cc
  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>
1 year ago
dependabot[bot] 47a3aaaa24
build(deps): bump signal-hook from 0.3.14 to 0.3.15 (#5975)
Bumps [signal-hook](https://github.com/vorner/signal-hook) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/vorner/signal-hook/releases)
- [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/signal-hook/compare/v0.3.14...v0.3.15)

---
updated-dependencies:
- dependency-name: signal-hook
  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>
1 year ago
dependabot[bot] ab17f30f45
build(deps): bump encoding_rs from 0.8.31 to 0.8.32 (#5977)
Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs) from 0.8.31 to 0.8.32.
- [Release notes](https://github.com/hsivonen/encoding_rs/releases)
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.31...v0.8.32)

---
updated-dependencies:
- dependency-name: encoding_rs
  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>
1 year ago
vwkd 72e5704f52
docs: clarify `join_selections_space` (#5969) 1 year ago
Matouš Dzivjak 2bebc5042e
feat(ui): deprecated completions (#5932)
* feat(ui): deprecated completions

Mark deprecated completions using strike-through
(CROSSED_OUT modifier). The deprection information
is taken either from the `deprecated` field of the
completion item or from the completion tags.

The field seems to be the older way of passing
the deprecated information and it was already
marked as deprecated for Symbol. In completion
item the field is still valid but it seems that
the LSP is moving in the general direction of using
tags for this kind of information and as such
relying on tags as well seems reasonable and
future-proof.
1 year ago
A-Walrus 8b09b00942
Add :toggle-option command (#4085)
This command toggles the value of boolean options
1 year ago
Jared Beller 87518db1d1
dhall: additional highlight queries (#5959) 1 year ago
Erasin c71b4c5579
Update grammar for godot (#5944)
* update grammar for gdscript.
* add comment injections for gdscript.
* add indent for gdscript
* add file-type support for godot-resource
1 year ago
Mike Trinkala ef221abe83
Prevent a panic when uncommenting a line with only a comment token (#5933)
Open a new document `test.rs` and type the following:
`di//<esc><C-c>`

The margin calculation pushes the range out of bounds for the comment
marker when there are no characters (newline) after it.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
Char range out of bounds: char range 0..3,
Rope/RopeSlice char length 2', ropey-1.6.0/src/rope.rs:546:37

The debug build catches the error in the transaction: thread 'main'
panicked at 'attempt to subtract with overflow',
helix-core/src/transaction.rs:503:26
1 year ago
John DeSilva a4751db8c7 Remove outdated tutor note about increment and decrement behavior 1 year ago
Aleksey Kuznetsov 3b301a9d1d
Add comment-token to the hosts language definition (#5914) 1 year ago
Gokul Soumya 425315d752 Fix completion doc popup area calculation logic
Earlier the doc popup would draw over the compeltion popup
itself and sometimes over the cursor too.
1 year ago
Gokul Soumya 1562b5ce67 Create popup rect instead of using raw values 1 year ago
Gokul Soumya 0f844ef191 Refactor our Markdown construction in completion doc 1 year ago
Gokul Soumya 937825e8fc Rename completion doc popup area variables 1 year ago
Gokul Soumya 8e9c329952 Use early return in rendering completion doc 1 year ago
Pascal Kuthe 93c7afc4ed
Negotiate LSP Position Encoding (#5894)
So far LSP always required that `PositionEncoding.characters` is an
UTF-16 offset. Now that LSP 3.17 is available in `lsp-types` request
the server to send char offsets (UTF-32) or byte offsets (UTF-8)
instead. For compatability with old servers, UTF-16 remains as the
fallback as required by the standard.
1 year ago
Daniel S Poulin 6929a12f29
Make `m` textobject look for pairs enclosing selections (#3344)
* Make `m` textobject look for pairs enclosing selections

Right now, this textobject only looks for pairs that surround the
cursor. This ensures that the pair found encloses each selection, which
is likely to be intuitively what is expected of this textobject.

* Simplification of match code

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

* Adjust logic for ensuring surround range encloses selection

Prior, it was missing the case where the start of the selection came
before the opening brace. We also had an off-by-one error where if the
end of the selection was on the closing brace it would not work.

* Refactor to search for the open pair specifically to avoid edge cases

* Adjust wording of autoinfo to reflect new functionality

* Implement tests for surround functionality in new integration style

* Fix handling of skip values

* Fix out of bounds error

* Add `ma` version of tests

* Fix formatting of tests

* Reduce indentation levels for readability, and update comments

* Preserve each selection's direction with enclosing pair surround

* Add test case for multiple cursors resulting in overlap

* Mark known failures as TODO

* Make tests multi-threaded or they fail

* Cargo fmt

* Fix typos in integration test comments

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
lesleyrs af1157f37c
Add exit code to command failed msg (#5898) 1 year ago
Colton Clemmer ea3293b4da
Split modification indicator from file statusline elements (#4731) 1 year ago
ath3 1840d775c8
Added tree-sitter-hosts (#4950) 1 year ago
ath3 189c3c2ddc
Add tree-sitter-passwd (#4959) 1 year ago
Pascal Kuthe 8a3ec443f1
Fix new clippy lints (#5892) 1 year ago
Mike Trinkala 9d73a0d112
Fix the infinite loop when copying the cursor to the top of the file (#5888)
Example:
```
test
testitem
```

Select line 2 with x, then type Alt-C; Helix will go into an infinite
loop. The saturating_sub keeps the head_row and anchor_row pinned at 0,
and a selection is never made since the first line is too short.
1 year ago
Pascal Kuthe 7ebcf4e919
properly handle LSP position encoding (#5711)
* properly handle LSP position encoding

* add debug assertion to Transaction::change

* Apply suggestions from code review

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

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Blaž Hrastnik 8a602995fa
Address new clippy lints 1 year ago
Pascal Kuthe e474779c87
bump msrv to 1.63 (#5570)
* bump msrv to 1.63

* resolve new complex type clippy lints
1 year ago
Pascal Kuthe bd14f5a72c
update bug report template (#5872) 1 year ago
Blaž Hrastnik 8e2eab1a6f
Also run build checks on merge queue 1 year ago
zSchoen 882fa11d17
Add `Containerfile` file-type for dockerfile language (#5873) 1 year ago
Clément Delafargue f386ff795d
Check for external file modifications when writing (#5805)
`:write` and other file-saving commands now check the file modification
time before writing to protect against overwriting external changes.

Co-authored-by: Gustavo Noronha Silva <gustavo@noronha.dev.br>
Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
1 year ago
gavincrawford 00ecc556a8
Fix Go select indenting (#5713)
* Fix Go  indenting

* Fix bracket outdent predicate

* Fix brace indenting (again)
1 year ago
Matthew Toohey 05c5207265
feat: add pem language (#5797) 1 year ago
Surendrajat fce30c0da0
xml: add mobileconfig & plist file types (#5863) 1 year ago
Mike Trinkala c704701714
Short-circuit the word and treesitter object movement commands (#5851)
The loop always iterates the number of times the user specified even
if the beginning/end of the document is reached.

For an extreme demonstration try the following commands, Helix will
hang for several seconds.
100000000w
100000000]c
1 year ago
Michael Davis 23ed8c12f1
Select change range for goto_first/last_change commands (#5206)
This matches the behavior from 42ad1a9e04
but for the first and last change. The selection rules are the same
as for goto_next/prev_change: additions and modifications select the
added and modified range while deletions are represented with a point.
1 year ago
Jesús González f71f27f804
Add Darcula Solid theme (#5778)
* Add Darcula Solid theme.

* Update darcula solid theme.

* Derive darcula-solid theme from original darcula
1 year ago
Kirawi fb149133db
Make `fleet-dark` accurate to the official theme (#5605) 1 year ago
dependabot[bot] 7f6a91fd63
build(deps): bump ropey from 1.5.1 to 1.6.0 (#5859)
Bumps [ropey](https://github.com/cessen/ropey) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/cessen/ropey/releases)
- [Changelog](https://github.com/cessen/ropey/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cessen/ropey/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: ropey
  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>
1 year ago
dependabot[bot] 9b69f5010d
build(deps): bump anyhow from 1.0.68 to 1.0.69 (#5858)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.68 to 1.0.69.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.68...1.0.69)

---
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>
1 year ago
dependabot[bot] f3f8660d36
build(deps): bump serde_json from 1.0.91 to 1.0.92 (#5857)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.91 to 1.0.92.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.91...v1.0.92)

---
updated-dependencies:
- dependency-name: serde_json
  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>
1 year ago
dependabot[bot] b97462ea9b
build(deps): bump unicode-segmentation from 1.10.0 to 1.10.1 (#5856)
Bumps [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/unicode-rs/unicode-segmentation/releases)
- [Commits](https://github.com/unicode-rs/unicode-segmentation/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: unicode-segmentation
  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>
1 year ago
dependabot[bot] 093b37d7e7
build(deps): bump cachix/install-nix-action from 18 to 19 (#5855)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
Ethan Budd 9c98043c1c
Recognize .C and .H file types as cpp (#5808) 1 year ago
Jaeho Choi 0eba0db4a0
docs: Fix PowerShell runtime linking command (#5822) 1 year ago
Skyler Hawthorne b2e83f81e1
enable rendering in integration tests (#5819)
This will allow testing more of the code base, as well as enable UI-
specific testing.

Debug mode builds are prohibitively slow for the tests, mostly
because of the concurrency write tests. So there is now a profile for
integration tests that sets the optimization level to 2 for a few helix
crates, and lowers the number of rounds of concurrent writes to 1000.
1 year ago
Alex d6e2434f73
Add `ui.virtual.wrap` to theme docs (#5823) 1 year ago
Aleksey Kuznetsov 7b46a6cada
Add Podfile and *.podspec to the file types for ruby (#5811) 1 year ago
William Etheredge f7bd7b5eaf
Add :character-info command (#4000) 1 year ago
Brett Lyons d8f482e11e
Add MSBuild language based on XML grammar (#5793) 1 year ago
LeoniePhiline 30412366be
feat: Update `tree-sitter-sql` and migrate `highlights.scm` to match grammar (#5772)
* Sort buildin functions alphabetically

* fix: Query float type like other numeric types

* Update tree-sitter-sql and update highlights.scm to match grammar
1 year ago
Cemal Okten 10fee815c4
Add Jellybeans theme (#5719) 1 year ago
Pascal Kuthe 350535208f
always commit to history when pasting (#5790) 1 year ago
Skyler Hawthorne a5233cf5ad disable lsp in integration tests 1 year ago
Skyler Hawthorne 06d095f31c provide option to completely disable lsp 1 year ago
Skyler Hawthorne 0e038fb80c make clipboard message debug 1 year ago
Filipe Azevedo 8ba0a46274
add picker: current view dir (#4666) 1 year ago
Dylan Bulfin 61e1e6160a
Removing C-j and C-k from completion menu navigation (#5070) 1 year ago
Pascal Kuthe f0c2e898b4
add substring matching options to picker (#5114) 1 year ago
Gokul Soumya e31943c4c4
Tabulate buffer picker contents (#5777) 1 year ago
Pascal Kuthe 2949bb018c
fix position translation at EOF with softwrap (#5786) 1 year ago
Pascal Kuthe 6ed2348078
Hide duplicate symlinks from the picker (#5658)
* hide duplicate symlinks from the picker

* Apply suggestions from code review

Co-authored-by: g-re-g <123515925+g-re-g@users.noreply.github.com>

* minor stylistic fix

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

---------

Co-authored-by: g-re-g <123515925+g-re-g@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Mike Trinkala 62d046fa21
Fix utf8 length handling for shellwords (#5738)
If the last argument to shellwords ends in a multibyte utf8 character
the entire argument will be dropped.
e.g. `:sh echo test1 test2𒀀` will only output `test1`

Add additional tests based on the code review feedback
1 year ago
Michael Davis 685cd383a3
Surround with line-endings on `ms<ret>` (#4571)
This change makes `ms<ret>` work similarly to `t<ret>` and related
find commands: when the next event is a keypress of Enter, surround
the selection with the document's line-endings.
1 year ago
Michael Davis d5f17d3f69
Fix initial highlight layer sort order (#5196)
The purpose of this change is to remove the mutable self borrow on
`HighlightIterLayer::sort_key` so that we can sort layers with the
correct ordering using the `Vec::sort` function family.
`HighlightIterLayer::sort_key` needs `&mut self` since it calls
`Peekable::peek` which needs `&mut self`. `Vec::sort` functions
only give immutable borrows of the elements to ensure the
correctness of the sort.

We could instead approach this by creating an eager Peekable and using
that instead of `std::iter::Peekable` to wrap `QueryCaptures`:

```rust
struct EagerPeekable<I: Iterator> {
    iter: I,
    peeked: Option<I::Item>,
}

impl<I: Iterator> EagerPeekable<I> {
    fn new(mut iter: I) -> Self {
        let peeked = iter.next();
        Self { iter, peeked }
    }

    fn peek(&self) -> Option<&I::Item> {
        self.peeked.as_ref()
    }
}

impl<I: Iterator> Iterator for EagerPeekable<I> {
    type Item = I::Item;

    fn next(&mut self) -> Option<Self::Item> {
        std::mem::replace(&mut self.peeked, self.iter.next())
    }
}
```

This would be a cleaner approach (notice how `EagerPeekable::peek`
takes `&self` rather than `&mut self`), however this doesn't work in
practice because the Items emitted by the `tree_sitter::QueryCaptures`
Iterator must be consumed before the next Item is returned.
`Iterator::next` on `tree_sitter::QueryCaptures` modifies the
`QueryMatch` returned by the last call of `next`. This behavior is
not currently reflected in the lifetimes/structure of `QueryCaptures`.

This fixes an issue with layers being out of order when using combined
injections since the old code only checked the first range in the
layer. Layers being out of order could cause missing highlights for
combined-injections content.
1 year ago
gibbz00 b2251870da
Add ayu_evolve theme (#5638)
* Add ayu_evolve theme

* ayu_evolve: fix typo + raw markdown highlight

* Update runtime/themes/ayu_evolve.toml typo

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

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Gokul Soumya 0f562dfeab
theme(onedark): Add ui.highlight scope (#5755) 1 year ago
Pascal Kuthe 4dcf1fe66b
rework positioning/rendering and enable softwrap/virtual text (#5420)
* rework positioning/rendering, enables softwrap/virtual text

This commit is a large rework of the core text positioning and
rendering code in helix to remove the assumption that on-screen
columns/lines correspond to text columns/lines.

A generic `DocFormatter` is introduced that positions graphemes on
and is used both for rendering and for movements/scrolling.
Both virtual text support (inline, grapheme overlay and multi-line)
and a capable softwrap implementation is included.

fix picker highlight

cleanup doc formatter, use word bondaries for wrapping

make visual vertical movement a seperate commnad

estimate line gutter width to improve performance

cache cursor position

cleanup and optimize doc formatter

cleanup documentation

fix typos

Co-authored-by: Daniel Hines <d4hines@gmail.com>

update documentation

fix panic in last_visual_line funciton

improve soft-wrap documentation

add extend_visual_line_up/down commands

fix non-visual vertical movement

streamline virtual text highlighting, add softwrap indicator

fix cursor position if softwrap is disabled

improve documentation of text_annotations module

avoid crashes if view anchor is out of bounds

fix: consider horizontal offset when traslation char_idx -> vpos

improve default configuration

fix: mixed up horizontal and vertical offset

reset view position after config reload

apply suggestions from review

disabled softwrap for very small screens to avoid endless spin

fix wrap_indicator setting

fix bar cursor disappearring on the EOF character

add keybinding for linewise vertical movement

fix: inconsistent gutter highlights

improve virtual text API

make scope idx lookup more ergonomic

allow overlapping overlays

correctly track char_pos for virtual text

adjust configuration

deprecate old position fucntions

fix infinite loop in highlight lookup

fix gutter style

fix formatting

document max-line-width interaction with softwrap

change wrap-indicator example to use empty string

fix: rare panic when view is in invalid state (bis)

* Apply suggestions from code review

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

* improve documentation for positoning functions

* simplify tests

* fix documentation of Grapheme::width

* Apply suggestions from code review

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

* add explicit drop invocation

* Add explicit MoveFn type alias

* add docuntation to Editor::cursor_cache

* fix a few typos

* explain use of allow(deprecated)

* make gj and gk extend in select mode

* remove unneded debug and TODO

* mark tab_width_at #[inline]

* add fast-path to move_vertically_visual in case softwrap is disabled

* rename first_line to first_visual_line

* simplify duplicate if/else

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Ole Krüger 4eca4b3079
Support goto-declaration LSP command (#5646) 1 year ago
dependabot[bot] c9b583ea9b
build(deps): bump toml from 0.7.0 to 0.7.1 (#5745)
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/toml-rs/toml/releases)
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.0...toml-v0.7.1)

---
updated-dependencies:
- dependency-name: toml
  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>
1 year ago
dependabot[bot] ac6e71f9c6
build(deps): bump futures-executor from 0.3.25 to 0.3.26 (#5744)
Bumps [futures-executor](https://github.com/rust-lang/futures-rs) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.25...0.3.26)

---
updated-dependencies:
- dependency-name: futures-executor
  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>
1 year ago
dependabot[bot] 9d22c64c78
build(deps): bump ahash from 0.8.2 to 0.8.3 (#5743)
Bumps [ahash](https://github.com/tkaitchuck/ahash) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/tkaitchuck/ahash/releases)
- [Commits](https://github.com/tkaitchuck/ahash/compare/v0.8.2...v0.8.3)

---
updated-dependencies:
- dependency-name: ahash
  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>
1 year ago
dependabot[bot] 75eeda69e7
build(deps): bump indoc from 1.0.8 to 2.0.0 (#5742)
Bumps [indoc](https://github.com/dtolnay/indoc) from 1.0.8 to 2.0.0.
- [Release notes](https://github.com/dtolnay/indoc/releases)
- [Commits](https://github.com/dtolnay/indoc/compare/1.0.8...2.0.0)

---
updated-dependencies:
- dependency-name: indoc
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
Eric Crosson 447909e4d0
Modify env language to extend bash (#5720)
Additionally, add `.envrc` to the `env`-supported file types.
1 year ago
alice 8b25f44f05
build(deps): bump toml from 0.6.0 to 0.7.0 (#5726) 1 year ago
Jonathan LEI 86ae81ec5d
Use filename completer on run-shell-command (#5729) 1 year ago
LeoniePhiline 482cc22fec
Update tree-sitter-sql and improve highlight queries (#5683) 1 year ago
LeoniePhiline 2c6bf6fca6
fix: Typo in variable name (#5710) 1 year ago
g-re-g 4a59d337f4
Update tutor logo (#5681) 1 year ago
Miguel Madrid-Mencía d2d3024337
Fix clippy 1.67 warnings (#5697) 1 year ago
Rino 4d548a0ee3
Parse gutter-types as Strings (#5696)
This is necessary for configurations like:

    [editor]
    gutters = ["diagnostics", "line-numbers"]

after the toml 0.6.0 dependency update.
1 year ago
Sam Nystrom 291f39d66b
Add `Justfile` to the file types for make (#5687) 1 year ago
LeoniePhiline 250b6cd7f0
Update tree-sitter-xml to fix whitespace parsing (#5685) 1 year ago
pacien 22b3d3d636
queries/nix: add injections for builtins and writers (#5629) 1 year ago
Jimmy Zelinskie 2db879629f
add explicit formatter for cue (#5679)
cuelsp does not support formatting.
Cue language support was added to Helix before
"formatter" was available.

References:
https://github.com/helix-editor/helix/pull/3262
https://github.com/dagger/cuelsp/issues/44
1 year ago
Antonius Naumann 56c0810c68
Change default language server for 'v' from 'vls' to 'v ls' (#5677) 1 year ago
ds-cbo 67a287dd81
keymap: Test backslash escaping in commands 1 year ago
blt__ 91dca3f667
Add Appstream metadata file (#5643) 1 year ago
Jonathan Lebon 4726ae9df6
Sonokai theme: style secondary selections differently (#5440)
Without styling the primary and secondary selections differently, it's
impossible to tell them apart when cycling through selections.

Make the primary selection slightly brighter and secondary selections
slightly paler.
1 year ago
Pascal Kuthe e83ce72240 refactor: don't deserialize &str from toml
The new version of the `toml` crate is based on `toml_edit` and does
not support zero copy deserialization anymore. So we need to deserialize
`String` instead of `&str` in the keympa
1 year ago
Michael Davis 70887b7378 Refactor toml::Value->Theme conversion
The `From<Value>` implementation for `Theme` converted the Value to a
string and re-parsed the string to convert it to
`HashMap<String, Value>` which feels a bit wasteful. This change uses
the underlying `toml::map::Map` directly when the value is a table and
warns about the unexpected `Value` shape otherwise.

This is necessary because toml 0.6.0 changes the Display implementation
for Value::Table so that the `to_string` no longer encodes the value as
a Document, just a Value. So the parse of the Value fails to be decoded
as a HashMap.

The behavior for returning `Default::default` matches the previous
code's behavior except that it did not warn when the input Value was
failed to parse.
1 year ago
Michael Davis b3e9f6233a Fix compatibility with toml 0.6.0
`toml::from_slice` has been removed. The CHANGELOG recommends using
`toml::from_str` instead and doing the byte-to-str conversion yourself.

The `toml::toml!` macro has also changed to return the type of the
value declared within the macro body. In the change in
`helix-view/src/theme.rs` this is a `toml::map::Map` (it was a
`toml::Value` previously) allowing us to skip the match and use the
map directly.

Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
1 year ago
dependabot[bot] 52d854fa62 build(deps): bump toml from 0.5.10 to 0.6.0
Bumps [toml](https://github.com/toml-rs/toml) from 0.5.10 to 0.6.0.
- [Release notes](https://github.com/toml-rs/toml/releases)
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.10...toml-v0.6.0)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Pascal Kuthe e9dc9f4935
Switch from toml::from_slice to toml::from_str (#5659) 1 year ago
dependabot[bot] 64ec0256d3
build(deps): bump which from 4.3.0 to 4.4.0 (#5655)
Bumps [which](https://github.com/harryfei/which-rs) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Commits](https://github.com/harryfei/which-rs/compare/4.3.0...4.4.0)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
dependabot[bot] 639f22559e
build(deps): bump tokio from 1.24.1 to 1.24.2 (#5657)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
Eloi Torrents 7e191f5915
Support sagemath language (#5649) 1 year ago
Pascal Kuthe 361a834486
Fix selecting a changed file in global search (#5639) 1 year ago
Eric Crosson 17acadb305
Use markdown language for hub pull-request files (#5634)
The hub[^1] command-line tool uses a file called `PULLREQ_EDITMSG`[^2].
This file is used to edit the text from of each commit being submitted
in a pull request, and the final content is rendered as markdown by
GitHub.

This commit adds `PULLREQ_EDITMSG` to the list of markdown file-types.

[^1]: https://github.com/github/hub
[^2]: c8e68d548a/commands/pull_request.go (L225)
1 year ago
Jonathan LEI 769fb5fe97
Make clippy happy on Windows (#5644) 1 year ago
Jared Moulton 5c6b7127f8
Add build.gradle to list of java roots (#5641) 1 year ago
Yuta Yamaguchi c8d77cfdb5
refactor(helix-view): remove cfg_attr references a nonexistent feature (#5630)
Fixes https://github.com/helix-editor/helix/issues/5615
1 year ago
Luca Saccarola d99a720536
theme: make dracula ui.virtual.whitespace less intrusive (#5627) 1 year ago
Alex f103d2273b
Add `markup.strikethrough` theme keys (#5619) 1 year ago
Doug Kelkhoff 2b58ff4d7c
Add configuration for min width of line-numbers gutter (#4724) 1 year ago
Soso 8347139ff5
book: Use per-theme syntax-highlighting CSS variables (#5406)
Until this patch, all themes used the Colibri values for syntax highlighting.
This made the documentation very hard to read in some light themes.
1 year ago
Vítor Galvão 42b0401416
tutor: Change "Type" to "Press" for specials keys and modifiers (#5609) 1 year ago
eugene yokota 99fcb10860
theme: monkai_aqua variant (#5578)
Current monokai (pro or otherwise) seems too red and green,
missingthe bright aqua / cyan color found in Sublime's Monokai.

This adds a variant of monokai, which I named monokai_aqua.
1 year ago
Ivan Tham a20a96abdc
Remove apply_transaction helper (#5598) 1 year ago
Timothy DeHerrera 68fc10903a
themes: Extend snazzy (#3971) 1 year ago
yashpalgoyal1304 edd0ba7f19
book: Link MSYS2 proper command page (#5601) 1 year ago
LeoniePhiline 248a9f3635 fix(theme): Fix error background-foreground-contrast in monokai_pro_spectrum 1 year ago
LeoniePhiline 338f207d4b fix(theme): Replace non-palette color "magenta" with palette color "red" in monokai_pro_spectrum 1 year ago
anna 8e10c592b9
add lua injection regex (#5606) 1 year ago
eugene yokota 4535d0fa74 highlight(scala): update to fix potential crash (#5576)
* highlight(scala): update to fix crash

tree-sitter-scala has recently add a fix to workaround segv crashes in other editors.
Not sure if it happens to Helix as well, but it's probably a good idea to use the latest.

* highlight(scala): String interpolator support

This captures String interpolator as `function`

Co-authored-by: Chris Kipp <ckipp@pm.me>
1 year ago
Nachum Barcohen 94ef6fb69b
Add more file-types for python (#5593) 1 year ago
luetage 670c6b0d40
Kanagawa: theme rulers and some miscellaneous fixes (#5571)
* discern between rulers and whitespace, add sumiInk2
* darker background for menu and help, bold selection
* bold modifier for insert and select
* dark color for window separator
* bring ruler, whitespace, indent-guide together
1 year ago
Blaž Hrastnik efeec1282c
theme: Make github match github.com more closely
This is a slight divergence from the VSCode theme, but it's more
accurate.

https://github.com/primer/github-vscode-theme/issues/111
https://github.com/primer/github-vscode-theme/issues/88
1 year ago
Pascal Kuthe 0e5159ceca
Fix panic for noop selecting join (#5579) 1 year ago
Clément Delafargue 4d7082eb5c
theme(zenburn): separate theme for selection.ui.primary (#5573) 1 year ago
Pascal Kuthe 7868e5f2d8
highlight non-bar cursors (#5575) 1 year ago
Pascal Kuthe 1b69c7b4af
doc: add build instructions for musl-libc (#5572) 1 year ago
Gokul Soumya 5c7db7aed5 Replace menu::Item::{row, label} with format() 1 year ago
Gokul Soumya b2837ff3be Minimize allocation when converting table rows to string 1 year ago
Gokul Soumya 7a76c6cbba Use upstream implementation of table column calculation
Changed in a68e38e59e.
1 year ago
Gokul Soumya 9aafcb2b9a Reuse table in picker 1 year ago
gibbz00 deae13f404
Primary cursor colors by mode (#5130)
* (theme) feat: mode based primary cursor colors

* docs/themes: mode based primary cursor colors
1 year ago
Josh Bainbridge b65f104a3f
Fix diagnostic indicator background for gruvbox themes (#5540)
The diagnostic indicator background did not match the column or rows background
colour as this was context specific, and the background for the indicator was
being explicitly set.

This commit removes the explicit value for the indicators background allowing
it to adapt to the context. This is aligns it with other themes, and resolves
the issue.
1 year ago
mejo13 e7e47fd542
Add command to rotate view backward (#5356) 1 year ago
Clément Delafargue 9530fab4b6 doc: expand documentation on configuring minor modes
Fixes #3835, #4811
1 year ago
Clément Delafargue a02dd17e82 doc: make the order of unimpaired mappings consistent
Most mappings are next `]` then previous `[`, except for a few ones.

Fixes #5145
1 year ago
dependabot[bot] 6317e0a715
build(deps): bump hashbrown from 0.13.1 to 0.13.2 (#5559)
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.13.1 to 0.13.2.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.13.1...v0.13.2)

---
updated-dependencies:
- dependency-name: hashbrown
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
dependabot[bot] 6d34faf4fb
build(deps): bump libc from 0.2.137 to 0.2.139 (#5558)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.137 to 0.2.139.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.137...0.2.139)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
Nikodem Rabuliński 3cf5216dbd
Commit to history after executing a command from the palette (#5294) 1 year ago
greg-enbala 60f84be40c
Separate jump behavior from increment/decrement (#4123)
increment/decrement (C-a/C-x) had some buggy behavior where selections
could be offset incorrectly or the editor could panic with some edits
that changed the number of characters in a number or date. These stemmed
from the automatic jumping behavior which attempted to find the next
date or integer to increment. The jumping behavior also complicated the
code quite a bit and made the behavior somewhat difficult to predict
when using many cursors.

This change removes the automatic jumping behavior and only increments
or decrements when the full text in a range of a selection is a number
or date. This simplifies the code and fixes the panics and buggy
behaviors from changing the number of characters.
1 year ago
Ayoub Benali 97083f8836
Enable http server by default in Metals config (#5551)
This is required to make commands like [doctor-run](https://scalameta.org/metals/docs/integrations/new-editor#run-doctor) work.
It simply opens a browser to get general information about the build.

Co-authored-by: Ayoub Benali <ayoub.benali@xing.com>
1 year ago
Clément Delafargue 7bdba4a6bf doc: add missing `whitespace.render` sub-key 1 year ago
Clément Delafargue 425d7e5f1b doc: add a note about nested bindings in key remapping
It was not clear (to me) that minor modes were configurable in the
keymap configuration.
1 year ago
eugene yokota 6f6334f3c6
highlight(scala): update the Scala highlight queries (#5546)
There have been a lot of changes in tree-sitter/tree-sitter-scala,
including partial support for Scala 3 syntax and breaking changes in
some of the nodes.

This bumps up the grammar to the latest, and adjusts the queries.

Co-authored-by: Anton Sviridov <keynmol@gmail.com>
Co-authored-by: Chris Kipp <ckipp@pm.me>
1 year ago
Itay123 d3e0f18c89
Added opening files in the background with A-ret shortcut (#4435) 1 year ago
gavynriebau cce19713fb
Fix for lost clipboard contents (#5424) (#5426)
* Fix for lost clipboard contents (#5424)

* PR feedback: Call "setsid" for all unix systems

* PR Feedback: Only install libc for unix targets
1 year ago