Commit Graph

340 Commits (13ed4f6c4748019787d24c2b686d417b71604242)

Author SHA1 Message Date
Michael Davis 5d33dbacac
add a CLI flag for specifying config file location (#2666) 2 years ago
Eric K d693b37445
Modified restore_term fn in application.rs. Changed '\x1B[2 q' to '\x1B[0 q' to restore cursor to user default after exiting helix (#3289) 2 years ago
Erasin 42115d02bc
Suport diagnostic code (#3096)
* add code for diagnostic.

This PR provides a solution to resolve #2994. missing Code Actions for lsp

* remote unused import
2 years ago
Narazaki Shuji 55b45ec4a4
Set the selection point of the first file correctly (#3073) 2 years ago
Benoît Cortier 333ab27837
feat(term): uniformize word-wise movement and deletion (#2500)
Ctrl-based shortcuts are common in numerous applications.

This change:
- Adds Ctrl+{Left/Right/Backspace/Delete} for word-wise movement/deletion in prompt, picker, …
- Removes Alt-Left and Alt-Right in prompt, picker, …
- Adds Alt-Delete in insert mode for forward word deletion

In some terminals, Alt-Backspace might not work because it is ambigous.
See: https://github.com/helix-editor/helix/pull/2193#issuecomment-1105042501
Hence, Alt alternative is not removed.
2 years ago
Gokul Soumya 0c104685c0 Sub sort diagnostics by line number 2 years ago
Joe b26e7e2e8f
Add live preview to theme picker (#1798)
* 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
2 years ago
plexom f10b6f6ee2
adds --vsplit and --hsplit arguments (#2773)
* adds --vsplit and --hsplit arguments

* moved comment

* fixed lint (third time's a charm)

* changed vsplit and hsplit from two separate bools to type Option<Layout>, and some cleanup
2 years ago
Falco Hirschenberger ed89f8897e
Add workspace and document diagnostics picker (#2013)
* 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>
2 years ago
Skyler Hawthorne 665286c199 factor new Application with file arg to function 2 years ago
Skyler Hawthorne 41bf1d5811 fix(command): write-quit: do not quit if write fails
During write-quit, if the file fails to be written for any reason, helix
will still quit without saving the changes. This fixes this behavior by
introducing fallibility to the asynchronous job queues. This will also
benefit all contexts which may depend on these job queues.

Fixes #1575
2 years ago
Skyler Hawthorne 526c9be8ca consolidate idle timer logic, make conditional 2 years ago
Skyler Hawthorne 4e34ee7d2e don't read from stdin for integration tests 2 years ago
Skyler Hawthorne cb0440be85 use env var for integration test log level 2 years ago
Skyler Hawthorne 652cdda833 use test terminal backend for integration tests 2 years ago
Skyler Hawthorne ed950fcc56 Add more context; Editor::open doesn't need to own path 2 years ago
Skyler Hawthorne 2386c81ebc use idle timer instead of fixed timeout 2 years ago
Skyler Hawthorne ee705dcb33 use main application event loop
Use the Application's main event loop to allow LSP, file writes, etc
2 years ago
Skyler Hawthorne 267605d147 reorganize tests into groups 2 years ago
Skyler Hawthorne 0f3c10a021 Fix initial selection of Document in new view
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.
2 years ago
Skyler Hawthorne 502d3290fb improve test harness
* 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
2 years ago
Blaž Hrastnik 308cab3e5c Integration testing harness 2 years ago
Blaž Hrastnik adb6cd5376 Simplify handle_terminal_events signature 2 years ago
Skyler Hawthorne 0623a72599 move config parsing back into main 2 years ago
Bjorn Ove Hay Andersen 794576a5b0
Update auto-pairs and idle-timeout when the config is reloaded (#2736) 2 years ago
Blaž Hrastnik 7ae6cad52e
Don't panic on LSP parsing errors
This made sense initially when the implementation was still new (so we
got user reports more frequently), but a parsing error now generally
signifies a language server isn't properly implementing the spec.
2 years ago
Omnikar e6b865ed0b allow whitespace to be rendered
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Kirawi c2a40d9d52
Add support for local language configuration (#1249)
* add local configuration

* move config loading to Application::new

* simplify find_root_impl
2 years ago
Rose Hudson f8c83f9885 clear terminal after switching to alternate screen
when using helix over mosh, the screen doesn't get cleared and
characters get left all over the place until they are overwritten. with
this change, the screen gets properly cleared as soon as helix starts
2 years ago
Blaž Hrastnik 8adf0c1b3a
lsp: Implement support for workspace_folders (currently just one)
Refs #1898
2 years ago
Blaž Hrastnik 6c276d7868
Revert "Resize is not necessary inside SIGCONT, handled by render()"
Fixes #1877

This reverts commit 85264a861a.
2 years ago
Blaž Hrastnik 9a6ee88e66
Split off dap event handlers into helix-view to allow reuse 2 years ago
Blaž Hrastnik 85264a861a
Resize is not necessary inside SIGCONT, handled by render() 2 years ago
Gokul Soumya 7b3a3d562c
Move top level lsp config to editor.lsp (#1868)
* Move top level lsp config to editor.lsp

This is mainly done to accomodate the new lsp.signature-help config
option that will be introduced in https://github.com/helix-editor/helix/pull/1755
which will have to be accessed by commands. The top level config
struct is split and moved to different places, making the relocation
necessary

* Revert rebase slipup
2 years ago
Joe bee05dd32a
Add refresh-config and open-config command (#1803)
* Add refresh-config and open-config command

* clippy

* Use dynamic dispatch for editor config

* Refactor Result::Ok to Ok

* Remove unused import

* cargo fmt

* Modify config error handling

* cargo xtask docgen

* impl display for ConfigLoadError

* cargo fmt

* Put keymaps behind dyn access, refactor config.load()

* Update command names

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Switch to unbounded_channel

* Remove --edit-config command

* Update configuration docs

* Revert "Put keymaps behind dyn access", too hard

This reverts commit 06bad8cf49.

* Add refresh for keys

* Refactor default_keymaps, fix config default, add test

* swap -> store, remove unneeded clone

* cargo fmt

* Rename default_keymaps to default

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Blaž Hrastnik 919ac7ba15
Handle RPC returning an invalid call 2 years ago
Michael Davis 4fc991fdec migrate grammar fetching/building code into helix-loader crate
This is a rather large refactor that moves most of the code for
loading, fetching, and building grammars into a new helix-loader
module. This works well with the [[grammars]] syntax for
languages.toml defined earlier: we only have to depend on the types
for GrammarConfiguration in helix-loader and can leave all the
[[language]] entries for helix-core.
2 years ago
Joe 8d7a25b4d4
Add --edit-config flag to directly open config.toml (#1771)
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2 years ago
Gokul Soumya 194b09fbc1
Add --health command for troubleshooting (#1669)
* Move runtime file location definitions to core

* Add basic --health command

* Add language specific --health

* Show summary for all langs with bare --health

* Use TsFeature from xtask for --health

* cargo fmt

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Blaž Hrastnik 0062af6a19
minor: Remove some outdated comments 2 years ago
Blaž Hrastnik 68bad148a5
Extract idle timeout code into ui/editor.rs 2 years ago
Triton171 f044059a2a
Implement LSP `workspace/configuration` and `workspace/didChangeConfiguration` (#1684)
* Implement LSP `workspace/configuration` request

* Implement LSP `workspace/didChangeConfiguration` notification.

* Simplify retrieval of LSP configuration

* Implement suggestions from PR discussion

Co-authored-by: Triton171 <triton0171@gmail.com>
2 years ago
Blaž Hrastnik 9712bbb23b
Use which to resolve lsp/dap binaries
This resolves the following issue: https://github.com/helix-editor/helix/discussions/962#discussioncomment-1580046
2 years ago
Blaž Hrastnik 7b1d682fe5 dap: fix runInTerminal with lldb-vscode 2 years ago
Blaž Hrastnik d11b652139 Allow static strings in set_status/set_error so API is nicer 2 years ago
Blaž Hrastnik fd0e4b1159 dap: Reduce amount of block_on uses 2 years ago
Ludwig Stecher 4429993842
Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker (#1612)
* Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker

* Refactor file picker paging logic

* change key mapping

* Add overlay component

* Use closure instead of margin to calculate size

* Don't wrap file picker in `Overlay` automatically
2 years ago
Gokul Soumya 4c424d5ee4
Refactor language config loading (#1658) 2 years ago
Blaž Hrastnik bd549d8a20 Merge remote-tracking branch 'origin/master' into debug 2 years ago
Blaž Hrastnik 6ea477ab60 Don't use block_on in jobs.finish(), we can .await 2 years ago
Ivan Tham 759b850859
Allow specifying file start position (#445)
Like helix-term/src/commands.rs:3426:15
2 years ago
Kevin Sjöberg 3a34036310
Use the correct language ID for JavaScript & TypeScript (#1466)
* Use correct language ID for JavaScript/TypeScript

* Add missing slash

* Only calculate fallback when needed
2 years ago
Matouš Dzivjak 0e7d757869
feat(lsp): configurable diagnostic severity (#1325)
* feat(lsp): configurable diagnostic severity

Allow severity of diagnostic messages to be configured.
E.g. allow turning of Hint level diagnostics.

Fixes: https://github.com/helix-editor/helix/issues/1007

* Use language_config() method

* Add documentation for diagnostic_severity

* Use unreachable for unknown severity level

* fix: documentation for diagnostic_severity config
3 years ago
Matouš Dzivjak 75a8b789d2
LSP code action commands (#1304)
* feat(lsp): codeAction commands

* Don't block on command call

* Fix lifetime of command execution

* Fix lint issues
3 years ago
Omnikar 98ce2a301d Load alt default theme if true color is not supported
* Move `runtime/themes/base16_default_terminal.toml` to
  `base16_theme.toml` alongside `theme.toml`
* Use `terminfo` crate to detect whether the terminal supports true
  color and, if the user has no theme configured and their terminal does
  not support true color, load the alt default theme instead of the
  normal default.

Remove `terminfo` dependency, use `COLORTERM` env instead

Prevent user from switching to an unsupported theme

Add `true-color-override` option

If the terminal is wrongly detected to not support true color,
`true-color-override = true` will override the detection.

Rename `true-color-override` to `true-color`
3 years ago
Blaž Hrastnik dc8df7ba21 Make thread_picker non-blocking 3 years ago
Blaž Hrastnik 2b4de41bf0 dap: Reply to RunInTerminal 3 years ago
Blaž Hrastnik 5545f8ebb5 dap: Add RunInTerminal reverse request, support replying to requests 3 years ago
Blaž Hrastnik 2dbf966293 dap: Start working on runInTerminal support 3 years ago
Blaž Hrastnik 573cb39926 dap: Remove some unwraps 3 years ago
Blaž Hrastnik 8ffafb826f dap: Rewrite breakpoints so that there's a single set maintained 3 years ago
Blaž Hrastnik 9ed930b233 Merge remote-tracking branch 'origin/master' into debug 3 years ago
Blaž Hrastnik 6e62c3de47 Simplify some code in editor.rs 3 years ago
Blaž Hrastnik 72576822f3 dap: Replace breakpoint when changed event comes through 3 years ago
Blaž Hrastnik d1854d8e6a Merge remote-tracking branch 'origin/master' into debug 3 years ago
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
3 years ago
Blaž Hrastnik fa4c59df46 Simplify compositor.find 3 years ago
Cole Helbling 87e61a0894
helix-term/commands: implement cquit (#1096)
This allows you to exit helix with an exit code, e.g. `:cq 2`.
3 years ago
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>
3 years ago
Omnikar a424ef4e20
Use default `languages.toml` if user's is invalid (#994) 3 years ago
Blaž Hrastnik 8b85903116 wip 3 years ago
Blaž Hrastnik f2b709a3c3 Merge branch 'master' into debug 3 years ago
Ivan Tham 49f6c2623f
Bump lsp-types to 0.91.0 (#932) 3 years ago
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>
3 years ago
radical3dd d61e5e686b
Use current dir for file picker, after change dir. (#910) 3 years ago
Blaž Hrastnik e9b23c29d8 Ignore errors when disabling mouse capture 3 years ago
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
3 years ago
Blaž Hrastnik bda05ec4bf Use a newtype for ThreadId 3 years ago
Blaž Hrastnik 0a6b60085a Merge branch 'master' into debug 3 years ago
Ivan Tham 89707a858f
Make auto-completion a config (#853) 3 years ago
Omnikar c71b49497d
Set CWD when editor is started with a directory (#849) 3 years ago
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
3 years ago
Blaž Hrastnik c7f3a971c0 Remove resolved TODOs 3 years ago
Blaž Hrastnik 8ca91891d1 fix compilation 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
Blaž Hrastnik 1540b37f34 lsp: Silence window/logMessage if -v isn't used 3 years ago
Blaž Hrastnik 46f3c69f06 lsp: Don't send notifications until initialize completes
Then send open events for all documents with the LSP attached.
3 years ago
Blaž Hrastnik dc7799b980 lsp: Refactor code that could use document_by_path_mut 3 years ago
Blaž Hrastnik 63e191ea3b lsp: Simplify lookup under method call 3 years ago
Dmitry Sharshakov 507a1f8dd6 Get breakpoint reports from debugger 3 years ago
Dmitry Sharshakov c9cd06e904 Fetch stack traces for all threads when debugger sets all_thread_stopped flag 3 years ago
Dmitry Sharshakov cb31d20b46 mark thread as running when resumed 3 years ago
Dmitry Sharshakov 9939dbf119 Fix clippy warnings 3 years ago
Blaž Hrastnik b997d2cdeb dap: Allow setting breakpoints before starting the adapter 3 years ago
Blaž Hrastnik 289303a30d dap: small TODO 3 years ago
Blaž Hrastnik 42f9718f55 dap: Extract thread_picker, make pause explicitly select a thread 3 years ago
Blaž Hrastnik 27c1b3f98b dap: Extract a thread_states map 3 years ago
Blaž Hrastnik 5b920c53f0 Refactor resume_application state handling 3 years ago
Dmitry Sharshakov 9c64650a26
force update of stack trace when stopped 3 years ago
Dmitry Sharshakov e0180a4b88 find main thread automatically if thread stopped is not known 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
Blaž Hrastnik 986828e75c dap: Remap keys, match current thread behavior from dap-mode, switch-thread 3 years ago
Blaž Hrastnik 03b2d81406 dap: better yet, use Selection::single.. 3 years ago
Blaž Hrastnik 4d24a43651 dap: use smallvec! macro 3 years ago
Blaž Hrastnik 81f51c13fa dap: continued: THis check is already done before the match statement 3 years ago
Blaž Hrastnik 51328a4966 dap: extract dap_pos_to_pos 3 years ago
Dmitry Sharshakov e315394631
Merge remote-tracking branch 'origin/master' into debug 3 years ago
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
3 years ago
Dmitry Sharshakov 2c3e2b979b
Workaround for debugging Go tests 3 years ago
Dmitry Sharshakov 34c6094604
refactor 3 years ago
Dmitry Sharshakov c4085b4e88
Use saturating_sub for lenght 3 years ago
Dmitry Sharshakov ec599a1eac
Do not panic if entered unknown code via stack trace
e.g. Rust std library
3 years ago
Dmitry Sharshakov 3a5e044c89
languages: support debug for Rust with LLDB 3 years ago
Dmitry Sharshakov 09c994a97a
editor: drop telemetry output messages 3 years ago
Dmitry Sharshakov d0b0c9b2ef
editor: select a range if stack pointer has an end 3 years ago
Dmitry Sharshakov 132198323c
editor: go to pos where stack pointer is located 3 years ago
Dmitry Sharshakov be9dc5802a
editor: mark target as running when continued 3 years ago
Dmitry Sharshakov d93cd2a261
editor: support stepIn, stepOut, next and pause commands 3 years ago
Blaž Hrastnik 28658836ee Add more event types, simplify event decoding 3 years ago
Dmitry Sharshakov 2aee5f02d0
Style 3 years ago
Dmitry Sharshakov 7233ab2deb Merge branch 'debug' of https://github.com/sh7dm/helix into debug 3 years ago
Blaž Hrastnik a964cbae65 Extract handle_debugger_message, we should avoid bloating tokio::select! 3 years ago
Dmitry Sharshakov 91f2c60b36
Jump to stack pointer when stopped 3 years ago
Dmitry Sharshakov f3e47bfee4
Disable continuing when running 3 years ago
Dmitry Sharshakov 6709b4242f
Drop and terminate debugger 3 years ago
Dmitry Sharshakov 462c8a6ec8
Show debugger output in the statusline 3 years ago
Dmitry Sharshakov 5a06263b78
report status when target started or stopped 3 years ago
Dmitry Sharshakov bcab93c94e
Update editor window when stopped 3 years ago
Dmitry Sharshakov a938f5a87a
refactor: handle DAP events in editor main loop 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 d39baa3b4e Start integrating into the editor's event loop 3 years ago
Blaž Hrastnik a4564adadd fix: Don't crash if language servers time out 3 years ago
Blaž Hrastnik a2ccfffda1 config: Rename [terminal] to [editor] and pass it into Editor 3 years ago
Luctius 8714b71991 Do not shutdown lsp during claim_term
Fixes a bug where the language server is told to shutdown directly after application start.
3 years ago
Blaž Hrastnik 585793eb46 Use an empty stream on Windows to remove duplication 3 years ago
Ivan Tham 821565e4ef Add ctrl-z to suspend 3 years ago
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>
3 years ago
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
3 years ago
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.
3 years ago
Blaž Hrastnik 83e7dd8602 fix: Temporary fix for #402 3 years ago
Nathan Vegdahl 0b2d51cf5a Fix unused `Result` warnings in helix-term. 3 years ago
Nathan Vegdahl efa3389b6a Fix unused variable, parameter, and `mut` warnings in helix-term. 3 years ago
Nathan Vegdahl 702a0491db Remove #[allow(unused)] from helix-term, and fix unused imports.
Lots of other warning still left.  Will address in subsequent commits.
3 years ago
Joe Neeman ffa2f2590b Satisfy clippy. 3 years ago
Joe Neeman d64d75e724 Add some async job infrastructure. 3 years ago