Blaž Hrastnik
37606bad47
lsp: doc.language_server() is None until initialize completes
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
2793ff3832
lsp: SyncKind::Full: we need to send the whole document on each change
3 years ago
Blaž Hrastnik
48fd4843fc
lsp: Outdated comment
3 years ago
Blaž Hrastnik
800d79b584
ls: Refactor textDocument/didSave in a similar vein
3 years ago
Blaž Hrastnik
184637c55a
lsp: refactor format so we stop cloning the language_server
3 years ago
Blaž Hrastnik
8744f367bd
wip
3 years ago
Blaž Hrastnik
5a558e0d8e
lsp: Delay requests & notifications until initialization is complete
3 years ago
Blaž Hrastnik
c3a58cdadd
lsp: Refactor capabilities as an async OnceCell
...
First step in making LSP init asynchronous
3 years ago
Blaž Hrastnik
41f1e8e4fb
fix: lsp: Terminate transport on EOF
...
If stdout/stderr is closed, read_line will return 0 indicating EOF.
3 years ago
Blaž Hrastnik
fe17b99ab3
fix: lsp: Don't consume \n\n as a single newline
3 years ago
Blaž Hrastnik
57ed5180e0
lsp: Improve line ending handling when generating TextEdit
3 years ago
Blaž Hrastnik
847d1fa496
fix: Work around crashes on LSPs that don't just emit JSON-RPC
3 years ago
Blaž Hrastnik
7eff905680
lsp: slightly refactor header parsing, add more logging
3 years ago
Timothy DeHerrera
ed8c3e6574
don't panic on defunct lsp process ( #583 )
3 years ago
Blaž Hrastnik
385a6b5a1a
lsp: Refactor duplex to avoid issues with select! + read_exact
...
read_exact isn't cancellation safe.
Fixes #504
3 years ago
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>
3 years ago
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>
3 years ago
Joe Neeman
c9be480bf8
Make formatting happen asynchronously.
3 years ago
Blaž Hrastnik
cad14c6b46
Address nightly clippy warnings
3 years ago
Blaž Hrastnik
a70de6e980
Merge pull request #224 from helix-editor/line_ending_detection
...
Line ending detection
3 years ago
wojciechkepka
cc357d5096
Add progress spinners to status line
3 years ago
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.
3 years ago
wojciechkepka
dd0af78079
Fix unwraps in lsp::transport
3 years ago
wojciechkepka
c2aad859b1
Handle language server shutdown with timeout
3 years ago
wojciechkepka
d095ec15d4
Reenable `work_done_progress` capability
3 years ago
wojciechkepka
38cb934d8f
Add unique id to each lsp client/server pair
3 years ago
wojciechkepka
80b4a69053
Update `client::reply` to be non async
3 years ago
wojciechkepka
a6d39585d8
Add `work_done_token` as parameter to lsp methods
3 years ago
wojciechkepka
52fb90b81e
Add `MethodCall`, `ProgressStatus`, `LspProgressMap`
3 years ago
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
4 years ago
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
4 years ago
Blaž Hrastnik
a8a5bcd13d
Temporarily disable workDone
...
Blows up on gopls because we don't handle receiving window/workDoneProgress/create method calls
4 years ago
Wojciech Kępka
098806ce2a
lsp: Display LSP progress messages ( #216 )
4 years ago
Ivan Tham
7cc13fefe9
Derive debug without feature
...
Note that this also removed those `finish_non_exhaustive()`.
4 years ago
notoria
1a3a924634
Implement Debug for data structure as a feature
4 years ago
Egor Karavaev
ea6667070f
helix-lsp cleanup
4 years ago
Egor Karavaev
960bc9f134
Don't panic on LSP not starting
4 years ago
Blaž Hrastnik
8d6fad4cac
lsp: Provide workspace root on client.initialize()
4 years ago
Egor Karavaev
d55419604c
Remove select_all implementation
4 years ago
Blaž Hrastnik
e4ff75b4d4
Add :fmt (formats the whole file).
4 years ago
Blaž Hrastnik
6c705f09e8
Lint
4 years ago
Blaž Hrastnik
caf4349925
Remove some of the panics, just log instead.
4 years ago
Blaž Hrastnik
fd4fd12fa3
clippy lint
4 years ago
Blaž Hrastnik
ba97005495
Work around the rest of the blocking issues.
4 years ago
Blaž Hrastnik
d00414f81a
Start moving more LSP calls into callbacks/futures without capturing self
4 years ago
Blaž Hrastnik
355ad3cb82
Tokio migration.
4 years ago
Blaž Hrastnik
3b90317060
Add window/showMessage / logMessage stubs so gopls fully starts.
4 years ago
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.
4 years ago
Blaž Hrastnik
5aed1f3c00
lsp: Gracefully fail if binary doesn't exist.
4 years ago
Blaž Hrastnik
0e9ecccfc1
clippy: Drop or-patterns for now because they're not on stable rust yet
4 years ago
Blaž Hrastnik
ceea5eacd8
clippy lint
4 years ago
Blaž Hrastnik
2a3910c1d9
wip: Async async. Delay response handling with a callback.
4 years ago
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.
4 years ago
Blaž Hrastnik
9a36d2c2a8
wip: Hooks & trigger characters for completion/signature_help.
4 years ago
Blaž Hrastnik
cbcacb1063
Merge some imports.
4 years ago
Blaž Hrastnik
e9bd9e72c3
Pos conversions always operate on whole documents.
4 years ago
Blaž Hrastnik
5237084d98
Don't publicly re-export once_cell in lsp.
4 years ago
Blaž Hrastnik
59e6024186
Remove State from a few more signatures.
4 years ago
Blaž Hrastnik
8eaf9a432d
Make Transaction::change only rely on the rope.
4 years ago
Blaž Hrastnik
15f142bc4b
lsp: Use into_iter->map->collect instead of manual loop.
4 years ago
Blaž Hrastnik
4240f757c0
lsp: Fix compilation errors.
4 years ago
Jan Hrastnik
a5f9080a9c
goto_request wip
4 years ago
Jan Hrastnik
b738ae1bc7
more goto lsp functions
4 years ago
Jan Hrastnik
0322c28e6b
gd now works for singular definition
4 years ago
Jan Hrastnik
8a68a04340
gotodefiniton now runs but doesnt return anything
4 years ago
Jan Hrastnik
d3ddc8dea6
wip
4 years ago
Blaž Hrastnik
eca2a73ad0
lsp: Pass through language_id on didOpenTextDocument.
4 years ago
Blaž Hrastnik
143cfe13e0
minor: TODO comment cleanup
4 years ago
Blaž Hrastnik
87e3cd3df2
ui: Render diagnostic errors in sideline.
4 years ago
Blaž Hrastnik
bb87b08fc9
Configure language servers via LanguageConfiguration.
4 years ago
Blaž Hrastnik
6cbfb050e2
lsp: Emit didSave notifications.
4 years ago
Blaž Hrastnik
4102992c46
Bump deps.
4 years ago
Blaž Hrastnik
1ae7c43391
commands: = as range formatting (via lsp)
4 years ago
Blaž Hrastnik
7162632eb7
lsp: Hover documentation draft.
4 years ago
Blaž Hrastnik
87a6d4e736
minor: Simplify some code.
4 years ago
Blaž Hrastnik
61ce2c9cfe
lsp: Disable snippet_support until we implement it.
4 years ago
Blaž Hrastnik
004a4f37a7
lsp: Handle responses being returned after request timed out.
4 years ago
Blaž Hrastnik
c9dd1c930e
treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref
4 years ago
Blaž Hrastnik
d5f9622e2e
lsp: edit events change ranges need to affect each other.
4 years ago
Blaž Hrastnik
48ef6598db
Increase the log level in LSP and log server errors.
4 years ago
Blaž Hrastnik
b7da7f83c3
lsp: Test changeset_to_changes.
4 years ago
Blaž Hrastnik
0541fbb85f
Adjust LSP changeset generation too: insert now always preceedes delete.
4 years ago
Blaž Hrastnik
05c7fb98df
Refactoring: move language_servers into Editor, proper load for doc.
4 years ago
Blaž Hrastnik
777a80917d
Address clippy lints.
4 years ago
Blaž Hrastnik
941c34a7fc
lsp: Move timeouts into client.request
4 years ago
Blaž Hrastnik
3cbab20908
lsp: Fix pos_to_lsp_pos calculation.
4 years ago
Blaž Hrastnik
2ab069bb3f
lsp: Work on syncing the state with the language server.
4 years ago
Blaž Hrastnik
cd16df19c1
lsp: generate_transaction_from_text_edits
4 years ago
Blaž Hrastnik
56f2193811
Retrieve completion options on ctrl-x.
4 years ago
Blaž Hrastnik
955cb81687
Init lsp through the registry.
4 years ago
Blaž Hrastnik
8695415fbf
wip: Move to new rendering structure.
4 years ago
Blaž Hrastnik
39bf1ca825
Update deps.
4 years ago
Blaž Hrastnik
a7869c728c
wip
4 years ago
Blaž Hrastnik
ae8a9e5bac
lsp: Make base request methods take &self instead of &mut self.
4 years ago
Blaž Hrastnik
cc6bdf8f66
Text change generation, RPC call handling.
4 years ago
Blaž Hrastnik
af1924404a
Configure logging (-vv for debug level logs)
4 years ago
Blaž Hrastnik
eff6fac9ec
clippy lint
4 years ago
Blaž Hrastnik
b39849dde1
Refactor: Document type as a wrapper around barebones State.
4 years ago
Blaž Hrastnik
81ccca0c6a
Improve error typing.
4 years ago