aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
Commit message (Collapse)AuthorAge
...
* Sort themes, language & files by score & then name (#2675)Michael Jones2022-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sort themes by score & then name Previously the themes were appearing unordered after typing ':theme '. This sorts them first by fuzzy score and then by name so that they generally appear in a more ordered fashion in the initial list. The sort by name does not really pay off when there is a score so an alternative approach would be to sort by name if there is string to fuzzy match against and otherwise sort by score. I've lowercased the names as that avoids lower case & upper case letters being sorted into separate groups. There might be a preferable approach to that though. * Sort language & files by score then name And change to use sort_unstable_by instead of sort_unstable_by_key as it allows us to avoid some allocations. I don't fully understand the flow of the 'filename_impl' function but this seems to deliver the desired results. * Remove unnecessary reference Co-authored-by: Michael Davis <mcarsondavis@gmail.com> Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Add mode specific styles (#2676)Mathspy2022-06-30
| | | | | | | | | | | | | * Add mode specific styles In similar vein to neovim's lualine and similar statusline packages this allows helix users to style their mode based on which mode it is thus making each mode more visually distinct at a glance * Add an example based on rosepine * Add editor.colors-mode config * Document statusline mode styles
* Add workspace and document diagnostics picker (#2013)Falco Hirschenberger2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add workspace and document diagnostics picker fixes #1891 * Fix some of @archseer's annotations * Add From<&Spans> impl for String * More descriptive parameter names. * Adding From<Cow<str>> impls for Span and Spans * Add new keymap entries to docs * Avoid some clones * Fix api change * Update helix-term/src/application.rs Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com> * Fix a clippy hint * Sort diagnostics first by URL and then by severity. * Sort diagnostics first by URL and then by severity. * Ignore missing lsp severity entries * Add truncated filepath * Typo * Strip cwd from paths and use url-path without schema * Make tests a doctest * Better variable names Co-authored-by: Falco Hirschenberger <falco.hirschenberger@itwm.fraunhofer.de> Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>
* fixes background reset (#2900)Seth Bromberger2022-06-28
| | | | | | | | | * fixes background reset * moves creation of default style out of loop * patches with background_style * removes commented code
* Refactor handling of mouse events (#2893)Gokul Soumya2022-06-27
| | | | | | - Simplified match statements by destructuring MouseEvent struct at the top and then matching on event.kind. - Extracted out closures for calculating (1) position and view of mouse click and (2) gutter coordinates and view of mouse click.
* Only draw cursorline in the currently focused bufferBlaž Hrastnik2022-06-27
|
* Implement cursorline (#2170)Tobias Menzi2022-06-27
| | | | | * Implement cursorline * Binary search possible lines
* Right align scrollbar with track in completion popup (#2754)Gokul Soumya2022-06-27
| | | | | - Align the scollbar to the right edge of the popup rather than at a margin of one. - Add a scrollbar track and a new scope `ui.menu.scroll`.
* Add single width left margin for completion popup (#2728)Gokul Soumya2022-06-26
| | | | | | | | | | | | | | * Add single width left margin for completion popup * Clear with ui.menu style before rendering menu When rendering a completion popup, the popup component will clear the area with ui.popup and then the menu component would draw over it using a table component. We remove the left edge of the area before passing it to the table component (so that it will be left as padding), and the table component uses ui.menu as the style. If ui.menu and ui.popup are different the left edge of the popup will look different from the rest of the popup. We avoid this by clearing the whole area with ui.menu in Menu::render
* fixes showing the last prompt on empty input (#2870)Saber Haj Rabiee2022-06-24
|
* check selection's visible width when copying on mouse click (#2711)Michael Davis2022-06-24
| | | | | | | | | | | | | | * check selection's visible width when copying on mouse click Mouse-click-up copies the selection produced by dragging. The event is ignored if the selection has a width of 1 though so you don't copy when clicking rather than dragging. The current check copies text when it has a visible width of 1 but is actually multiple characters in the rope like a CRLF line-ending. With this change we check the unicode width of the character(s) in the selection rather than the range length, so clicking on a CRLF line-ending does not copy. * use range.fragment to simplify getting the primary selection width
* fixes #2856 by resetting style on diagnostic (#2861)Seth Bromberger2022-06-22
|
* Fix scrollbar length proportional to total menu items (#2860)Gokul Soumya2022-06-22
| | | | | | The scrollbar length used to increase with more entries in the menu, which was counter-intuitive to how scrollbars worked in most applications. Turns out there was a typo in the floor division implementation :)
* Remove a couple more unwrapsBlaž Hrastnik2022-06-21
|
* Merge pull request #2359 from dead10ck/test-harnessBlaž Hrastnik2022-06-21
|\ | | | | Integration testing harness
| * Merge branch 'master' into test-harnessBlaž Hrastnik2022-06-21
| |\
| * | Add more context; Editor::open doesn't need to own pathSkyler Hawthorne2022-06-19
| | |
* | | Refactor Margin for fine grained control (#2727)Gokul Soumya2022-06-21
| | |
* | | Format keys identically in statusline and command palette (#2790)Gokul Soumya2022-06-21
| | | | | | | | | | | | | | | | | | The command palette previously used + as a delimiter for denoting a single key in a key sequence, (like C+w). This was at odds with how the statusline displayed them with pending keys (like <C-w>). This patch changes the palette formatting to the statusline formatting
* | | Make indent guides configurableGokul Soumya2022-06-21
| | |
* | | Add indent guides supportGokul Soumya2022-06-21
| |/ |/|
* | Default rulers color to red (#2669)Mathspy2022-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Default rulers color to red Currently if the theme a user is using doesn't have `ui.virtual.rulers` set and they set up a ruler it just fails silently making it really hard to figure out what went wrong. Did they set incorrectly set the ruler? Are they using an outdated version of Helix that doesn't support rulers? This happened to me today, I even switched to the default theme with the assumption that maybe my theme just doesn't have the rulers setup properly and it still didn't work. Not sure if this is a good idea or not, feel free to suggest better alternatives! * Use builtin Style methods instead of Bevy style defaults Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Only default the style if there's no ui or ui.virtual * Update themes style from ui.virtual to ui.virtual.whitespace * Revert ui.virtual change in onelight theme * Prefer unwrap_or_else Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* | mouse selection now uses character indexing (#2839)Mathis Brossier2022-06-20
|/
* Improve markdown list rendering (#2687)Frojdholm2022-06-15
| | | | | | | * Cleanup old commented code * Implement line breaks in markdown rendering * Implement markdown nested, numbered and multiparagraph lists
* Better handling of symlinks (#2718)Roland Kovacs2022-06-15
| | | | | | | | | | - Add file-picker.follow-symlinks configuration option (default is true), this also controls if filename and directory completers follow symlinks. - Update FilePicker to set editor error if opening a file fails, instead of panicing. Fix #1548 Fix #2246
* Do not add extra line breaks in markdown lists (#2689)Frojdholm2022-06-08
|
* prompt: If submitting empty prompt, use default (last used)Blaž Hrastnik2022-06-06
|
* Update to ropey 1.5Blaž Hrastnik2022-05-30
|
* Bump dependencies, allow retain_mut for nowBlaž Hrastnik2022-05-29
|
* Add theme key for picker separator (#2523)kyrime2022-05-22
| | | Co-authored-by: ky <>
* address rust 1.61.0 clippy lints (#2514)Michael Davis2022-05-20
|
* use ui.menu instead of ui.statusline for command completion menu themeChristoph Horn2022-05-20
|
* Separate colors for different diagnostics types (#2437)Robert Walter2022-05-20
| | | | | | | | | | | | | | | | | | | | | | * feat(theme): add separate diagnostic colors This commit adds separate diagnostic highlight colors for the different types of LSP severities. If the severity type doesn't exist or is unknown, we use some fallback coloring which was in use before this commit. Some initial color options were also added in the theme.toml Resolves issue #2157 * feat(theme): add docs for new diagnostic options * feat(theme): adjust defaults & reduce redundancy - the different colors for different diagnostic severities are now disabled in the default theme, instead diagnostics are just generally underlined (as prior to the changes of this feature) - the theme querying is now done once instead of every iteration in the loop of processing every diagnostic message
* support insert register in prompt (#2458)Bob2022-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | * support insert register in prompt * use next_char_handler instead of a flag * Fix clippy issue * show autoinfo when inserting register * Revert "show autoinfo when inserting register" This reverts commit 5488344de1c607d44bdf8693287a85b92cb32518. * use completion instead of autoinfo autoinfo is overlapped when using prompt * recalculate_completion after inserting register * Update helix-term/src/ui/prompt.rs Co-authored-by: Ivan Tham <pickfire@riseup.net> Co-authored-by: Ivan Tham <pickfire@riseup.net>
* deletion of lines affecting popup scrolling (#2497)Alexis Kalabura2022-05-20
|
* Auto-complete directory members (#1801) (#1907)Roland Kovacs2022-05-02
| | | | | | Allow tab-completion to continue when there is only a single, unambigous completion target which is a directory. This allows e.g. nested directories to be quickly drilled down just by hitting <tab> instead of first selecting the completion then hitting <enter>.
* feat(ui): add nbsp (non-breaking space) to rendered whitespace (#2322)unrelentingtech2022-04-30
|
* prevent rendering visible whitespace on trailing cursor (#2331)Michael Davis2022-04-30
|
* feat(ui): treat slashes as word separators in prompt (#2315)unrelentingtech2022-04-30
| | | | When fiddling with paths in a :o prompt, one usually would want Ctrl-W to erase a path segment rather than the whole path. This is how Ctrl-W works in e.g. (neo)vim out of the box.
* fix typos (#2304)chunghha2022-04-27
|
* allow whitespace to be renderedOmnikar2022-04-20
| | | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Added ability to remap 0 if it is not part of a count (#2174)adaliaramon2022-04-20
| | | | | * Added ability to remap 0 * Removed duplicated match body
* Add rulers option (#2060)Thomas2022-04-20
| | | | | | | * Add color_column option * Rename to ruler Co-authored-by: DeviousStoat <devious@stoat.com>
* Restore document state on completion cancel (#2096)Andrey Tkachenko2022-04-20
|
* Fixes #1991 LSP Auto-import (#2088)Andrey Tkachenko2022-04-16
|
* Make gutters configurable (#1967)Dr. David A. Kunz2022-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config option line numbers none * view tests * added tests * doc * comment * Make gutters configurable * docu * docu * rm none docu * order * order * precedence * simpler * rm todo * fixed clippy * order * double quotes * only allow diagnostics and line-numbers * tests * docu * format * rm short variant and more docu * performance improvements * typo * rename
* fix: prompt: pass through unmapped keys regardless of modifiersBlaž Hrastnik2022-04-13
| | | | | | | | Ctrl + Alt is apparently another common sequence for AltGr: https://devblogs.microsoft.com/oldnewthing/20040329-00/?p=40003 Fixes #595 Fixes #2080
* Apply ui.gutter style to empty gutters (#2032)unrelentingtech2022-04-12
| | | | The unstyled column on the left from the diagnostics_or_breakpoints gutter looks sad if you want to add a background to all gutters. Let's fix this.
* Compute style only once per source highlight event (#1966)Gokul Soumya2022-04-08
| | | | | During a single HighlightEvent::Source, the highlight spans do not change and we can merge them into a single style at the beginning of the event and use it instead of re-computing it for every grapheme
* Add runtime language configuration (#1794) (#1866)Roland Kovacs2022-04-05
| | | | | | | | | | | | | | | | | | | | | * Add runtime language configuration (#1794) * Add set-language typable command to change the language of current buffer. * Add completer for available language options. * Update set-language to refresh language server as well * Add language id based config lookup on `syntax::Loader`. * Add `Document::set_language3` to set programming language based on language id. * Update `Editor::refresh_language_server` to try language detection only if language is not already set. * Remove language detection from Editor::refresh_language_server * Move document language detection to where the scratch buffer is saved. * Rename Document::set_language3 to Document::set_language_by_language_id. * Remove unnecessary clone in completers::language