Blaž Hrastnik
bb47a9a0b8
fix: Fix regression where formatting would fail on null response
2021-09-09 11:49:45 +09:00
Blaž Hrastnik
fd36fbdebf
Merge branch 'lsp-async-init'
2021-09-07 13:05:53 +09:00
dependabot[bot]
fde0a84bba
build(deps): bump tokio from 1.10.1 to 1.11.0 ( #723 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.10.1 to 1.11.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.10.1...tokio-1.11.0 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-07 09:15:31 +09:00
Blaž Hrastnik
be81f40df8
lsp: This doesn't need to be a mutable reference
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
37606bad47
lsp: doc.language_server() is None until initialize completes
2021-09-06 15:25:46 +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
2793ff3832
lsp: SyncKind::Full: we need to send the whole document on each change
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
48fd4843fc
lsp: Outdated comment
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
800d79b584
ls: Refactor textDocument/didSave in a similar vein
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
184637c55a
lsp: refactor format so we stop cloning the language_server
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
8744f367bd
wip
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
5a558e0d8e
lsp: Delay requests & notifications until initialization is complete
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
c3a58cdadd
lsp: Refactor capabilities as an async OnceCell
...
First step in making LSP init asynchronous
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
41f1e8e4fb
fix: lsp: Terminate transport on EOF
...
If stdout/stderr is closed, read_line will return 0 indicating EOF.
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
fe17b99ab3
fix: lsp: Don't consume \n\n as a single newline
2021-09-06 15:25:08 +09:00
Blaž Hrastnik
57ed5180e0
lsp: Improve line ending handling when generating TextEdit
2021-09-06 11:00:33 +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
dependabot[bot]
9d83a4483d
build(deps): bump tokio from 1.10.0 to 1.10.1
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.10.0...tokio-1.10.1 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 10:02:06 +09:00
Blaž Hrastnik
847d1fa496
fix: Work around crashes on LSPs that don't just emit JSON-RPC
2021-08-29 18:38:28 +09:00
Blaž Hrastnik
7eff905680
lsp: slightly refactor header parsing, add more logging
2021-08-29 12:40:21 +09:00
Dmitry Sharshakov
c7759a5aa0
Merge remote-tracking branch 'origin/master' into debug
2021-08-25 19:22:01 +03:00
Timothy DeHerrera
ed8c3e6574
don't panic on defunct lsp process ( #583 )
2021-08-23 18:04:22 +09:00
Blaž Hrastnik
d39baa3b4e
Start integrating into the editor's event loop
2021-08-20 13:48:32 +09:00
Blaž Hrastnik
3f62799656
Get cargo check to pass in the subcrate
2021-08-20 13:43:54 +09:00
Blaž Hrastnik
1caedc18ca
Release v0.4.1
2021-08-14 13:32:29 +09:00
Blaž Hrastnik
3de40de0a9
fix build...
2021-08-13 01:28:11 +09:00
Blaž Hrastnik
733ee06b7b
Release v0.4.0
2021-08-13 01:24:04 +09:00
Blaž Hrastnik
385a6b5a1a
lsp: Refactor duplex to avoid issues with select! + read_exact
...
read_exact isn't cancellation safe.
Fixes #504
2021-08-07 15:04:03 +09:00
Ivan Tham
821565e4ef
Add ctrl-z to suspend
2021-08-03 09:32:21 +09:00
dependabot[bot]
a6aad3122d
Bump tokio from 1.8.2 to 1.9.0
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.8.2...tokio-1.9.0 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 09:28:34 +08:00
dependabot[bot]
b581c185ba
Bump jsonrpc-core from 17.1.0 to 18.0.0
...
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc ) from 17.1.0 to 18.0.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases )
- [Commits](https://github.com/paritytech/jsonrpc/compare/jsonrpc-core-17.1.0...v18.0.0 )
---
updated-dependencies:
- dependency-name: jsonrpc-core
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 09:26:37 +08:00
Grzegorz Baranski
48e344a2a8
feat: code actions - document edits ( #478 )
...
* wip: Code actions
* fix(term): use current macro instead Context::context
* feat(lsp): set code_action capabilities
* feat(term): set SPC-a to code_action
* feat(term): wip on applying code actions
* deps: `cargo update`
* feat(term): applying code actions edits
* fix(term): cleanup of apply_edit
* fix(term): applying edits as a whole thing instead one by one
* refactor(term): move apply_edits below
* fix(term): improve unimplemented messages for further investigation
* fix(term): change code action command comment
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* fix(term): add matching `}`
* fix(term): cleanup, todo!() on workspace edit
* fix(term): remove unrelated workspace_symbol_picker
* fix(term): apply cargo-clippy suggestions
* fix(term): replace todo!'s with editor.set_error
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-07-24 10:26:43 +09:00
Cor Peters
0aa43902ca
Added option to provide a custom config file to the lsp. ( #460 )
...
* Added option to provide a custom config file to the lsp.
* Simplified lsp loading routine with anyhow
* Moved config to language.toml
* Fixed test case
* Cargo fmt
* Revert now-useless changes
* Renamed custom_config to config
Co-authored-by: Cor <prive@corpeters.nl>
2021-07-18 16:56:25 +09:00
dependabot[bot]
c74198a3bf
Bump tokio-stream from 0.1.6 to 0.1.7
...
Bumps [tokio-stream](https://github.com/tokio-rs/tokio ) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.6...tokio-stream-0.1.7 )
---
updated-dependencies:
- dependency-name: tokio-stream
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 09:58:54 +09:00
dependabot[bot]
47a6882738
Bump tokio from 1.7.1 to 1.8.0
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.7.1...tokio-1.8.0 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-07-06 09:52:47 +09:00
Joe Neeman
c9be480bf8
Make formatting happen asynchronously.
2021-06-30 17:08:50 +09:00
Blaž Hrastnik
44566ea812
Release 0.3.0
2021-06-27 13:27:47 +09:00
Blaž Hrastnik
cad14c6b46
Address nightly clippy warnings
2021-06-27 13:27:47 +09:00
Blaž Hrastnik
a70de6e980
Merge pull request #224 from helix-editor/line_ending_detection
...
Line ending detection
2021-06-22 11:09:19 +09:00
dependabot[bot]
c704970fd7
Bump tokio from 1.6.1 to 1.7.1
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.6.1 to 1.7.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.6.1...tokio-1.7.1 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-06-22 09:26:14 +09:00
wojciechkepka
cc357d5096
Add progress spinners to status line
2021-06-21 12:59:06 +09:00
Nathan Vegdahl
4efd6713c5
Work on moving code over to LineEnding instead of assuming '\n'.
...
Also some general cleanup and some minor fixes along the way.
2021-06-20 15:33:02 -07:00
wojciechkepka
dd0af78079
Fix unwraps in lsp::transport
2021-06-19 13:02:56 +09:00
wojciechkepka
c2aad859b1
Handle language server shutdown with timeout
2021-06-19 13:02:56 +09:00
Benoît CORTIER
03d1ca7b0a
cargo: add more metadata to manifests
2021-06-19 10:04:59 +09:00
Benoît CORTIER
b48054f3ee
cargo: add version to local dependencies
...
First step towards enabling us to publish on crates.io.
See: https://github.com/helix-editor/helix/issues/42
2021-06-19 10:04:59 +09:00
wojciechkepka
d095ec15d4
Reenable work_done_progress
capability
2021-06-18 17:42:38 +09:00
wojciechkepka
38cb934d8f
Add unique id to each lsp client/server pair
2021-06-18 17:42:38 +09:00
wojciechkepka
80b4a69053
Update client::reply
to be non async
2021-06-18 17:42:38 +09:00
wojciechkepka
a6d39585d8
Add work_done_token
as parameter to lsp methods
2021-06-18 17:42:38 +09:00
wojciechkepka
52fb90b81e
Add MethodCall
, ProgressStatus
, LspProgressMap
2021-06-18 17:42:38 +09:00
Blaž Hrastnik
ae5ecfdf66
Release v0.2.0
2021-06-13 22:35:13 +09:00
Robin
9baf1ecc90
add symbol picker ( #230 )
...
* add symbol picker
use the lsp document_symbol request
* fix errors from merging in master
* add docs for symbol picker
2021-06-12 21:45:21 +09:00
Wojciech Kępka
c754df12b3
lsp: Check bounds when converting lsp positions ( #204 )
...
* lsp: Make position conversion funcs return `Option`
* Add tests
* Fixes
* Revert pos_to_lsp_pos to panic
2021-06-12 16:04:30 +09:00
Blaž Hrastnik
a8a5bcd13d
Temporarily disable workDone
...
Blows up on gopls because we don't handle receiving window/workDoneProgress/create method calls
2021-06-11 13:30:21 +09:00
Wojciech Kępka
098806ce2a
lsp: Display LSP progress messages ( #216 )
2021-06-11 12:42:16 +09:00
Ivan Tham
7cc13fefe9
Derive debug without feature
...
Note that this also removed those `finish_non_exhaustive()`.
2021-06-10 22:00:08 +09:00
notoria
1a3a924634
Implement Debug for data structure as a feature
2021-06-10 22:00:08 +09:00
Egor Karavaev
ea6667070f
helix-lsp cleanup
2021-06-08 10:56:46 +09:00
Egor Karavaev
960bc9f134
Don't panic on LSP not starting
2021-06-08 10:02:41 +09:00
Blaž Hrastnik
d5de9183ef
Use upstream jsonrpc again
2021-06-07 21:33:17 +09:00
Blaž Hrastnik
8d6fad4cac
lsp: Provide workspace root on client.initialize()
2021-06-07 21:32:01 +09:00
Blaž Hrastnik
f48a60b8e2
Release 0.0.10
2021-06-07 09:42:15 +09:00
Ethan Bodzioney
843c2cdebd
Install instructions and version number corrections ( #148 )
...
* Add MacOS install instructions
* Change version name argument
When using the -V command to get the version you are given 'helix-term x.x.x', I changed this to just helix as it makes more sense.
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
2021-06-07 09:14:06 +09:00
Egor Karavaev
d55419604c
Remove select_all implementation
2021-06-04 09:25:30 +09:00
Blaž Hrastnik
e4ff75b4d4
Add :fmt (formats the whole file).
2021-05-12 17:24:55 +09:00
Blaž Hrastnik
5cbb4efa6d
Add the LICENSE file.
2021-05-11 01:44:00 +09:00
Blaž Hrastnik
6c705f09e8
Lint
2021-05-09 17:13:59 +09:00
Blaž Hrastnik
caf4349925
Remove some of the panics, just log instead.
2021-05-08 18:17:13 +09:00
Blaž Hrastnik
8a949fb011
Drop shellexpand.
2021-05-08 11:54:19 +09:00
Blaž Hrastnik
570c253ffb
Disable default features on futures-util to drop proc macros.
2021-05-08 11:51:18 +09:00
Blaž Hrastnik
fd4fd12fa3
clippy lint
2021-05-06 17:20:00 +09:00
Blaž Hrastnik
ba97005495
Work around the rest of the blocking issues.
2021-05-06 17:15:49 +09:00
Blaž Hrastnik
d00414f81a
Start moving more LSP calls into callbacks/futures without capturing self
2021-05-06 15:08:59 +09:00
Blaž Hrastnik
1ad0581ddd
Eliminate a few more futures dependencies.
2021-05-06 14:33:53 +09:00
Blaž Hrastnik
355ad3cb82
Tokio migration.
2021-05-06 13:56:34 +09:00
Blaž Hrastnik
91767c3848
Update dependencies.
2021-04-21 13:36:32 +09:00
Blaž Hrastnik
3b90317060
Add window/showMessage / logMessage stubs so gopls fully starts.
2021-04-15 17:34:38 +09:00
Blaž Hrastnik
3e5f24a9d5
lsp: support both utf-8 and utf-16 offsets.
...
Still need to implement the clangd encoding negotiation, but it's
a start. Should also manually override to utf8 for pyls.
2021-04-14 15:39:31 +09:00
Blaž Hrastnik
5aed1f3c00
lsp: Gracefully fail if binary doesn't exist.
2021-04-07 13:38:24 +09:00
Blaž Hrastnik
0e9ecccfc1
clippy: Drop or-patterns for now because they're not on stable rust yet
2021-04-06 19:51:15 +09:00
Blaž Hrastnik
ceea5eacd8
clippy lint
2021-03-31 23:42:16 +09:00
Blaž Hrastnik
2a3910c1d9
wip: Async async. Delay response handling with a callback.
2021-03-26 17:12:45 +09:00
Blaž Hrastnik
e3c4edae32
Add the machinery to load syntax config from TOML.
...
It's embedded into the binary at build time for now, but it's progress.
2021-03-25 15:26:25 +09:00
Blaž Hrastnik
9a36d2c2a8
wip: Hooks & trigger characters for completion/signature_help.
2021-03-24 18:17:00 +09:00
Blaž Hrastnik
cbcacb1063
Merge some imports.
2021-03-22 12:40:07 +09:00
Blaž Hrastnik
e9bd9e72c3
Pos conversions always operate on whole documents.
2021-03-18 15:23:42 +09:00
Blaž Hrastnik
5237084d98
Don't publicly re-export once_cell in lsp.
2021-03-18 14:29:38 +09:00
Blaž Hrastnik
59e6024186
Remove State from a few more signatures.
2021-03-18 14:17:32 +09:00
Blaž Hrastnik
8eaf9a432d
Make Transaction::change only rely on the rope.
2021-03-18 13:39:56 +09:00
Blaž Hrastnik
15f142bc4b
lsp: Use into_iter->map->collect instead of manual loop.
2021-03-16 23:03:29 +09:00
Blaž Hrastnik
4240f757c0
lsp: Fix compilation errors.
2021-03-16 23:03:10 +09:00
Jan Hrastnik
a5f9080a9c
goto_request wip
2021-03-16 23:03:10 +09:00
Jan Hrastnik
b738ae1bc7
more goto lsp functions
2021-03-16 23:03:10 +09:00
Jan Hrastnik
0322c28e6b
gd now works for singular definition
2021-03-16 23:03:10 +09:00
Jan Hrastnik
8a68a04340
gotodefiniton now runs but doesnt return anything
2021-03-16 23:03:10 +09:00
Jan Hrastnik
d3ddc8dea6
wip
2021-03-16 23:03:10 +09:00
Blaž Hrastnik
eca2a73ad0
lsp: Pass through language_id on didOpenTextDocument.
2021-03-16 16:13:41 +09:00
Blaž Hrastnik
143cfe13e0
minor: TODO comment cleanup
2021-03-16 15:41:42 +09:00
Blaž Hrastnik
87e3cd3df2
ui: Render diagnostic errors in sideline.
2021-03-15 16:19:31 +09:00