summaryrefslogtreecommitdiff
path: root/helix-term/src/ui/completion.rs
Commit message (Collapse)AuthorAge
* Add lsp signature help (#1755)Gokul Soumya2022-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lsp signature help * Do not move signature help popup on multiple triggers * Highlight current parameter in signature help * Auto close signature help * Position signature help above to not block completion * Update signature help on backspace/insert mode delete * Add lsp.auto-signature-help config option * Add serde default annotation for LspConfig * Show LSP inactive message only if signature help is invoked manually * Do not assume valid signature help response from LSP Malformed LSP responses are common, and these should not crash the editor. * Check signature help capability before sending request * Reuse Open enum for PositionBias in popup * Close signature popup and exit insert mode on escape * Add config to control signature help docs display * Use new Margin api in signature help * Invoke signature help on changing to insert mode
* Reuse menu::Item trait in picker (#2814)Gokul Soumya2022-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor menu::Item to accomodate external state Will be useful for storing editor state when reused by pickers. * Add some type aliases for readability * Reuse menu::Item trait in picker This opens the way for merging the menu and picker code in the future, since a picker is essentially a menu + prompt. More excitingly, this change will also allow aligning items in the picker, which would be useful (for example) in the command palette for aligning the descriptions to the left and the keybinds to the right in two separate columns. The item formatting of each picker has been kept as is, even though there is room for improvement now that we can format the data into columns, since that is better tackled in a separate PR. * Rename menu::Item::EditorData to Data * Call and inline filter_text() in sort_text() completion * Rename diagnostic picker's Item::Data
* Restore document state on completion cancel (#2096)Andrey Tkachenko2022-04-20
|
* Fixes #1991 LSP Auto-import (#2088)Andrey Tkachenko2022-04-16
|
* minor: Remove some outdated commentsBlaž Hrastnik2022-03-03
|
* Make repeat operator work with completion edits (#1640)Mateusz S. Szczygieł2022-03-01
| | | | | | | | | | | * add basic completion replay * use transaction as the last completion * completion replay only on trigger position * cache changes in CompletionAction Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Fix 1.60 lintsBlaž Hrastnik2022-02-25
|
* Close some popups automatically (#1285)Bram2022-02-23
| | | | | | | | | | | | | | | | | | | * Add Event::Used to use event callback without consuming * Close popup if contents ignored event * collect event results before executing callbacks * don't add new result variant, use Ignored(..) instead * break in match cases * Make auto_close configurable * fix merge * auto close hover popups * fix formatting
* Allow separate styles for markup headings (#1618)Alex2022-02-21
| | | | | * update markdown highlighting to use separate heading themes * remove markdown theme scopes in ui
* Use markup scopes for the Markdown component (#1363)CossonLeo2022-01-24
|
* Update to rust 1.58, fix a bunch of optional lintsBlaž Hrastnik2022-01-16
|
* Resolve completion item (#1315)Gabriel Berto2021-12-25
| | | Co-authored-by: Gabriel Berto <gabriel.berto@pottencial.com.br>
* Fix panic when scrolling through completion popup (#1260)Midnight Exigent2021-12-14
| | | | | | | * fix(completion_popup): Fixes #1256 * Update helix-term/src/ui/completion.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Only use a single documentation popup (#1241)Kirawi2021-12-08
|
* Ensure coords in screen depends on char width (#885)Ivan Tham2021-11-03
| | | | | The issue affected files with lots of tabs at the start as well. Fix #840
* Bump lsp-types to 0.91.0 (#932)Ivan Tham2021-10-29
|
* Clear competion items when start_offset > cursor (#906)CossonLeo2021-10-26
|
* completion: fully revert state before apply & insertText common prefixBlaž Hrastnik2021-10-25
|
* fix: If backspacing past the start offset, cancel completionBlaž Hrastnik2021-10-16
| | | | Refs #822
* Allow trigger_offset to be unused for nowBlaž Hrastnik2021-10-10
|
* Filter the initial completionBlaž Hrastnik2021-10-05
|
* Optimize completion doc position. (#691)CossonLeo2021-09-08
| | | | | | | | | | | | | | | | | | | * optimize completion doc's render * optimize completion doc's render * optimize completion doc position * cargo fmt * fix panic * use saturating_sub * fixs * fix clippy * limit completion doc max width 120
* Extract view.inner_area(), simplify render_focused_view_elementsBlaž Hrastnik2021-08-19
|
* Refactor view.first_line/first_col into view.offset (Position)Blaž Hrastnik2021-08-19
|
* Show file preview in split pane in fuzzy finder (#534)Gokul Soumya2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add preview pane for fuzzy finder * Fix picker preview lag by caching * Add picker preview for document symbols * Cache picker preview per document instead of view * Use line instead of range for preview doc * Add picker preview for buffer picker * Fix render bug and refactor picker * Refactor picker preview rendering * Split picker and preview and compose The current selected item is cloned on every event, which is undesirable * Refactor out clones in previewed picker * Retrieve doc from editor if possible in filepicker * Disable syntax highlight for picker preview Files already loaded in memory have syntax highlighting enabled * Ignore directory symlinks in file picker * Cleanup unnecessary pubs and derives * Remove unnecessary highlight from file picker * Reorganize buffer rendering * Use normal picker for code actions * Remove unnecessary generics and trait impls * Remove prepare_for_render and make render mutable * Skip picker preview if screen small, less padding
* ui: completion: Insert suggestions when tabbing over themBlaž Hrastnik2021-08-11
| | | | Fixes #498
* ui: completion: Use sort_text to sort the completionsBlaž Hrastnik2021-08-11
|
* Collect some common patterns into methods on `Range`.Nathan Vegdahl2021-07-26
|
* Fixed primary cursor position calculation to use 1-width semantics.Nathan Vegdahl2021-07-19
| | | | | This had a bunch of knock-on effects that were buggy, such as bracket match highlighting.
* Fix unused variable, parameter, and `mut` warnings in helix-term.Nathan Vegdahl2021-07-02
|
* Remove #[allow(unused)] from helix-term, and fix unused imports.Nathan Vegdahl2021-07-02
| | | | Lots of other warning still left. Will address in subsequent commits.
* reverse the dependency between helix-tui and helix-view (#366)Keith Simmons2021-06-25
| | | | | | | | | * reverse the dependency between helix-tui and helix-view by moving a fiew types to view * fix tests * clippy and format fixes Co-authored-by: Keith Simmons <keithsim@microsoft.com>
* minor: Remove old TODOsBlaž Hrastnik2021-06-22
|
* Add comment, statusline + commandline = 2wojciechkepka2021-06-20
|
* Use full screen sizewojciechkepka2021-06-20
|
* Make completion window move to top when cursor is below halfwojciechkepka2021-06-20
|
* Add ability to change theme on editorwojciechkepka2021-06-19
|
* Replace `Editor::current` by a macroBenoît CORTIER2021-06-18
| | | | | | | | | This is necessary to workaround ownership issues across function calls. The issue notably arised when implementing the registers into `Editor` and I was getting annoyed again when implementing copy/pasting into system clipboard. The problem is addressed by using macro calls instead of function calls. There is no notable side effect.
* completion: Fix unimplemented autocompleteWojciech Kępka2021-06-08
|
* Completion: Format docs tabs & highlight in the doc's native languageBlaž Hrastnik2021-05-30
|
* Completion: Render non-markdown docs tooBlaž Hrastnik2021-05-30
|
* ESC should exit both completion and insert modeBlaž Hrastnik2021-05-29
|
* Update deps, introduce the new tree-sitter lifetimesBlaž Hrastnik2021-05-27
|
* Display more data in completion popups.Blaž Hrastnik2021-05-22
|
* Completion: apply additionalTextEdits.Blaž Hrastnik2021-05-17
| | | | Used for adding imports to the file when completing.
* Drop some useless imports.Blaž Hrastnik2021-05-09
|
* Replace the Clear widget with buffer.clear/clear_with.Blaž Hrastnik2021-05-09
|
* ui: Draft for completion doc preview.Blaž Hrastnik2021-05-03
|
* lsp: support both utf-8 and utf-16 offsets.Blaž Hrastnik2021-04-14
| | | | | Still need to implement the clangd encoding negotiation, but it's a start. Should also manually override to utf8 for pyls.
* Handle c-n, c-p, etc. autocompletion events.Blaž Hrastnik2021-04-06
|