aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
Commit message (Collapse)AuthorAge
...
* clipboard: add logging and healthcheck (#3271)Amit Beka2022-07-31
| | | | | | | * add logging to clipboard setup * healthcheck: add clipboard provider name Co-authored-by: amitbeka <--->
* add configurable / theme-able statusline separator string (#3175)Seth Bromberger2022-07-26
| | | | | | | | | | | * add configurable separator element to statusline * themable separator * clippy fixes * changed default separator to │ * doc updates
* add position-percentage as a statusline indicator (#3168)Seth Bromberger2022-07-26
| | | | | | | | | * added position-pct as a statusline indicator * removed unnecessary mutable reference * pct -> percent * percent -> percentage
* Rename padding to spacer, remove by defaultBlaž Hrastnik2022-07-26
|
* Make gutters padding automatic (#3163)Ivan Tham2022-07-26
| | | | Remove padding gutter type, and automatically add 1 padding if gutters is non-empty.
* add spacer element to statusline (#3165)Seth Bromberger2022-07-26
| | | | | * add spacer element to statusline * docs
* Fix different document panic (#3160)Kyle L. Davis2022-07-23
| | | Would panic when given the view for the current document for a different document.
* Indent with tabs by default (#3095)Mr. E2022-07-22
|
* keep jump/file history when using :split (#3031)Robin2022-07-22
| | | | | | | * keep jump/file history when using :split * move history cloning into the switch function Co-authored-by: Robin <robinvandijk@klippa.com>
* jumplist picker (#3033)Bob2022-07-22
| | | | | | | | | | | | | * jumplist picker * remove jumps slicing Co-authored-by: Benoît Cortier <bcortier@proton.me> * remove unnecessary deref format! parameter Co-authored-by: Benoît Cortier <bcortier@proton.me> Co-authored-by: Benoît Cortier <bcortier@proton.me>
* add statusline element to display file line endings (#3113)Alexis Kalabura2022-07-21
| | | | | | | | | * add statusline element to display file line endings * run cargo fmt --all * change the word *ending* from plural to singular * support for the unicode-lines feature flag
* 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
* Make gutters padding optional (#2996)Ivan Tham2022-07-18
| | | | If all gutters are removed, there are still an extra one padding, would be nice to remove that to save some space.
* Customizable/configurable status line (#2434)Mr. E2022-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(statusline): add the file type (language id) to the status line * refactor(statusline): move the statusline implementation into an own struct * refactor(statusline): split the statusline implementation into different functions * refactor(statusline): Append elements using a consistent API This is a preparation for the configurability which is about to be implemented. * refactor(statusline): implement render_diagnostics() This avoid cluttering the render() function and will simplify configurability. * feat(statusline): make the status line configurable * refactor(statusline): make clippy happy * refactor(statusline): avoid intermediate StatusLineObject Use a more functional approach to obtain render functions and write to the buffers, and avoid an intermediate StatusLineElement object. * fix(statusline): avoid rendering the left elements twice * refactor(statusline): make clippy happy again * refactor(statusline): rename `buffer` into `parts` * refactor(statusline): ensure the match is exhaustive * fix(statusline): avoid an overflow when calculating the maximal center width * chore(statusline): Describe the statusline configurability in the book * chore(statusline): Correct and add documentation * refactor(statusline): refactor some code following the code review Avoid very small helper functions for the diagnositcs and inline them instead. Rename the config field `status_line` to `statusline` to remain consistent with `bufferline`. * chore(statusline): adjust documentation following the config field refactoring * revert(statusline): revert regression introduced by c0a1870 * chore(statusline): slight adjustment in the configuration documentation * feat(statusline): integrate changes from #2676 after rebasing * refactor(statusline): remove the StatusLine struct Because none of the functions need `Self` and all of them are in an own file, there is no explicit need for the struct. * fix(statusline): restore the configurability of color modes The configuration was ignored after reintegrating the changes of #2676 in 8d28f95. * fix(statusline): remove the spinner padding * refactor(statusline): remove unnecessary format!()
* Add live preview to theme picker (#1798)Joe2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add theme picker with live preview * Add live theme preview to :theme command * cargo fmt * Fix clippy warnings * Remove picker variant * Remove unused import * Cleanup * Change current_theme to last_theme * Fix accidental comment flash deletion * Typo * Remove theme cache * Add some comments * Refactor some theme handling TIL flatmap on Option is called and_then * Remove unnecessary renames * Constrain last_theme theme preview lifecycle * Switch to bitflag implementation * Better handling of last_theme * Sort theme names * Better memory juggling * Missed a branch * Remove name from theme, switch bitand to & * cargo fmt * Update helix-view/src/editor.rs * Switch boolean to enum * Remove bitflag impl * cargo fmt * Remove un-needed type arg * cargo fmt
* 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>
* Implement cursorline (#2170)Tobias Menzi2022-06-27
| | | | | * Implement cursorline * Binary search possible lines
* 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
| | |
| * | tests for buffer-closeSkyler Hawthorne2022-06-19
| | |
| * | tests for serialized writesSkyler Hawthorne2022-06-19
| | |
| * | Fix initial selection of Document in new viewSkyler Hawthorne2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a new View of a Document is created, a default cursor of 0, 0 is created, and it does not get normalized to a single width cursor until at least one movement of the cursor happens. This appears to have no practical negative effect that I could find, but it makes tests difficult to work with, since the initial selection is not what you expect it to be. This changes the initial selection of a new View to be the width of the first grapheme in the text.
| * | improve test harnessSkyler Hawthorne2022-06-19
| | | | | | | | | | | | | | | | | | | | | * Use new macro syntax for encoding sequences of keys * Make convenience helpers for common test pattern * Use indoc for inline indented raw strings * Add feature flag for integration testing to disable rendering
* | | add history suggest to global search (#2717)Termina942022-06-21
| | | | | | | | | Co-authored-by: Dean Revell <revell@gmail.com>
* | | 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
| |/ |/|
* | feat: make `move_vertically` aware of tabs and wide characters (#2620)Matthew Toohey2022-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | * feat: make `move_vertically` aware of tabs and wide characters * refactor: replace unnecessary checked_sub with comparison * refactor: leave pos_at_coords unchanged and introduce separate pos_at_visual_coords * style: include comment to explain `pos_at_visual_coords` breaking condition * refactor: use `pos_at_visual_coords` in `text_pos_at_screen_coords` * feat: make `copy_selection_on_line` aware of wide characters
* | Display highest severity diagnostic in gutter (#2835)A-Walrus2022-06-21
|/ | | | | | | | | | * Display highest severity diagnostic in gutter * Improve gutter diagnostic performance Very slight improvement (doesn't really make a difference), iterates over the diagnostics of the line once instead of twice. * Add comment justifying unwrap
* simplify some keymap key names follow up tests (#2694)Henry2022-06-17
|
* Update auto-pairs and idle-timeout when the config is reloaded (#2736)Bjorn Ove Hay Andersen2022-06-15
|
* 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
* simplify fallback for selected line-number theming (#2768)Michael Davis2022-06-14
|
* minor: Simplify Document.language_id()Blaž Hrastnik2022-06-06
|
* simplify some keymap key names (#2677)Henry2022-06-06
|
* Passing extra formatting options to LSPs (#2635)farwyler2022-06-05
| | | | | | | | | | | | | * allows passing extra formatting options to LSPs - adds optional field 'format' to [[language]] sections in 'languages.toml' - passes specified options the LSPs via FormattingOptions * cleaner conversion of formatting properties * move formatting options inside lsp::Client * cleans up formatting properties merge
* Fix crash due to cycles when replaying macros (#2647)gavynriebau2022-06-05
| | | | | | | | In certain circumstances it was possible to get into an infinite loop when replaying macros such as when different macros attempt to replay each other. This commit adds changes to track which macros are currently being replayed and prevent getting into infinite loops.
* Fix panic on close last buffer (#2367) (#2658)gavynriebau2022-06-05
| | | | | | | | | | | | | | * Fix panic on close last buffer (#2367) In certain circumstances it was possible to cause a panic when closing buffers due to some mishandling of view document history. A change has been made to delete removed documents from the history of accessed documents for each view. The ensures we don't attempt to jump to a deleted document by mistake. * Move remove document code into View function 'remove_document' * Replace 'view.jumps.remove' call with 'view.remove_document' call
* Improve Readability (#2639)Ryan Russell2022-06-01
|
* fix: Remove empty scratch buffer from jumplists when removing itBlaž Hrastnik2022-05-29
| | | | Fixes #1238
* lower MSRV to 1.57.0Michael Davis2022-05-23
| | | | | | | | This line uses the Display trait for io::ErrorKind which was stabilized in Rust 1.60.0. We can set MSRV all the way back to 1.57.0 by replacing it with a pretty-print. Closes #2460.
* Move Tree nodes on view swapRoland Kovacs2022-05-21
| | | | | Instead of moving the Node contents on view swap if they have the same parent reorder them to keep traversal order otherwise re-parent them.
* Implement view swappingRoland Kovacs2022-05-21
| | | | | | | * add Tree::swap_split_in_direction() * add swap_view_{left,down,up,right} commands, bound to H,J,K,L respectively in the Window menu(s) * add test for view swapping
* Implement view transpose (#2461)Roland Kovacs2022-05-20
| | | | | | | Change the layout of existing split view from horizontal to vertical and vica-versa. It only effects the focused view and its siblings, i.e. not recursive. Command is mapped to 't' or 'C-t' under the Window menus.
* Run debug console in windows (#2294)Alexis Kalabura2022-05-11
|
* prefer Document::set_selection to inserting selections directly (#2411)Michael Davis2022-05-11
| | | | | | | | | | | | | | | | | | | Inserting these with the `HashMap::insert` method evades the call to `Selection::ensure_invariants`. The effect is that the scratch buffer (or other buffers opened through these code-paths) can start with a selection at (0, 0), when a file with equivalent contents ("\n") would start with (0, 1). I.e.: hx and touch f hx f start with different selections even though they have an equivalent Rope. With this change they both start with (0, 1).
* cfg-gate unused functions on macos & windows (#2332)Kirawi2022-05-02
|
* feat(commands): make it possible to disable format-on-save via the ↵unrelentingtech2022-05-02
| | | | 'auto-format' option (#2321)