| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
The functionality already existed, but the capability wasn't being
reported correctly to the server:
https://github.com/helix-editor/helix/blob/230ba264bf78d9b4ecd42440f0cbb20529f9c235/helix-term/src/application.rs#L716-L728
|
|
|
|
|
|
|
|
|
| |
textDocument/documentHighlight (#2738)
* feat: highlight symbol under cursor using LSP textDocument/documentHighlight
* fix: please clippy
* fix: shorter description and code style
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should not depend on jsonrpc-core anymore:
* The project just announced it's no longer actively maintained[^1],
preferring their new implementation in `jsonrpsee`.
* The types are too strict: we would benefit from removing some
`#[serde(deny_unknown_fields)]` annotations to allow language
servers that disrespect the spec[^2].
* We don't use much of the project. Just the types out of core.
These are easy to embed directly into the `helix-lsp` crate.
[^1]: https://github.com/paritytech/jsonrpc/pull/674
[^2]: https://github.com/helix-editor/helix/issues/2786
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* allows passing extra formatting options to LSPs
- adds optional field 'format' to [[language]] sections in 'languages.toml'
- passes specified options the LSPs via FormattingOptions
* cleaner conversion of formatting properties
* move formatting options inside lsp::Client
* cleans up formatting properties merge
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A language server may push a response which doesn't belong to any
request. With this change, we discard the response rather than
crashing.
In the case of #2474, the language server sends an error message
with a null request ID which should not ever exist in the
`pending_requests` HashMap.
closes #2474
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of panicing we can discard the malformed diagnostic. This
`.parse()` fails commonly when a non-conformant language server gives
a diagnostic with a location that breaks the spec:
{ "character": 0, "line": -1 }
can currently be returned by ElixirLS and the python LS. Other
messages in this block are discarded but this one feels special enough
to log.
|
|
|
|
|
|
|
|
|
|
|
| |
* Send active diagnostics to LSP when requesting code actions.
This allows for e.g. clangd to properly send the quickfix code actions
corresponding to those diagnostics as options.
The LSP spec v3.16.0 introduced an opaque `data` member that would allow
the server to persist arbitrary data between the diagnostic and the code
actions request, but this is not supported yet by this commit.
* Reuse existing range_to_lsp_range functionality
|
| |
|
|
|
|
| |
Refs #1898
|
|
|
|
| |
Refs #1898
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
| |
This resolves the following issue: https://github.com/helix-editor/helix/discussions/962#discussioncomment-1580046
|
|
|
|
| |
Slightly smaller API surface, less dependencies.
|
|
|
| |
lines().count() is slow compared to len_lines()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Detect workspace root using language markers
* Avoid allocating root_markers
* Update helix-core/src/lib.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Update helix-core/src/lib.rs
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Gabriel Berto <gabriel.berto@pottencial.com.br>
|
|
|
|
|
|
|
|
|
| |
* feat(lsp): codeAction commands
* Don't block on command call
* Fix lifetime of command execution
* Fix lint issues
|
|
|
|
|
|
| |
We correctly filter out the language server inside Document to ignore it
if the capabilities are missing, so this way it'll simply ignore the
errored out LSP rather than panicking.
|
|
|
| |
improve apply_workspace_edit
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#807)
* allow language.config (in languages.toml) to be passed in as a toml object
* Change config field for languages from json string to toml object
* remove indents on languages.toml config
* fix: remove patch version from serde_json import in helix-core
* Use same tree-sitter-zig as upstream/master
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Then send open events for all documents with the LSP attached.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
First step in making LSP init asynchronous
|
|
|
|
| |
If stdout/stderr is closed, read_line will return 0 indicating EOF.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
read_exact isn't cancellation safe.
Fixes #504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|