Commit Graph

550 Commits (3042ff3e5af6d45f17e3b00e12980ff7d952335f)

Author SHA1 Message Date
Kangwook Lee (이강욱) 05c2a72ccb
goto line start/end commands extend when in select mode (#739) 2021-09-11 18:31:40 +09:00
Kirawi 987d8e6dd6
Convert clipboard line ending to document line ending when pasting (#716)
* convert a paste's line-ending to the current doc's line-ending

* move paste regex into paste_impl
2021-09-11 00:12:26 +09:00
Blaž Hrastnik 3426285a63 fix: Don't automatically search_next on *
Refs #713
2021-09-08 16:34:04 +09:00
Blaž Hrastnik 72cf86e462 Regex prompts should have a history with a specifiable register 2021-09-08 16:34:04 +09:00
Kangwook Lee (이강욱) 7a9db95182
Add command to extend to line start or end (#717) 2021-09-07 23:22:39 +09:00
Dmitry Sharshakov 8a609047c3 Mouse command for editing logpoint 2021-09-05 08:50:03 +03:00
Dmitry Sharshakov 7bdead5b4b Drop old commands
TODO: edit logpoints with a keybinding and mouse
2021-09-05 08:20:21 +03:00
Gokul Soumya 95cd2c645b Refactor switch_case commands 2021-09-05 12:41:19 +09:00
Gokul Soumya 33ce8779fd Refactor {move,extend}_word_* commands 2021-09-05 12:41:19 +09:00
Gokul Soumya ea2b4c687d Refactor {move,extend}_char_* commands 2021-09-05 12:41:19 +09:00
Dmitry Sharshakov 1befbd076c Add command for editing breakpoint condition 2021-09-04 22:57:58 +03:00
Dmitry Sharshakov e36fc57fff refactor breakpoint edit 2021-09-04 22:18:42 +03:00
Kangwook Lee (이강욱) 07fe4a6a40
Add commands that extends to long words (#706) 2021-09-04 19:00:32 +05:30
Blaž Hrastnik c63ad60c31 dap: Allow switching between stack frames 2021-09-03 17:25:11 +09:00
Blaž Hrastnik b997d2cdeb dap: Allow setting breakpoints before starting the adapter 2021-09-03 13:26:30 +09:00
Blaž Hrastnik 289303a30d dap: small TODO 2021-09-03 11:48:55 +09:00
Blaž Hrastnik 4c410eef87 Merge remote-tracking branch 'origin/master' into debug 2021-09-03 11:03:34 +09:00
Wojciech Kępka 7e1123680f
Expand `~` in `change-current-directory` command (#692) 2021-09-02 11:03:42 +09:00
oberblastmeister 825bceeab6
add_newline unimpaired mapping (#653)
* added some keymaps

* remove

* remove wrong mappings

* remove

* wrong import

* use enum

* correct line ending

* added to book

* column
2021-09-02 00:55:16 +09:00
Blaž Hrastnik ce7ad2beb5 Reimplement keep-pipe, it needs to manipulate selections, not text 2021-09-01 11:09:50 +09:00
Blaž Hrastnik dc609cafb5 Extract the shell command into a separate function 2021-09-01 10:46:35 +09:00
Dmitry Sharshakov 5b20f6020a Merge remote-tracking branch 'origin/master' into debug
Contains type fix on helix-term/src/ui/editor.rs:752:13
2021-08-31 21:29:11 +03:00
Blaž Hrastnik a3bd80a6fa ui: prompt: Avoid allocating a prompt name if it's a static string 2021-08-31 18:29:24 +09:00
Blaž Hrastnik 9b96bb5ac8 Refactor a bit further 2021-08-31 18:24:24 +09:00
Blaž Hrastnik 4a76ea8f88 shell: Move changes outside so we can properly handle errors 2021-08-31 18:19:18 +09:00
Omnikar e772808a5b
Shell commands (#547)
* Implement shell interaction commands

* Use slice instead of iterator for shell invocation

* Default to `sh` instead of `$SHELL` for shell commands

* Enforce trailing comma in `commands` macro

* Use `|` register for shell commands

* Move shell config to `editor` and use in command

* Update shell command prompts

* Remove clone of shell config

* Change shell function names to match prompts

* Log stderr contents upon external command error

* Remove `unwrap` calls on potential common errors

`shell` will no longer panic if:
  * The user-configured shell cannot be found
  * The shell command does not output UTF-8

* Remove redundant `pipe` parameter

* Rename `ShellBehavior::None` to `Ignore`

* Display error when shell command is used and `shell = []`

* Document shell commands in `keymap.md`
2021-08-31 18:13:16 +09:00
Blaž Hrastnik 2c7b75475f dap: refactor frame handling 2021-08-30 11:07:59 +09:00
Blaž Hrastnik 986828e75c dap: Remap keys, match current thread behavior from dap-mode, switch-thread 2021-08-29 23:32:46 +09:00
Blaž Hrastnik d6ccc150c7 Extract dap commands into a separate file 2021-08-29 22:43:08 +09:00
Blaž Hrastnik ee2ba744a2 Rename dap_in/_out to dap_step_in/_out 2021-08-29 22:37:21 +09:00
Dmitry Sharshakov b42631942b
Defaults in completions, better schema 2021-08-29 14:51:47 +03:00
Dmitry Sharshakov 94901b8677
Customized completion for template parameters 2021-08-28 19:11:19 +03:00
Dmitry Sharshakov e315394631
Merge remote-tracking branch 'origin/master' into debug 2021-08-28 14:59:26 +03:00
Dmitry Sharshakov 8df6739759
New way of starting debug sessions 2021-08-28 14:23:54 +03:00
Dmitry Sharshakov 890b51b568
Paginated variables 2021-08-28 10:13:19 +03:00
Ivan Tham 4bafda3995
Change vsp to vs (#647)
Follow up on #639 to match vim behavior
2021-08-27 00:20:37 +09:00
Dmitry Sharshakov 3b87fce0ce
Print errors occurred in debug commands 2021-08-25 21:01:15 +03:00
Dmitry Sharshakov c7759a5aa0
Merge remote-tracking branch 'origin/master' into debug 2021-08-25 19:22:01 +03:00
Dmitry Sharshakov 4ee66b8766
Support remote debug adapter 2021-08-25 19:14:47 +03:00
Dmitry Sharshakov 326293cb57
only show variables' names and types 2021-08-25 08:33:46 +03:00
Kirawi b99db7c687
Move path util functions from helix-term to helix-core (#650) 2021-08-25 10:04:05 +09:00
Dmitry Sharshakov 8cc6d68160
Autocomplete files for debug command 2021-08-24 20:38:49 +03:00
Dmitry Sharshakov 235a84d989
Remove shortcut for starting debug 2021-08-24 20:32:38 +03:00
Dmitry Sharshakov 299da5a35b
Support attach request 2021-08-24 20:27:54 +03:00
Dmitry Sharshakov b001008a69
Support templates in debug configurations 2021-08-24 20:04:14 +03:00
Dmitry Sharshakov 31212e133d
Rename functions 2021-08-24 16:48:38 +03:00
Dmitry Sharshakov 1041a5bb07
Support launching configs by name 2021-08-24 12:21:00 +03:00
Dmitry Sharshakov c463142e5e
Create new debugger config format 2021-08-24 11:56:18 +03:00
Dmitry Sharshakov 34c6094604
refactor 2021-08-24 11:32:44 +03:00
Dmitry Sharshakov fdad7d67aa
Check capabilities for breakpoint config 2021-08-24 10:48:47 +03:00
Dmitry Sharshakov 5d3c69d565
Support logpoints
Tested with Node (Delve and LLDB do not support logpoints)
2021-08-24 08:47:20 +03:00
Blaž Hrastnik a5c3c6c6a9 ui: Highlight line ranges in the preview 2021-08-24 13:25:39 +09:00
Blaž Hrastnik 1d45f50781 fix: Don't internally use relative paths in the buffer picker
Fixes #619
2021-08-24 09:56:09 +09:00
devins2518 e1c9f13263
Add :vsplit and :hsplit commands (#639)
* add vsplit and hsplit commands

* handle splits more elegantly
2021-08-24 09:37:44 +09:00
Dmitry Sharshakov b6b99b2487
config: minor fixes 2021-08-23 17:26:12 +03:00
Dmitry Sharshakov 839d210573
Enable stdio transport via config 2021-08-23 17:18:03 +03:00
Dmitry Sharshakov f55a012fb7
editor: add debug session config 2021-08-23 16:56:41 +03:00
Dmitry Sharshakov c5b210df59
Add debug-adapter field to languages.toml 2021-08-23 16:48:06 +03:00
Dmitry Sharshakov 53ee57f84a
clippy 2021-08-22 15:16:59 +03:00
Dmitry Sharshakov f247858055
Support conditional breakpoints 2021-08-22 15:06:27 +03:00
Dmitry Sharshakov 3197c2536e
Add eval command 2021-08-22 14:44:16 +03:00
Dmitry Sharshakov 838f69929d
Simplify variables display 2021-08-22 12:49:18 +03:00
Dmitry Sharshakov 060a422c7e
fix crash when pausing 2021-08-22 12:26:36 +03:00
Dmitry Sharshakov 132198323c
editor: go to pos where stack pointer is located 2021-08-22 11:56:22 +03:00
Dmitry Sharshakov d93cd2a261
editor: support stepIn, stepOut, next and pause commands 2021-08-22 11:16:11 +03:00
Blaž Hrastnik 607b92b2e3 fix: Place the cursor on the start of the selected symbol
Fixes #626
2021-08-22 15:00:07 +09:00
Dmitry Sharshakov 89ad54a2e5
Add variable type to output 2021-08-22 08:31:01 +03:00
Dmitry Sharshakov cc66475592
Add commands for variable introspection 2021-08-22 08:25:38 +03:00
Dmitry Sharshakov 95ba4ff5bd
Hide stack pointer when continued 2021-08-21 21:00:18 +03:00
Dmitry Sharshakov f3e47bfee4
Disable continuing when running 2021-08-21 20:55:45 +03:00
Dmitry Sharshakov 66c035fa99
Continue command 2021-08-21 20:42:13 +03:00
Dmitry Sharshakov 6709b4242f
Drop and terminate debugger 2021-08-21 20:38:03 +03:00
Dmitry Sharshakov 26dee49dc9
Add command to detach debugger 2021-08-21 20:33:56 +03:00
Dmitry Sharshakov a938f5a87a
refactor: handle DAP events in editor main loop 2021-08-21 17:21:35 +03:00
Dmitry Sharshakov 5f5b383979
Fix clippy warnings 2021-08-21 14:35:53 +03:00
Dmitry Sharshakov 6458edecfd
Add stack pointer display when stopped 2021-08-21 14:15:29 +03:00
Dmitry Sharshakov 738e8a4dd3
Unify init and launch commands 2021-08-20 19:11:37 +03:00
Dmitry Sharshakov 9e22842d51
move debug command to keybinding 2021-08-20 19:06:52 +03:00
Dmitry Sharshakov e2c74d26e0
Add command to run debug target 2021-08-20 18:18:35 +03:00
Dmitry Sharshakov c4970c617e
make CI green 2021-08-20 16:48:59 +03:00
Blaž Hrastnik a54b09e3fe dap: Split out launch from init 2021-08-20 14:06:55 +09:00
Blaž Hrastnik 94a1951d40 Work towards a breakpoint UI 2021-08-20 13:51:38 +09:00
Blaž Hrastnik 86102a651f wip 2021-08-20 13:48:33 +09:00
Blaž Hrastnik d39baa3b4e Start integrating into the editor's event loop 2021-08-20 13:48:32 +09:00
Blaž Hrastnik d4c17b633c minor: Extract doc.text().slice(..) into a var 2021-08-20 13:42:47 +09:00
Blaž Hrastnik 38e932bd4c minor: Nicer errors, std::io::Error provides a Display impl 2021-08-20 13:42:17 +09:00
Blaž Hrastnik a76ec9a64e Make scrolling extend in extend mode 2021-08-20 13:42:01 +09:00
Blaž Hrastnik 07fea61d03 Use the correct search register 2021-08-20 11:14:57 +09:00
Blaž Hrastnik f60b549fb7 cargo fmt 2021-08-20 11:02:28 +09:00
Blaž Hrastnik cbd39d67a4 minor: Refactor commands.rs a bit more 2021-08-20 10:43:22 +09:00
Blaž Hrastnik 557fd86e71 Extract view.inner_area(), simplify render_focused_view_elements 2021-08-19 15:59:03 +09:00
Blaž Hrastnik 9776553ad0 Refactor view.first_line/first_col into view.offset (Position) 2021-08-19 12:52:07 +09:00
Blaž Hrastnik 115754c5ee Simplify write/write_all commands, we no longer need to excessively block 2021-08-19 11:37:42 +09:00
Yerlan 18c0509593
Exit select mode after toggle_comment. Fixes #597 (#598)
Consistent with yanking, exit select mode after toggling comment. Fixes #597
2021-08-17 09:52:52 +09:00
Blaž Hrastnik fd1eaafff5 Add :tree-sitter-scopes, useful when developing indents.toml 2021-08-13 13:15:53 +09:00
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
2021-08-12 16:00:42 +09:00
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>
2021-08-12 11:53:48 +09:00
Blaž Hrastnik d03982ee43 cargo fmt 2021-08-12 10:18:37 +09:00
Blaž Hrastnik 6d52424303 fix: Adjust scroll offset/padding calculation to prevent wobble
Fixes #324
2021-08-11 13:53:38 +09:00
Nathan Vegdahl dde2be9395
Fix surround_replace replacing the wrong character on the right. (#571)
Fixes #569.
2021-08-11 09:17:59 +09:00