Commit Graph

416 Commits (9ed930b2335b86d03e871b52a958d4e9768e0d34)

Author SHA1 Message Date
Blaž Hrastnik 3edca7854e completion: fully revert state before apply & insertText common prefix 3 years ago
Blaž Hrastnik cee7ad781e Mark a few functions as `const` 3 years ago
Oskar Nehlin 0f886af4b9
Add commands for moving between splits with a direction (#860)
* Add commands for moving between splits with a direction

* Update keymaps

* Change picker mapping

* Add test and clean up some comments
3 years ago
Blaž Hrastnik 182a59b552 Update to rust 1.56 + 2021 edition 3 years ago
Daniel S Poulin 3b032e8e1f
First stab at ignoring compressed files from picker (#767) 3 years ago
VuiMuich 67829976fa
Add `C-j` and `C-k` to keybinds for picker (#876)
* Add `C-j` and `C-k` for moving down/up in pickers

* Add new binds to keymap doc
3 years ago
Blaž Hrastnik 0a6b60085a Merge branch 'master' into debug 3 years ago
Blaž Hrastnik 2c0468ffd1 fix: If backspacing past the start offset, cancel completion
Refs #822
3 years ago
Blaž Hrastnik f8f63c5508
Merge pull request #821 from helix-editor/idle-timer
Idle timer / Autocompletion
3 years ago
Blaž Hrastnik 76b1bbc23a Allow trigger_offset to be unused for now 3 years ago
Leoi Hung Kin a6852fb88f
Picker: Don't panick at move_up/move_down when matches is empty (#818) 3 years ago
Blaž Hrastnik f692ede2b7 fix: Don't crash on empty completion, don't retrigger on close 3 years ago
Blaž Hrastnik 66f26e82ce Filter the initial completion 3 years ago
Blaž Hrastnik 40abec80e1 Experiment with autocompletion on idle 3 years ago
Blaž Hrastnik f99bea404f idle timer wip 3 years ago
Dmitry Sharshakov bf53aff27d Merge branch 'master' into debug 3 years ago
Leoi Hung Kin 9456d5c1a2
Initial implementation of global search (#651)
* initial implementation of global search

* use tokio::sync::mpsc::unbounded_channel instead of Arc, Mutex, Waker poll_fn

* use tokio_stream::wrappers::UnboundedReceiverStream to collect all search matches

* regex_prompt: unified callback; refactor

* global search doc
3 years ago
kraem 4a003782a5
enable smart case regex search by default (#761) 3 years ago
Blaž Hrastnik c7d6e4461f fix: Wrap around the top of the picker menu when scrolling
Forgot to port the improvements in menu.rs

Fixes #734
3 years ago
Blaž Hrastnik dd0b15e1f1 syntax: Properly handle injection-regex for language injections 3 years ago
Blaž Hrastnik 32977ed341 ui: Trigger recalculate_size per popup render so contents can readjust 3 years ago
Blaž Hrastnik 72cf86e462 Regex prompts should have a history with a specifiable register 3 years ago
CossonLeo 011f9aa47f
Optimize completion doc position. (#691)
* 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
3 years ago
Blaž Hrastnik 2ce87968cd ui: Be smarter about centering previews
Try centering the whole block. If the block is too big for the viewport,
then make sure that the first line is within the preview.
3 years ago
Dmitry Sharshakov 507a1f8dd6 Get breakpoint reports from debugger 3 years ago
Dmitry Sharshakov 0add0c5639
Make conditional logpoints underlined 3 years ago
Dmitry Sharshakov 2d35b7b99c
Normalize line in picker preview to avoid crash 3 years ago
Dmitry Sharshakov 0e1e4edc5e different display for conditional logpoints 3 years ago
Dmitry Sharshakov 8a609047c3 Mouse command for editing logpoint 3 years ago
Dmitry Sharshakov 3b0ec750ff Support editing breakpoint condition with right click 3 years ago
Gokul Soumya 183dcce992
Add a sticky mode for keymaps (#635) 3 years ago
Dmitry Sharshakov 1befbd076c Add command for editing breakpoint condition 3 years ago
Dmitry Sharshakov 698583c241 Support setting breakpoints with mouse 3 years ago
Blaž Hrastnik b997d2cdeb dap: Allow setting breakpoints before starting the adapter 3 years ago
Dmitry Sharshakov 2c89107349
Fix crash when stack trace not loaded
Still doesn't address the issue though
3 years ago
Dmitry Sharshakov 5b20f6020a Merge remote-tracking branch 'origin/master' into debug
Contains type fix on helix-term/src/ui/editor.rs:752:13
3 years ago
Blaž Hrastnik a3bd80a6fa ui: prompt: Avoid allocating a prompt name if it's a static string 3 years ago
gbaranski 9c5752cbac fix: use .cursor() instead of .head 3 years ago
gbaranski b590504143 fix: use head instead of anchor for relative line 3 years ago
Blaž Hrastnik 0b0b1d850a dap: Stop comparing file paths per line number 3 years ago
Blaž Hrastnik 2c7b75475f dap: refactor frame handling 3 years ago
Omnikar 03ad9e0bfa
Fix code indentation (#671) 3 years ago
Dmitry Sharshakov b42631942b
Defaults in completions, better schema 3 years ago
Dmitry Sharshakov f53d8411cb
Add extra annotations to completions 3 years ago
Dmitry Sharshakov 98fda6b8f0
better completion 3 years ago
Dmitry Sharshakov 9d2f2a9e32
Support multiple arguments for debug configs 3 years ago
Dmitry Sharshakov 2d42766a71
wip: refactor parameters in UI start 3 years ago
Dmitry Sharshakov af657ef2ec
Fix lints 3 years ago
Dmitry Sharshakov 94901b8677
Customized completion for template parameters 3 years ago
Dmitry Sharshakov ef155e62ef
Add filename autocomplete to template args 3 years ago
Dmitry Sharshakov e315394631
Merge remote-tracking branch 'origin/master' into debug 3 years ago
Dmitry Sharshakov 8df6739759
New way of starting debug sessions 3 years ago
Dmitry Sharshakov 5e4da09be2
Don't let picker be too narrow 3 years ago
Dmitry Sharshakov 890b51b568
Paginated variables 3 years ago
CossonLeo d6a9c2c0f6
Add ui.menu text style (#664)
* add menu text style

* add ui.menu.text ui.info ui.info.text to book

* change ui.menu.text to ui.menu

* fix book's ui.menu
3 years ago
Blaž Hrastnik 5cee3b634d ui: prompt: Fix typing with alt 3 years ago
Grzegorz Baranski cec5d437d8
fix: show current line number even if relative line is on (#656) 3 years ago
Stuart Hinson 6192f2fa25
Show hidden files in filename completer (#648)
also removes unnecessary clone
3 years ago
Dmitry Sharshakov c7759a5aa0
Merge remote-tracking branch 'origin/master' into debug 3 years ago
Kirawi b99db7c687
Move path util functions from helix-term to helix-core (#650) 3 years ago
Dmitry Sharshakov 5d3c69d565
Support logpoints
Tested with Node (Delve and LLDB do not support logpoints)
3 years ago
Blaž Hrastnik bf5b9a9f35 ui: Tone down the preview highlight by adding a new scope 3 years ago
Blaž Hrastnik e6cb183134 ui: Fix preview window padding: we want horizontal, not vertical 3 years ago
Blaž Hrastnik a5c3c6c6a9 ui: Highlight line ranges in the preview 3 years ago
CossonLeo 490125f008
info component style config use ui.info ui.info.text (#643) 3 years ago
Dmitry Sharshakov b78f70e602
show breakpoint condition in diagnostics 3 years ago
Dmitry Sharshakov f247858055
Support conditional breakpoints 3 years ago
Kirawi 59e0ceef8c
better panic messages for when you're missing selection scopes (#608) 3 years ago
Dmitry Sharshakov a938f5a87a
refactor: handle DAP events in editor main loop 3 years ago
Dmitry Sharshakov 3fc501c99f
Correctly display 1-based breakpoints 3 years ago
Dmitry Sharshakov 56bddb12f8
Highlight line number of stack pointer 3 years ago
Dmitry Sharshakov 5f5b383979
Fix clippy warnings 3 years ago
Dmitry Sharshakov 6458edecfd
Add stack pointer display when stopped 3 years ago
Gokul Soumya f9375f449c
Refactor new Rect construction (#575)
* 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
3 years ago
Dmitry Sharshakov c4970c617e
make CI green 3 years ago
Blaž Hrastnik 94a1951d40 Work towards a breakpoint UI 3 years ago
Blaž Hrastnik 68626b8f78 ui: Refactor styling a bit, ensure infobox is stylable 3 years ago
Blaž Hrastnik cbd39d67a4 minor: Refactor commands.rs a bit more 3 years ago
Kirawi da8810809a use `ui.text.focus` for the picker (fix #622) 3 years ago
Blaž Hrastnik 0595b0626a Fix clippy attr 3 years ago
Blaž Hrastnik 5f8b1c7320 Avoid looking up ui.text per highlight range 3 years ago
Blaž Hrastnik 557fd86e71 Extract view.inner_area(), simplify render_focused_view_elements 3 years ago
Blaž Hrastnik 9776553ad0 Refactor view.first_line/first_col into view.offset (Position) 3 years ago
Blaž Hrastnik 12ea3888c5 fix: ui: Pin popups with no positioning to the initial cursor position
This avoids the floating popup following the cursor as we type.
3 years ago
Gokul Soumya 14c08e855f
Refactor infobox rendering and parsing (#579) 3 years ago
Grzegorz Baranski 78923496a6
feat: relative numbers (#485)
* 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
3 years ago
Blaž Hrastnik 4167201344 ui: picker: Position count according to input bar 3 years ago
Blaž Hrastnik eb9ac0a743 ui: picker: Use ui.selection instead of ui.selection.primary 3 years ago
Blaž Hrastnik f20dc1283d ui: picker: Render matches/total counts 3 years ago
Gokul Soumya d84f8b5fde
Show file preview in split pane in fuzzy finder (#534)
* 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
3 years ago
Dmitry Sharshakov 7d51805e94
Support primary clipboard (#548)
* 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>
3 years ago
Blaž Hrastnik 627b899315 ui: completion: Insert suggestions when tabbing over them
Fixes #498
3 years ago
Blaž Hrastnik f917b5a441 ui: completion: Use sort_text to sort the completions 3 years ago
Dmitry Sharshakov 27b551d345
helix-term: handle scrolling when mouse is enabled (#554)
* 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>
3 years ago
Blaž Hrastnik 86209c93a3 Appease clippy 3 years ago
Blaž Hrastnik 0a7add4ad4 Only recalculate resize during rendering, this stops flashing on resize 3 years ago
Kirawi 815ee9e334
fix small terminal size panic with info popup (#563)
* fix small terminal size panic with info popup

* remove unused enumerator

* fix subtraction overflow panic
3 years ago
Blaž Hrastnik a2ccfffda1 config: Rename [terminal] to [editor] and pass it into Editor 3 years ago
Blaž Hrastnik b20a5c4c0e ui: menu: Allow wrapping around on ctrl-p/shift tab 3 years ago
Blaž Hrastnik 62eb8c6b40 mouse: Remove verify_screen_coords, refactor primary selection modification 3 years ago