Commit Graph

2213 Commits (44504b720b5ad2ac8bf521b678a3fae2370f182d)

Author SHA1 Message Date
Michael Davis 6f1437e9f3
LSP: Resolve completion items when any info is missing (#10873) 5 months ago
Marty c39cde8fc2
Flush pending writes before suspend (#10797)
* flush saves before suspending

* review suggestion

Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>

* review changes

---------

Co-authored-by: PotatoesFall <martyk@tuta.io>
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
5 months ago
Poliorcetics 972265640d
fix: correctly reset inlay hints when stopping or restarting LSPs for a document (#10741) 6 months ago
Mark Stosberg 730e684d1d
Correct typo in "current buffer's directory" (#10814) 6 months ago
Blaž Hrastnik dfcd814389 tui: Constify functions, shrink Margin representation 6 months ago
Michael Davis ff6aca12b7
Reset all changes overlapped by selections in ':reset-diff-change' (#10178)
This is useful for resetting multiple changes at once. For example you
might use 'maf' or even '%' to select a larger region and reset all
changes within.

The original behavior of resetting the change on the current line is
retained when the primary selection is 1-width since we look for chunks
in the line range of each selection.
6 months ago
Michael Davis 5c11af1479 `cargo fmt` 6 months ago
Michael Davis 9dd51e75e0 Resolve new Clippy lints 6 months ago
Szabin beb5afcbef
Revert "Refactor statusline elements to build `Spans` (#9122)" (#10642) 6 months ago
François Laignel f86f350d5d
Debugger template: allow missing or empty completion list (#10332)
It can be convenient to define project specific debugger templates, some of
which might not necessitate prompting the user to define completion.

This commit makes completion optional for debugger templates and starts the
dap immediately if undefined or empty.
6 months ago
Hichem cfca30887c
signature: use the suggested LSP signature when changed (#10655)
some LSPs does update the active signature and some not. To make both
worlds happy, make the active signature more intelligent.

1. SignatureHelp store now the suggested lsp_signature
2. if the lsp_signature changes then use it
3. otherwise use the last signature from the old popup
4. in case the old signature doesn't exist anymore, show the last signature

Signed-off-by: Ben Fekih, Hichem <hichem.f@live.de>
7 months ago
Kitsu ec224798e7
fix: do not stop at first url at goto_file (#10622) 7 months ago
Pascal Kuthe e2594b64c0 move popup when cursor line changes
Co-authored-by: Ben Fekih, Hichem" <hichem.f@live.de>
7 months ago
Pascal Kuthe 93e8c16614 fix required_size implementation of signature help
Trunctation should always be handled by the parent. Returning None is
only supposed to indicate a missing implementation

Co-authored-by: Ben Fekih, Hichem" <hichem.f@live.de>
7 months ago
Pascal Kuthe 2d6d876a23 fix popup size calculation
Co-authored-by: ath3 <ha05190@protonmail.com>
7 months ago
woojiq 81dc8e8d6b feat: find closest pair using tree-sitter 7 months ago
Pascal Kuthe 38ee845b05 don't overload LS with completion resolve requests
While moving completion resolve to the event system in #9668 we introduced what
is essentially a "DOS attack" on slow LSPs. Completion resolve requests were
made in the render loop and debounced with a timeout. Once the timeout expired
the resolve request was made. The problem is the next frame would immediately
request a new completion resolve request (and mark the old one as obsolete but
because LSP has no notion of cancelation the server would still process it). So
we were in essence sending one completion request to the server every 150ms and
only stopped if the server managed to respond before we rendered a new frame.
This caused overload on slower machines/with slower LS.

In this PR I revamped the resolve handler so that a request is only ever
resolved once. Both by checking if a request is already in-flight and by marking
failed resolve requests as resolved.
7 months ago
Pascal Kuthe b834806dbc use newtype parttern for langauge server id 7 months ago
Simran Kedia 26d9610e78
Ignore .svn version control files (#10536)
Co-authored-by: Simran Kedia <simk@fb.com>
7 months ago
Ben Fekih, Hichem 4b8bcd2773 popup: call required_size only once while rendering
to speed up the rendering a little

Signed-off-by: Ben Fekih, Hichem <hichem.f@live.de>
7 months ago
Ben Fekih, Hichem af4ff80524 Improve popup position
Make the popup positions more consistent.
Improvements:
1. if the signature popup content is bigger than the available space,
   then the popup is always shown under the cursor, even if there more
   space above the cursor than below
2. There is no mutation anymore inside required_size. Maybe in the future
   we can update all widgets to have no mutations and change the trait

Signed-off-by: Ben Fekih, Hichem <hichem.f@live.de>
7 months ago
Michael Davis 211f368064
Respect mode when starting a search (#10505)
Currently the editor mode has no effect on the behavior of `search` and
`rsearch`. We can pass in the right movement for the editor mode to make
the behavior or `search` and `rsearch` match `search_next` and
`search_prev` in select mode.
7 months ago
Sean Perry 30baff907d
Implement read command (#10447)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Ibrahim Dursun <ibrahim@dursun.cc>
7 months ago
ath3 521accaf00
Include "change" in textobject autoinfo (#10496) 7 months ago
Hichem 69e08d9e91
allow cycling through function signatures/overloads (#9974)
implement handle_event to cycle through the function signatures.

To change the signature press alt+p/n .

Signed-off-by: Ben Fekih, Hichem <hichem.f@live.de>
7 months ago
Matthew Bourke 8e161723ee
Enabled traversing multiple buffers at once (#10463)
* Enable traversing multiple buffers at once

* run cargo fmt

* simplify iterator call
7 months ago
Pascal Kuthe 73d26d0d97
don't manually grapheme align ts highlights (#10310) 7 months ago
Pascal Kuthe f601b7c278
fix char/byte index mixup in overlay rendering (#10317) 7 months ago
Skyler Hawthorne c99c333337 Use new in-crate TreeCursor 7 months ago
Skyler Hawthorne fa67c5c474 feat(command): select_all_children 7 months ago
Skyler Hawthorne 87c4161732 feat(command): select_all_siblings 7 months ago
Evgeniy Tatarkin 07cb24abdd
Respect lsp definition order for code actions (#9590) 7 months ago
Hichem ea2a4858b7
Fix scrolling to the end within a popup (#10181)
when the available height for the popup is low/small, then it is not
possible to scroll until the end

Signed-off-by: Ben Fekih, Hichem <hichem.f@live.de>
7 months ago
Diego 92338bc207
fix mouse right click selection (#10067) 7 months ago
TornaxO7 e69292e5eb
Improve `goto_file_impl` (#9065) 7 months ago
Michael Davis f240d896a4
Merge unnecessary/deprecated diagnostic highlights separately (#10084)
Previously unnecessary/deprecated diagnostic tags replaced the highlight
for the severity of a diagnostic. This could cause either the severity
or unnecessary/deprecated scopes to disappear when diagnostic ranges
overlapped though. Plus the severity highlight can be interesting in
addition to the unnecessary/deprecated highlight.

So this change separates the unnecessary and deprecated highlights from
the severity highlights, so each is merged separately and when they
overlap, the highlights are combined.
7 months ago
Harishankar G 962c714185
Use an enum to represent yank decision during deletion of a selection (#10148) 7 months ago
Tshepang Mbambo 3e2b85c61b
remove redundant imports (#10154) 7 months ago
Harishankar G f773972241
Use a boolean to indicate whether to yank during deletion of a selection (#10132) 7 months ago
woojiq cc8290f393
show newest options in jumplist picker first, fix docs (#10095)
* docs: mention `<space>g` changed file picker

* picker(jumplist): show jumps in order from latest to oldest
8 months ago
Jonathan LEI a224ee5079
Changed file picker (#5645)
Co-authored-by: WJH <hou32hou@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
8 months ago
Daniel S Poulin 1abb64e48d
Add textobject for entries/elements of list-like things (#8150) 8 months ago
Gokul Soumya 957d030be9
Support scrolling popup contents using mouse (#10053)
* Extract popup scrolling code into named functions

* Scroll popup contents on mouse scroll event

* Ignore mouse events outside the popup

* Remove unneeded return statement
8 months ago
Michael Davis cb286b7a5d
Fix rustc warnings about unused 'pub use's (#10011) 8 months ago
Michael Davis 07e21a10f0
Revert "helix-term: allow to backspace out-of the command prompt (#9828)" (#10005)
This reverts commit 0dc67ff885.

See the post-merge discussion in #9828. The old behavior was less
surprising and we have other ways to abort from a prompt, so let's
revert the behavior change.
8 months ago
Blaž Hrastnik a0d6566140
Fix regression in color-modes
Fixes #10006
8 months ago
Quentin 614a744d24
Add narrow no-break space support (#9604) 8 months ago
Pascal Kuthe b46064b8c4 Add an Amp-like jump command
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
8 months ago
Pascal Kuthe 66b9ff1d2a dismiss pending keys properly for mouse/paste 8 months ago
Pascal Kuthe 69e07ab61e use slices instead of Rc for virtual text 8 months ago