aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
Commit message (Collapse)AuthorAge
...
* Extract markdown code block highlighting functionGokul Soumya2022-03-08
|
* Fix tab rendering to use dynamic tab widthBlaž Hrastnik2022-03-04
| | | | | | Each tab is just wide enough to round to the nearest tab stop. Refs #1243
* Fallback to broader scope if theme scope not found (#1714)Gokul Soumya2022-03-04
|
* Rename infobox theme scopes (#1741)Gokul Soumya2022-03-04
| | | This makes it play nicely with https://github.com/helix-editor/helix/pull/1714
* minor: Remove some outdated commentsBlaž Hrastnik2022-03-03
|
* Extract idle timeout code into ui/editor.rsBlaž Hrastnik2022-03-03
|
* Picker performance improvementsBlaž Hrastnik2022-03-03
|
* Add jumplist support for the search (closes #1625) (#1718)Philipp Mildenberger2022-03-01
|
* 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>
* Highlight matching text in file picker suggestions (#1635)Ludwig Stecher2022-03-01
| | | | | | | * Highlight matching text in file picker suggestions * Remove cache, specialize highlighting code * Fix outdated comments
* Show infobox to hint textobjects with `mi` and `ma` (#1686)Daniel S Poulin2022-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show infobox to hint textobjects with `mi` and `ma` * Add note to infobox than any pair of characters will work too The wording could probably be a little more clear, but I wanted to keep it short but still accurate. * Don't allocate a vec for the static help text * Fix bug where `mi<esc>` would swallow next input and persist infobox * Better help text for arbitrary pair matching in textobject selection * Add way to add fake pending key data below status, use with `mi`/`ma` This is a bit hacky as it makes use of global state which will end up managed in multiple places, but has precedent in the way autoinfo works. There should probably be a bigger refactor to handle this kind of state better. * Return early on anything other than `mi` and `ma` for autoinfo * Remove "ascii" from help text with `mi` and `ma` * Update helix-term/src/ui/editor.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Minor cleanup of file picker file gathering logic (#1683)Daniel S Poulin2022-03-01
| | | | | | | | | | | | | * Refactor file picker filetype filter logic to remove panic, make clearer An unwrap was unneccesarily present due to a prior contribution of mine which was before I had any understanding of error handling in Rust. I've also swapped a match for an if let, as was originally suggested in the original pull request adding filetype filtering, but was merged before I could address. * Add some comments to the file picker code for clarity * Switch to expect instead of ignoring type def error
* ignore Enter keypress when menu has no selection (#1704)Michael Davis2022-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ignore Enter keypress when menu has no selection supersedes #1622 Builds on the work in #1285. I want to allow Enter to create a newline when there is no selection in the autocomplete menu. This occurs somewhat often when using LSP autocomplete in Elixir which uses `do/end` blocks (and I set the autocomplete menu delay to 0 which exacerbates the problem): ```elixir defmodule MyModule do def do_foo(x) do x end def other_function(y) do| end ``` Here the cursor is `|` in insert mode. The LSP suggests `do_foo` but I want to create a newline. Hitting Enter currently closes the menu, so I end up having to hit Enter twice when the module contains any local with a `do` prefix, which can be inconsistent. With this change, we ignore the Enter keypress to end up creating the newline in this case. * pop compositor layer when ignoring Enter keypress * move closing function out of consumed event result closure * explicitly label close_fn as an 'Option<Callback>'
* 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
* fix: ui: Markdown popups stopped taking vertical padding into accountBlaž Hrastnik2022-02-21
| | | | Fix #1688
* Simplify some codeBlaž Hrastnik2022-02-21
|
* Allow separate styles for markup headings (#1618)Alex2022-02-21
| | | | | * update markdown highlighting to use separate heading themes * remove markdown theme scopes in ui
* Always ignore the .git directory in file picker (#1604)Daniel S Poulin2022-02-20
| | | | | Some users (including myself) want to turn off filtering of files prefixed with `.`, as they are often useful to edit. For example, `.env` files, configuration for linters `.eslint.json` and the like.
* ui: prompt: Render aliases + border on the docBlaž Hrastnik2022-02-20
|
* fix: Allow multi-line prompt documentationBlaž Hrastnik2022-02-20
|
* Extract a helper function for lsp::LocationBlaž Hrastnik2022-02-18
|
* feat(commands): command palette (#1400)Matouš Dzivjak2022-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(commands): command palette Add new command to display command pallete that can be used to discover and execute available commands. Fixes: https://github.com/helix-editor/helix/issues/559 * Make picker take the whole context, not just editor * Bind command pallete * Typable commands also in the palette * Show key bindings for commands * Fix tests, small refactor * Refactor keymap mapping, fix typo * Ignore sequence key bindings for now * Apply suggestions * Fix lint issues in tests * Fix after rebase Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Manually recalculate initial completion where it mattersBlaž Hrastnik2022-02-17
|
* Pass through Editor instead of ContextBlaž Hrastnik2022-02-17
|
* helix-term: implement buffer completerCole Helbling2022-02-17
| | | | | | In order to implement this completer, the completion function needs to be able to access the compositor's context (to allow it to get the list of buffers currently open in the context's editor).
* Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard ↵Ludwig Stecher2022-02-15
| | | | | | | | | | | | | | | shortcuts to file picker (#1612) * Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker * Refactor file picker paging logic * change key mapping * Add overlay component * Use closure instead of margin to calculate size * Don't wrap file picker in `Overlay` automatically
* use PathBuf::to_string_lossy() instead of to_str() (#1655)Kirawi2022-02-15
|
* Merge remote-tracking branch 'origin/master' into debugBlaž Hrastnik2022-02-13
|\
| * Instant is more suitable than SystemTime for spinnersBlaž Hrastnik2022-02-10
| |
| * feat(editor): add config for search wrap_around (#1516)Matouš Dzivjak2022-02-10
| | | | | | | | | | | | | | | | | | * feat(editor): add config for search wrap_around Fixes: https://github.com/helix-editor/helix/issues/1489 * Move search settings into separate config * Disable linter
| * Show infobox with register contentsGokul Soumya2022-02-10
| |
| * fix: There is no such thing as markup.normal, use ui.textBlaž Hrastnik2022-02-07
| |
| * ui: menu: Don't allocate scrollbar space if options fitBlaž Hrastnik2022-01-31
| |
| * ui: Only render menu scrollbar if it doesn't fitBlaž Hrastnik2022-01-31
| |
| * Render code actions as a menu, allow adding padding to popupBlaž Hrastnik2022-01-31
| |
| * Improve code action picker by displaying it inlineBlaž Hrastnik2022-01-31
| |
| * Stop collecting highlight_iter events then turning back into iterBlaž Hrastnik2022-01-30
| |
| * Remove some unnecessary clippy tagsBlaž Hrastnik2022-01-30
| |
| * Automatically commit changes to history if not in insert modeBlaž Hrastnik2022-01-30
| | | | | | | | Fixes #1500
| * Use markup scopes for the Markdown component (#1363)CossonLeo2022-01-24
| |
| * Fix picker won't scroll down when it hits the bottom #1544 (#1567)Benjamin2022-01-23
| |
| * Merge pull request #1154 from sudormrfbin/cursor-shape-newBlaž Hrastnik2022-01-23
| |\ | | | | | | Change cursor shape on mode change
| | * Merge branch 'master' into cursor-shape-newGokul Soumya2022-01-06
| | |\
| | * | Manually draw all block cursorsGokul Soumya2021-12-23
| | | |
| | * | Merge branch 'master' into cursor-shape-newGokul Soumya2021-12-18
| | |\ \
| | * | | Remove ui.cursor.primary and hashmap lookupsGokul Soumya2021-12-18
| | | | |
| | * | | Change cursor shape on mode changeGokul Soumya2021-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes #323. Due to terminal limitations we can only change the shape of the primary cursor.
| * | | | Slicing micro-optimizationBlaž Hrastnik2022-01-23
| | | | |
| * | | | Speed up ensure_next_boundary during renderBlaž Hrastnik2022-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code: let start = ensure_grapheme_boundary_next(text, text.byte_to_char(start)); let end = ensure_grapheme_boundary_next(text, text.byte_to_char(end)); Would convert byte to char index, but then internally immediately convert back to byte index, operate on it, then convert it to char index. This change reduces the amount of time spent in ensure_grapheme_boundary from 29% to 2%.