* fix: close#9771 update OCaml
* fix: no longer match on ( ) as the underlying grammar handles these
* fix: implement excellent corrections from review
* fix: module -> namespace to match theme scopes
Test Document
-------------
```
a)b
```
Steps to Reproduce
------------------
1. % # select_all
1. ms( # surround_add
1. mam # select_textobject_around
Debug and Release
-----------------
`thread 'main' panicked at 'Attempt to index past end of RopeSlice:
char index 7, RopeSlice char length 6', ropey-1.6.1/src/slice.rs:796:13`
Description
-----------
An index was selected beyond the end of the slice with chars_at. The fix
adds a guard check to `find_nth_open_pair`, like in the other find_nth*
functions.
Test Document
-------------
```
{{
}
}
```
Steps To Reproduce
------------------
1. 2j # move_visual_line_down
1. C # copy_selection_on_next_line
1. mdm # surround_delete
Debug
-----
`assertion failed: last <= from', transaction.rs:597:13`
Release
-------
`called `Result::unwrap()` on an `Err` value: Char range out of bounds:
char range 18446744073709551614..18446744073709551615,
Rope/RopeSlice char length 7', ropey-1.6.1/src/rope.rs:546:37`
Description
-----------
Processing the surrounding pairs in order violates the assertion the
ranges are ordered. To handle nested surrounds all positions have to
be sorted. Also surround_replace has to track the proper replacement
character for each position.
Current `file-types` only supports up to a `Dockerfile.frontend` naming scheme.
With these changes `frontend.Dockerfile` now gives proper highlights and lsp actions.
1. Create a document containing `{A}`
1. C-w v # vsplit
1. gl # goto_line_end
1. b # move_prev_word_start
1. ` # switch_to_lowercase
1. mrm( # surround replace
1. C-w v # vsplit
In the debug build surround_replace/delete will immedately assert with
`assertion failed: last <= from', transaction.rs:597:13`. The splits and
lowercase conversion are not needed to trigger the bug.
In the release build the surround becomes `)a(` and the last vsplit
causes the transaction to panic.
`internal error: entered unreachable code:
(Some(Retain(18446744073709551573)))', transaction.rs:185:46`
Since the selection direction is backwards get_surround_pos returns the
pairs reversed but the downstream code assumes they are in the forward
direction.
Joining lines with Alt-J does not properly select the inserted spaces
when the selection contains blank lines. In the worst case it panics
with an out of bounds index.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
Char index out of bounds: char index 11, Rope/RopeSlice char length 10'
Steps to reproduce:
* Create a new document
```
a
b
c
d
e
```
* % (Select all)
* Alt-J (join and select the spaces)
* Fix bug 9703 by commenting out the wrong command
This fixes issue https://github.com/helix-editor/helix/issues/9703 by removing the wrong formatting command for justfiles.
* Fix indentation width for justfile
* update languages.toml: tree-sitter-lua grammar
repo has moved, use new URL and the rev of the latest release (v0.0.19)
* update highlight queries
a novice attempt to port query updates from the
source repo to Helix captures and ordering
* Apply suggestions from code review
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
---------
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
URIs need to be normalized to be comparable. For example a language
server could send a URI for a path containing '+' as '%2B' but we might
encode this in something like 'Document::url' as just '+'. We can
normalize the URI straight into a PathBuf though since this is the only
value we compare these diagnostics URIs against. This also covers
edge-cases like windows drive letter capitalization.
* Use next and avoid a redundant prefix strip
* Avoid allocations
Especially when `expand_tilde` is claled on a path
that doesn't contain a tilde.
* Add a test
* Use Into<Cow<…>>
* Put the expand_tilde test at the end of the file
* Remove unused importsw
Previously we used the IdleTimeout event to trigger LSP
`completion/resolveItem` requests. We can now refactor this to use an
event system hook instead and lower the timeout.
The Gradle build tool provides two DSLs for configuring builds. On is
based on Groovy and Gradle build files written in Gradle Groovy DSL use
*.gradle file ending.
This change adds `gradle` to the supported file types of the groovy
language configuration.