aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
Commit message (Collapse)AuthorAge
* Extract gutters into helix-viewBlaž Hrastnik2021-11-29
|
* Reuse a text buffer for each gutter lineBlaž Hrastnik2021-11-29
|
* Tie the GutterFn lifetime to the doc so we can avoid cloning dataBlaž Hrastnik2021-11-29
|
* Gutter functionsBlaž Hrastnik2021-11-29
|
* Jump to end char of surrounding pair from any cursor pos (#1121)Martin Junghanns2021-11-20
| | | | | | | | | | | | | | | * Jump to end char of surrounding pair from any cursor pos * Separate bracket matching into exact and fuzzy search * Add constants for bracket chars * Abort early if char under cursor is not a bracket * Simplify bracket char validation * Refactor node search and unify find methods * Remove bracket constants
* ui: Increase diagnostics sideline width to 100 max and wrap if neededBlaž Hrastnik2021-11-16
|
* Implement "Goto last modification" command (#1067)ath32021-11-14
|
* helix-term/editor: display scratch buffer name in status barCole Helbling2021-11-14
|
* Allow keys to be mapped to sequences of commands (#589)Omnikar2021-11-11
| | | | | | | | | * Allow keys to be mapped to sequences of commands * Handle `Sequence` at the start of `Keymap::get` * Use `"[Multiple commands]"` as command sequence doc * Add command sequence example to `remapping.md`
* Allow infoboxes to be disabled (#972)Omnikar2021-11-05
| | | | | | | | | | | * Allow infoboxes to be disabled * Document `infoboxes` default value * Rename `infoboxes` to `auto_info` * Document `auto-info` * Fix incomplete rename
* Replace documents SlotMap with BTreeMapBlaž Hrastnik2021-11-04
|
* Extract a clear_completion methodBlaž Hrastnik2021-10-29
|
* Improve statusline (#916)Omnikar2021-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Improve statusline * Change diagnostic count display to show counts of individual diagnostic types next to their corresponding gutter dots. * Add selection count to the statusline. * Do not display info or hint count in statusline * Reduce padding Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * Reduce padding Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * Use `Span::styled` * Reduce padding * Use `Style::patch` * Remove unnecessary `Cow` creation Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* fix warningBlaž Hrastnik2021-10-25
|
* completion: fully revert state before apply & insertText common prefixBlaž Hrastnik2021-10-25
|
* Mark a few functions as `const`Blaž Hrastnik2021-10-24
|
* fix: Don't crash on empty completion, don't retrigger on closeBlaž Hrastnik2021-10-07
|
* Filter the initial completionBlaž Hrastnik2021-10-05
|
* Experiment with autocompletion on idleBlaž Hrastnik2021-10-05
|
* idle timer wipBlaž Hrastnik2021-10-05
|
* syntax: Properly handle injection-regex for language injectionsBlaž Hrastnik2021-09-16
|
* Regex prompts should have a history with a specifiable registerBlaž Hrastnik2021-09-08
|
* Add a sticky mode for keymaps (#635)Gokul Soumya2021-09-05
|
* fix: use .cursor() instead of .headgbaranski2021-08-30
|
* fix: use head instead of anchor for relative linegbaranski2021-08-30
|
* Fix code indentation (#671)Omnikar2021-08-30
|
* fix: show current line number even if relative line is on (#656)Grzegorz Baranski2021-08-26
|
* better panic messages for when you're missing selection scopes (#608)Kirawi2021-08-22
|
* Refactor new Rect construction (#575)Gokul Soumya2021-08-21
| | | | | | | | | | * Refactor new Rect construction Introduces methods that can be chained to construct new Rects out of pre-existing ones * Clamp x and y to edges in Rect chop methods * Rename Rect clipping functions
* Fix clippy attrBlaž Hrastnik2021-08-19
|
* Avoid looking up ui.text per highlight rangeBlaž Hrastnik2021-08-19
|
* 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
|
* feat: relative numbers (#485)Grzegorz Baranski2021-08-16
| | | | | | | | | | | | | | | | | | | * feat(helix-view): configuring line-number * feat(helix-term): relative line numbers * feat(helix-term): passing editor::Config to render * fix(helix-view): remove LineNumber::None * feat(helix-term): rendering line-number according to configuration * fix(term): put calculating current line above line iteration * fix: add abs_diff function * deps: cargo update * fix: pass config argument
* 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
* Support primary clipboard (#548)Dmitry Sharshakov2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clipboard-none: add in-memory fallback buffer Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * view: add Wayland primary clipboard Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Format Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: copy to primary selection after mouse move stops Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: don't update primary selection if it is a single character Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: discard result of setting primary selection Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: add commands for interaction with primary clipboard Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * editor: implement primary selection copy/paste using commands Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * clipboard: support xsel for primary selection Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * clipboard: support xclip for primary selection Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: multiple cursor support for middle click paste Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * rename primary selection to primary clipboard in scope of PR Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: make middle click paste optional Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Format Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Update helix-term/src/ui/editor.rs * fix formatting Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * config: correct defaults if terminal prop is not set Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * refactor: merge clipboard and primary selection implementations Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Tidy up code Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * view: remove names for different clipboard/selection providers Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Update helix-view/src/clipboard.rs Co-authored-by: Gokul Soumya <gokulps15@gmail.com> * helix-view: tidy macros Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: refactor paste-replace commands Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: use new config for middle-click-paste Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * clipboard: remove memory fallback for command and windows providers Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * clipboard-win: fix build Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * clipboard: return empty string when primary clipboard is missing Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * clipboard: fix errors in Windows build Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* helix-term: handle scrolling when mouse is enabled (#554)Dmitry Sharshakov2021-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * helix-term: handle scrolling when mouse is enabled Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: configure scrolling speed Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: use new config for scrolling Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * config: defaults for edtior config Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * config: add scroll-lines property Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: scroll hovered view Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: support inverted scrolling Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: remove duplicating code Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: do not focus view while scrolled Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * helix-term: refactor mouse events and scrolling Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * simplify Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Appease clippyBlaž Hrastnik2021-08-10
|
* Only recalculate resize during rendering, this stops flashing on resizeBlaž Hrastnik2021-08-10
|
* fix small terminal size panic with info popup (#563)Kirawi2021-08-09
| | | | | | | * fix small terminal size panic with info popup * remove unused enumerator * fix subtraction overflow panic
* config: Rename [terminal] to [editor] and pass it into EditorBlaž Hrastnik2021-08-08
|
* mouse: Remove verify_screen_coords, refactor primary selection modificationBlaž Hrastnik2021-07-30
|
* Remove the jumpBlaž Hrastnik2021-07-30
|
* Mouse selection support (#509)Dmitry Sharshakov2021-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial mouse selection support Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Disable mouse event capture if editor crashes Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Translate screen coordinates to view position Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Select full lines by dragging on line numbers Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * editor: don't register dragging as a jump Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Count graphemes correctly Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Do not select lines when dragging on the line number bar Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Split out verify_screen_coords Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Do not iterate over the graphemes twice Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Switch view by clicking on it Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Add disable-mouse config option Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Support multiple selections with mouse Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Remove unnecessary check Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Refactor using match expression Co-authored-by: Gokul Soumya <gokulps15@gmail.com> Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Rename local variable Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Rename mouse option Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Refactor code Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Fix dragging selection Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Fix crash when clicking past last line Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Count characters better Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Remove comparison not needed anymore Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Validate coordinates before resolving position Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Tidy up references to editor tree Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Better way to determine line end and avoid overflow Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Fix for last line Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Add unit tests for text_pos_at_screen_coords Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* Merge branch 'master' into great_line_ending_and_cursor_range_cleanupNathan Vegdahl2021-07-28
|\
| * Show pending keys in status line (#515)Gokul Soumya2021-07-28
| | | | | | | | | | * Show pending keys and counts in status line * Refactor pending key display
* | Merge branch 'master' into great_line_ending_and_cursor_range_cleanupNathan Vegdahl2021-07-26
|\|
| * Allow multi key remappings in config file (#454)Gokul Soumya2021-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use tree like structure to store keymaps * Allow multi key keymaps in config file * Allow multi key keymaps in insert mode * Make keymap state self contained * Add keymap! macro for ergonomic declaration * Add descriptions for editor commands * Allow keymap! to take multiple keys * Restore infobox display * Fix keymap merging and add infobox titles * Fix and add tests for keymaps * Clean up comments and apply suggestions * Allow trailing commas in keymap! * Remove mode suffixes from keymaps * Preserve order of keys when showing infobox * Make command descriptions smaller * Strip infobox title prefix from items * Strip infobox title prefix from items
* | Collect some common patterns into methods on `Range`.Nathan Vegdahl2021-07-26
| |
* | Fix incorrect line hihglight when a selection is at the end of a line.Nathan Vegdahl2021-07-20
| |