Commit Graph

906 Commits (497ff72128d2dc6c08a19c9ee88943e911c8892e)

Author SHA1 Message Date
SoraTenshi 497ff72128
Fix panic on cache validation step 3 months ago
SoraTenshi d99a121ca8 Track view ids to not render sc on other splits 3 months ago
SoraTenshi 448b78ca55 Add some look-ahead for caching 3 months ago
SoraTenshi 8067f88df7 Handle cache overdraw 4 months ago
SoraTenshi 3c8b834b61 Created a Context structure, to simplify initialization 4 months ago
SoraTenshi b460ed6384 Update to newest master
in preparation of maybe being able to smash some bugs ;)
4 months ago
SoraTenshi 49abfe5490 Merge branch 'master' into sticky-context 4 months ago
Michael Davis 5ca6a448e9
Support LSP diagnostic tags (#9780) 4 months ago
Mo 00653c772e
Avoid cloning the whole paragraph content just for rendering (#9739)
* Avoid cloning the whole paragraph content just for rendering

* Fix tests
4 months ago
Pascal Kuthe cd02976fa3
switch to regex-cursor (#9422) 4 months ago
Mo 6db666fce1
Optimization of tilde expansion (#9709)
* 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
4 months ago
Michael Davis b7b6f30084 Use a hook for resolving completion items
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.
4 months ago
Jonathan LEI cdef4f8a70
Make mouse click extend selection in select mode (#5436)
* Make mouse click extend selection in select mode

* chore: better readability with `Option::take()`
4 months ago
AlexanderDickie 9ab3f9d01a
Scroll cursor and page together (neovim-like scrolling) (#8015)
* 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 e4905729c3.

* Revert "clear line annotations outside of move_vertically/_visual"

This reverts commit 1df3fefe55.

* 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
4 months ago
Mehdi Abedi 4df08ddbe0
Allow numbers as second input event (#8471)
* Make sure pending key list is empty when count handling

This will allow using numbers as second key event.

* count handling; add an exception for 'g'

* Lookup the key event before considering a number as count

* Avoid the allocation of another vec for the pending keys

---------

Co-authored-by: x <x@torrent>
5 months ago
kyfanc fe869e5dc7
fix lsp config reload (#9415)
`syn_loader` was replaced rather than interior value being replace,
old value was still being referenced and not updated after `:config-refresh`.
By using `ArcSwap` like for `config`, each `.load()` call will return the most
updated value.

Co-authored-by: kyfan <kyfan@email>
5 months ago
ath3 f8e2d822ba
Fix scroll track (#9508) 5 months ago
Michael Davis bbcc89241f Fix pulldown_cmark breaking changes to tag types
* Tags and TagEnd are now separate enums since
  <https://redirect.github.com/raphlinus/pulldown-cmark/pull/517>.
* The `Tag::Heading` member has been changed from a tuple variant to a
  struct variant.
5 months ago
Diego a37af2dcbf
fix division by zero when prompt completion area is too small (#9524) 5 months ago
Pascal Kuthe 8e592a151f refactor completion and signature help using hooks 5 months ago
Pascal Kuthe 13ed4f6c47 Add hook/event system 5 months ago
Michael Davis 1f916e65cf Create helix-stdx crate for stdlib extensions
helix-stdx is meant to carry extensions to the stdlib or low-level
dependencies that are useful in all other crates. This commit starts
with all of the path functions from helix-core and the CWD tracking that
lived in helix-loader.

The CWD tracking in helix-loader was previously unable to call the
canonicalization functions in helix-core. Switching to our custom
canonicalization code should make no noticeable difference though
since `std::env::current_dir` returns a canonicalized path with
symlinks resolved (at least on unix).
5 months ago
Daniel Sedlak af8e524a7d
Address clippy lints (#9371) 5 months ago
Philipp Mildenberger 41ca46cf8c
Initialize diagnostics when opening a document (#8873) 6 months ago
Pascal Kuthe 48c49f0227
update history of a newly focused view (#9271) 6 months ago
ath3 9ba691cd3a
Support drawing popup frame (#4313)
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
6 months ago
Hendrik Norkowski b023faacf8
fix(ui): use crossterm cursor when at the end of the rope (#8934) 7 months ago
Hendrik Norkowski 71fd85894b
use crossterm cursor in editor when out of focus (#6858)
Use crossterm cursor in the editor when the terminal is out of focus to achieve consistent out-of-focus cursor behaviour
7 months ago
chtenb 8c68074fa6
Fix precedence of ui.virtual.whitespace (#8879)
* Revert "Revert "Fix precedence of ui.virtual.whitespace (#8750)""

This reverts commit 811d62d3b3.

* Fix ui.text overwriting the syntax highlighting

Adjust ui.text description
7 months ago
Blaž Hrastnik 811d62d3b3
Revert "Fix precedence of ui.virtual.whitespace (#8750)"
This reverts commit 41b307b673.
7 months ago
chtenb 41b307b673
Fix precedence of ui.virtual.whitespace (#8750) 7 months ago
Ryan Mehri d0430f1c81
Only render preview if picker has a preview function (#8667) 8 months ago
Paul Olteanu 8d44459c6a
Add helix-specific ignore files (#8099) 8 months ago
Yomain cd591647ec
fix(lsp): ensure we only highlight diagnostics for lsp with the feature enabled (#8551) 9 months ago
SoraTenshi 12ffcb0d39 Fix clippy issues 9 months ago
Sora 3efa3436b6
Merge branch 'master' into sticky-context 9 months ago
Michael Davis 01e281ce10
markdown: Recognize `<code>` tags with attributes as code (#8397) 9 months ago
A-Walrus f520b16fca
Style Bold/Italic/Strikethrough markdown in docs (#8385)
* Style Bold/Italic/Strikthrough markdown in docs

* Flatten to single match
9 months ago
SoraTenshi c635f18fa7
Introduce smart filtering, fix matches usage 9 months ago
Pascal Kuthe 13d4463e41 correctly center items in picker preview 10 months ago
Pascal Kuthe e9d0bd7aef fix crash in picker preview for invalid ranges 10 months ago
Pascal Kuthe eb9c37844c
fix syntax highlights in dynamic picker (#8206) 10 months ago
Michael Davis c0fd8bc61b
Fix Clone definition for Injector (#8194) 10 months ago
Pascal Kuthe e6cdc5f9d3
Don't use word splitting during fuzzy matching (#8192) 10 months ago
Pascal Kuthe 0cfd46c14f
Do not show (running) when opening picker (#8148)
* only stream from background thread if necessary

If the file transversal is longer shorter 30ms it will now be performed
on the main thread. Spawning a thread can take a while (or rather it
takes a while until that thread is scheduled) so the files can actually
take a while to show up. This prevents the `(running)` indicator from
briefly showing up when opening the file picker in a small directory.

* run partial cargo update
10 months ago
SoraTenshi e9f0e5a779 Fix rendering when cursor is overlapping with nodes 10 months ago
SoraTenshi 9d593dbb64 Merge branch 'master' into sticky-context 10 months ago
Pascal Kuthe a38ec6d6ca
avoid excessive memory consumption in picker (#8127)
* avoid excessive memory consumption from file picker

* fix typos

Co-authored-by: Chris <75008413+cd-a@users.noreply.github.com>

---------

Co-authored-by: Chris <75008413+cd-a@users.noreply.github.com>
10 months ago
Michael Davis 48373d4a2b
Clear completion when switching windows via click (#8118)
The completion component assumes that it operates on the same View but
it's possible to break this assumption by switching windows through
left-clicking. I believe we should clear the completion menu when
switching windows to fix this.

This change fixes a panic for this scenario:

* Open a buffer with LSP completion available
* Split the window (for example '<C-w>v')
* Enter insert mode and trigger the completion menu
* Select a completion candidate (for example with '<C-n>')
* Switch to the original window by left-clicking in its area
* Enter insert mode and make edits (for example 'o<backspace>')

This will trip the 'assert_eq' in Document::restore.
10 months ago
Pascal Kuthe 0cb595e226
transition to nucleo for fuzzy matching (#7814)
* transition to nucleo for fuzzy matching

* drop flakey test case

since the picker streams in results now any test that relies
on the picker containing results is potentially flakely

* use crates.io version of nucleo

* Fix typo in commands.rs

Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>

---------

Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>
10 months ago