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.
* Add Groovy grammar
* Rewrite Neovim captures into Helix for Groovy
* Simplify Groovy injections
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Remove Neovim's spell from Groovy highlights
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Apply suggestions to languages.toml
* Escape backslash in groovy highlights.scm
---------
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* languages: add docker-compose language
it uses docker-compose-langserver as lsp
And yaml for syntax highlighting, indents and injections
* languages: add luajit as a shebang of lua
This helps to provide syntax highlighting and
other lua goodies when writing luajit
* book(update): run cargo xtask docgen
* since #8006 full filenames uses glob
* neovim like scroll function
* clear line annotations outside of move_vertically/_visual
* add nvim scroll function to commands
* assign nvim-scroll to C-d and C-u (half page scrolls)
* dont remove backspace and space mapping
* move non-softwrap logic to seperate function, call this in nvim-scroll fn
* Revert "move non-softwrap logic to seperate function, call this in nvim-scroll fn"
This reverts commit e4905729c338a2260e6981f1d8fac022897b4191.
* Revert "clear line annotations outside of move_vertically/_visual"
This reverts commit 1df3fefe55afc840d1ab5094b2116d1127fc363f.
* add TODO for when inline diagnostics gets merged
* move nvim-scroll logic into scroll(), dont respect scrolloff
* run cargo fmt
* run cargo clippy
* update documenation for Ctrl-d and Ctrl-u remap
* Add conf as a bash file type
Tmux and tmux.conf is used widely in software developer circles.
Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".
* Use tmux.conf glob instead of simply conf for tmux
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
---------
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Make sonokai palette perfectfully faithful
* Amend theme to better match original sonokai
Changes based on the following references:
(1) https://www.sainnhe.dev/post/contributing-guide/#sonokai
(2) https://github.com/sainnhe/sonokai/blob/master/colors/sonokai.vim
* Make constants white (1)
* Make builtin variables purple (1)
* Make members orange (1)
* Make labels red (2)
* Make operators red (1)
* Make all punctuation grey (2)
* Make builtin functions and macros green (2)
* Make diff delta blue (2)
* Make cursor match bg4 (2)
* Make visible whitespace bg4 (2)
* Make Sonokai special punctuation yellow