Blaž Hrastnik
6e62c3de47
Simplify some code in editor.rs
2021-11-26 18:26:22 +09:00
Blaž Hrastnik
72576822f3
dap: Replace breakpoint when changed event comes through
2021-11-22 16:30:56 +09:00
Blaž Hrastnik
d1854d8e6a
Merge remote-tracking branch 'origin/master' into debug
2021-11-21 20:06:45 +09:00
Dan Nases Sha
6a4d9693ba
File picker config ( #988 )
...
* squashed WIP commits
* hide_gitignore working with config
* pass reference to new config parameter of file_picker()
* update config option name to match name on walk builder
* add comments to config and documentation of option to book
* add git_ignore option to WalkBuilder within prompt in commands.rs
* WIP: add FilePickerConfig struct
* WIP: cleanup
* WIP: add more options including max_depth
* WIP: changed defaults to match ignore crate defaults
* WIP: change WalkBuilder in global_search() to use config options
* WIP: removed follow_links, changed max_depth to follow config setting
* WIP: update book with file-picker inline table notation
* update documentation for file-picker config in book
* adjusted to [editor.file-picker] in book configuration.md
* adjust comments in editor.rs to be doc comments, cleanup
* adjust comments
* adjust book
2021-11-20 23:23:36 +09:00
Blaž Hrastnik
fa4c59df46
Simplify compositor.find
2021-11-18 11:09:04 +09:00
Cole Helbling
87e61a0894
helix-term/commands: implement cquit ( #1096 )
...
This allows you to exit helix with an exit code, e.g. `:cq 2`.
2021-11-15 13:06:12 +09:00
Jason Hansen
cf831b1a65
Allow piping from stdin into a buffer on startup ( #996 )
...
* Allow piping from stdin into a buffer on startup
* Refactor
* Don't allow piping into new buffer on macOS
* Update helix-term/src/application.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Update helix-term/src/application.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Fix
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-10 10:53:14 +09:00
Omnikar
a424ef4e20
Use default languages.toml
if user's is invalid ( #994 )
2021-11-09 11:07:54 +09:00
Blaž Hrastnik
8b85903116
wip
2021-11-08 10:03:08 +09:00
Blaž Hrastnik
f2b709a3c3
Merge branch 'master' into debug
2021-11-07 00:28:19 +09:00
Ivan Tham
49f6c2623f
Bump lsp-types to 0.91.0 ( #932 )
2021-10-29 12:00:18 +09:00
Omnikar
e2ed691537
Implement hx --tutor
and :tutor
to load tutor.txt
( #898 )
...
* Implement `hx --tutor` and `:tutor` to load `tutor.txt`
* Document `hx --tutor` and `:tutor`
* Change `Document::set_path` to take an `Option`
* `Document::set_path` accepts an `Option<&Path>` instead of `&Path`.
* Remove `Editor::open_tutor` and make tutor-open functionality use
`Editor::open` and `Document::set_path`.
* Use `PathBuf::join`
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Add comments explaining unsetting tutor path
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-10-28 10:23:46 +09:00
radical3dd
d61e5e686b
Use current dir for file picker, after change dir. ( #910 )
2021-10-26 09:43:14 +09:00
Blaž Hrastnik
e9b23c29d8
Ignore errors when disabling mouse capture
2021-10-20 00:01:11 +09:00
CossonLeo
9ac0c95161
Improve completion trigger ( #838 )
...
* improve idle completion trigger
* add completion-trigger-len to book
* rename semantics_completion to language_server_completion and optimize idle completion trigger
2021-10-18 15:14:50 +09:00
Blaž Hrastnik
bda05ec4bf
Use a newtype for ThreadId
2021-10-17 14:06:52 +09:00
Blaž Hrastnik
0a6b60085a
Merge branch 'master' into debug
2021-10-17 13:51:56 +09:00
Ivan Tham
89707a858f
Make auto-completion a config ( #853 )
2021-10-16 22:57:41 +09:00
Omnikar
c71b49497d
Set CWD when editor is started with a directory ( #849 )
2021-10-16 10:04:26 +09:00
Leoi Hung Kin
4d07eaa48b
Prevent LSP Messages from displaying when a prompt is presented ( #824 )
...
* Prevent LSP Messages from displaying when a prompt is presented
* use match guard
2021-10-15 17:36:39 +09:00
Blaž Hrastnik
c7f3a971c0
Remove resolved TODOs
2021-10-10 12:22:11 +09:00
Blaž Hrastnik
8ca91891d1
fix compilation
2021-10-05 22:35:38 +09:00
Blaž Hrastnik
66f26e82ce
Filter the initial completion
2021-10-05 22:27:35 +09:00
Blaž Hrastnik
40abec80e1
Experiment with autocompletion on idle
2021-10-05 22:27:33 +09:00
Blaž Hrastnik
f99bea404f
idle timer wip
2021-10-05 22:27:10 +09:00
Dmitry Sharshakov
bf53aff27d
Merge branch 'master' into debug
2021-09-25 23:14:59 +03:00
Blaž Hrastnik
1540b37f34
lsp: Silence window/logMessage if -v isn't used
2021-09-13 17:45:02 +09:00
Blaž Hrastnik
46f3c69f06
lsp: Don't send notifications until initialize completes
...
Then send open events for all documents with the LSP attached.
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
dc7799b980
lsp: Refactor code that could use document_by_path_mut
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
63e191ea3b
lsp: Simplify lookup under method call
2021-09-06 15:25:46 +09:00
Dmitry Sharshakov
507a1f8dd6
Get breakpoint reports from debugger
2021-09-06 08:47:54 +03:00
Dmitry Sharshakov
c9cd06e904
Fetch stack traces for all threads when debugger sets all_thread_stopped flag
2021-09-05 16:09:38 +03:00
Dmitry Sharshakov
cb31d20b46
mark thread as running when resumed
2021-09-04 10:22:29 +03:00
Dmitry Sharshakov
9939dbf119
Fix clippy warnings
2021-09-04 09:08:52 +03: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
42f9718f55
dap: Extract thread_picker, make pause explicitly select a thread
2021-09-03 11:43:11 +09:00
Blaž Hrastnik
27c1b3f98b
dap: Extract a thread_states map
2021-09-03 11:30:25 +09:00
Blaž Hrastnik
5b920c53f0
Refactor resume_application state handling
2021-09-03 11:11:22 +09:00
Dmitry Sharshakov
9c64650a26
force update of stack trace when stopped
2021-09-02 22:51:41 +03:00
Dmitry Sharshakov
e0180a4b88
find main thread automatically if thread stopped is not known
2021-09-02 11:08:24 +03:00
Blaž Hrastnik
0b0b1d850a
dap: Stop comparing file paths per line number
2021-08-30 11:22:26 +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
03b2d81406
dap: better yet, use Selection::single..
2021-08-29 23:03:27 +09:00
Blaž Hrastnik
4d24a43651
dap: use smallvec! macro
2021-08-29 23:02:46 +09:00
Blaž Hrastnik
81f51c13fa
dap: continued: THis check is already done before the match statement
2021-08-29 23:01:18 +09:00
Blaž Hrastnik
51328a4966
dap: extract dap_pos_to_pos
2021-08-29 22:59:29 +09:00
Dmitry Sharshakov
e315394631
Merge remote-tracking branch 'origin/master' into debug
2021-08-28 14:59:26 +03:00
Yusuf Bera Ertan
dc57f8dc89
feat: merge default languages.toml with user provided languages.toml, add a generic TOML value merge function ( #654 )
...
* feat: merge default languages.toml with user provided languages.toml
* refactor: use catch-all to override all other values for merge toml
* tests: add a test case for merging languages configs
* refactor: change test module name
2021-08-27 00:29:14 +09:00
Dmitry Sharshakov
2c3e2b979b
Workaround for debugging Go tests
2021-08-24 21:28:51 +03:00
Dmitry Sharshakov
34c6094604
refactor
2021-08-24 11:32:44 +03:00
Dmitry Sharshakov
c4085b4e88
Use saturating_sub for lenght
2021-08-24 08:54:32 +03:00
Dmitry Sharshakov
ec599a1eac
Do not panic if entered unknown code via stack trace
...
e.g. Rust std library
2021-08-23 21:25:58 +03:00
Dmitry Sharshakov
3a5e044c89
languages: support debug for Rust with LLDB
2021-08-23 21:11:45 +03:00
Dmitry Sharshakov
09c994a97a
editor: drop telemetry output messages
2021-08-23 20:22:55 +03:00
Dmitry Sharshakov
d0b0c9b2ef
editor: select a range if stack pointer has an end
2021-08-22 12:06:43 +03:00
Dmitry Sharshakov
132198323c
editor: go to pos where stack pointer is located
2021-08-22 11:56:22 +03:00
Dmitry Sharshakov
be9dc5802a
editor: mark target as running when continued
2021-08-22 11:21:02 +03:00
Dmitry Sharshakov
d93cd2a261
editor: support stepIn, stepOut, next and pause commands
2021-08-22 11:16:11 +03:00
Blaž Hrastnik
28658836ee
Add more event types, simplify event decoding
2021-08-22 16:05:12 +09:00
Dmitry Sharshakov
2aee5f02d0
Style
2021-08-22 09:52:37 +03:00
Dmitry Sharshakov
7233ab2deb
Merge branch 'debug' of https://github.com/sh7dm/helix into debug
2021-08-22 09:47:22 +03:00
Blaž Hrastnik
a964cbae65
Extract handle_debugger_message, we should avoid bloating tokio::select!
2021-08-22 15:36:07 +09:00
Dmitry Sharshakov
91f2c60b36
Jump to stack pointer when stopped
2021-08-22 09:28:50 +03:00
Dmitry Sharshakov
f3e47bfee4
Disable continuing when running
2021-08-21 20:55:45 +03:00
Dmitry Sharshakov
6709b4242f
Drop and terminate debugger
2021-08-21 20:38:03 +03:00
Dmitry Sharshakov
462c8a6ec8
Show debugger output in the statusline
2021-08-21 20:29:01 +03:00
Dmitry Sharshakov
5a06263b78
report status when target started or stopped
2021-08-21 20:08:37 +03:00
Dmitry Sharshakov
bcab93c94e
Update editor window when stopped
2021-08-21 17:26:51 +03:00
Dmitry Sharshakov
a938f5a87a
refactor: handle DAP events in editor main loop
2021-08-21 17:21:35 +03:00
Dmitry Sharshakov
c4970c617e
make CI green
2021-08-20 16:48:59 +03:00
Blaž Hrastnik
94a1951d40
Work towards a breakpoint UI
2021-08-20 13:51:38 +09:00
Blaž Hrastnik
d39baa3b4e
Start integrating into the editor's event loop
2021-08-20 13:48:32 +09:00
Blaž Hrastnik
a4564adadd
fix: Don't crash if language servers time out
2021-08-10 10:52:53 +09:00
Blaž Hrastnik
a2ccfffda1
config: Rename [terminal] to [editor] and pass it into Editor
2021-08-08 14:10:01 +09:00
Luctius
8714b71991
Do not shutdown lsp during claim_term
...
Fixes a bug where the language server is told to shutdown directly after application start.
2021-08-07 10:41:41 +09:00
Blaž Hrastnik
585793eb46
Use an empty stream on Windows to remove duplication
2021-08-03 09:32:21 +09:00
Ivan Tham
821565e4ef
Add ctrl-z to suspend
2021-08-03 09:32:21 +09:00
Dmitry Sharshakov
8361de45dc
Mouse selection support ( #509 )
...
* 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>
2021-07-30 16:52:00 +09:00
Cor
9fcbbfa467
Changed startup behaviour to only open a single view when multiple files are specified on the commandline.
...
Changed the behaviour; the first argument on the commandline is the file on display
2021-07-18 00:29:05 +09:00
Ivan Tham
a0a5bd555b
More responsive key input
...
Use biased select!, don't eagerly process lsp message since we want to
prioritize user input rather than lsp messages, but still limit rendering
for lsp messages.
2021-07-06 10:07:01 +09:00
Blaž Hrastnik
83e7dd8602
fix: Temporary fix for #402
2021-07-03 12:30:13 +09:00
Nathan Vegdahl
0b2d51cf5a
Fix unused Result
warnings in helix-term.
2021-07-01 19:06:52 -07:00
Nathan Vegdahl
efa3389b6a
Fix unused variable, parameter, and mut
warnings in helix-term.
2021-07-01 19:06:52 -07:00
Nathan Vegdahl
702a0491db
Remove #[allow(unused)] from helix-term, and fix unused imports.
...
Lots of other warning still left. Will address in subsequent commits.
2021-07-01 19:06:52 -07:00
Joe Neeman
ffa2f2590b
Satisfy clippy.
2021-06-30 17:08:50 +09:00
Joe Neeman
d64d75e724
Add some async job infrastructure.
2021-06-30 17:08:50 +09:00
Blaž Hrastnik
f2d8ce3415
Use a deadline when eagerly processing notifications
2021-06-25 13:22:50 +09:00
Keith Simmons
4418e17547
reverse the dependency between helix-tui and helix-view ( #366 )
...
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view
* fix tests
* clippy and format fixes
Co-authored-by: Keith Simmons <keithsim@microsoft.com>
2021-06-25 12:58:15 +09:00
Ivan Tham
10548bf0e3
Fix previous broken refactor key into helix-view
...
Need to be used for autoinfo
Revert "Revert "Refactor key into helix-view""
This reverts commit 10f9f72232
.
2021-06-25 00:39:03 +09:00
Blaž Hrastnik
20f33ead67
minor: Remove old TODOs
2021-06-22 23:26:34 +09:00
Blaž Hrastnik
2f321b9335
lsp: Eagerly process notifications/server calls to avoid re-rendering
2021-06-22 13:47:57 +09:00
Wojciech Kępka
ee80fa8ea9
Cleanup spinners and messages on progress end
2021-06-21 18:51:04 +09:00
wojciechkepka
aca9d73fe4
Hold Config
in Application
, expect at least one editor view
2021-06-21 12:59:06 +09:00
wojciechkepka
cc357d5096
Add progress spinners to status line
2021-06-21 12:59:06 +09:00
wojciechkepka
ce97a2f05f
Add ability to change theme on editor
2021-06-20 00:07:13 +09:00
Blaž Hrastnik
10f9f72232
Revert "Refactor key into helix-view"
...
Did not use defaults when custom keymap was used
This reverts commit ca806d4f85
.
2021-06-19 23:59:19 +09:00
Ivan Tham
ca806d4f85
Refactor key into helix-view
...
Now also make use of Deserialize for Config.
2021-06-19 16:37:15 +09:00
wojciechkepka
c5a2fd5da3
Add close_language_servers
method on Editor
2021-06-19 13:02:56 +09:00