aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp
Commit message (Collapse)AuthorAge
* Remove LspNotDefined, instead return an Option<>Blaž Hrastnik2022-09-07
|
* build(deps): bump tokio from 1.20.1 to 1.21.0 (#3716)dependabot[bot]2022-09-06
| | | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.20.1 to 1.21.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.20.1...tokio-1.21.0) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* lsp: Don't log "LSP not defined" errors in the logfileBlaž Hrastnik2022-09-03
|
* Advertise WorkspaceSymbolClientCapabilities support (#3361)Michael Davis2022-08-09
|
* Change default formatter for any language (#2942)PiergiorgioZagaria2022-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change default formatter for any language * Fix clippy error * Close stdin for Stdio formatters * Better indentation and pattern matching * Return Result<Option<...>> for fn format instead of Option * Remove unwrap for stdin * Handle FormatterErrors instead of Result<Option<...>> * Use Transaction instead of LspFormatting * Use Transaction directly in Document::format * Perform stdin type formatting asynchronously * Rename formatter.type values to kebab-case * Debug format for displaying io::ErrorKind (msrv fix) * Solve conflict? * Use only stdio type formatters * Remove FormatterType enum * Remove old comment * Check if the formatter exited correctly * Add formatter configuration to the book * Avoid allocations when writing to stdin and formatting errors * Remove unused import Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* Suport diagnostic code (#3096)Erasin2022-07-26
| | | | | | | * add code for diagnostic. This PR provides a solution to resolve #2994. missing Code Actions for lsp * remote unused import
* Add lsp signature help (#1755)Gokul Soumya2022-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lsp signature help * Do not move signature help popup on multiple triggers * Highlight current parameter in signature help * Auto close signature help * Position signature help above to not block completion * Update signature help on backspace/insert mode delete * Add lsp.auto-signature-help config option * Add serde default annotation for LspConfig * Show LSP inactive message only if signature help is invoked manually * Do not assume valid signature help response from LSP Malformed LSP responses are common, and these should not crash the editor. * Check signature help capability before sending request * Reuse Open enum for PositionBias in popup * Close signature popup and exit insert mode on escape * Add config to control signature help docs display * Use new Margin api in signature help * Invoke signature help on changing to insert mode
* lsp: Add workspace/applyEdit to client capabilites (#3012)Gokul Soumya2022-07-08
| | | | | | 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
* feat: highlight / select symbol under cursor using LSP ↵lazytanuki2022-06-27
| | | | | | | | | textDocument/documentHighlight (#2738) * feat: highlight symbol under cursor using LSP textDocument/documentHighlight * fix: please clippy * fix: shorter description and code style
* Fix tests againBlaž Hrastnik2022-06-27
|
* Remove some more unwrapsBlaž Hrastnik2022-06-27
|
* embed jsonrpc types from jsonrpc-core crate (#2801)Michael Davis2022-06-18
| | | | | | | | | | | | | | 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
* build(deps): bump tokio-stream from 0.1.8 to 0.1.9 (#2690)dependabot[bot]2022-06-07
| | | | | | | | | | | | | | | | Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.8 to 0.1.9. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.8...tokio-stream-0.1.9) --- updated-dependencies: - dependency-name: tokio-stream dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump tokio from 1.18.2 to 1.19.2 (#2691)dependabot[bot]2022-06-07
| | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.18.2 to 1.19.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/commits) --- 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>
* Passing extra formatting options to LSPs (#2635)farwyler2022-06-05
| | | | | | | | | | | | | * 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
* fix: lsp: Sort edits by start range, Omnisharp sends them in reverseBlaž Hrastnik2022-06-02
|
* prevent panic when handling an LSP response with no request (#2475)Michael Davis2022-05-17
| | | | | | | | | | | 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
* Don't panic on LSP parsing errorsBlaž Hrastnik2022-05-11
| | | | | | 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.
* configurable lsp request timeout (#2405)EmmChriss2022-05-11
|
* build(deps): bump tokio from 1.17.0 to 1.18.1 (#2373)dependabot[bot]2022-05-03
| | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.17.0 to 1.18.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.17.0...tokio-1.18.1) --- 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>
* fix typos (#2304)chunghha2022-04-27
|
* register publish_diagnostics client capability (#2241)matt rice2022-04-25
|
* chore(lsp): check rename capabilities before send rename action (#2203)ttys32022-04-23
|
* prevent panic when receiving malformed LSP PublishDiagnostic (#2160)Michael Davis2022-04-18
| | | | | | | | | | | 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. (#2005)Robin Jadoul2022-04-17
| | | | | | | | | | | * 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
* Fixes #1991 LSP Auto-import (#2088)Andrey Tkachenko2022-04-16
|
* build(deps): bump lsp-types from 0.92.1 to 0.93.0 (#2084)dependabot[bot]2022-04-12
| | | | | | | | | | | | | | | | | Bumps [lsp-types](https://github.com/gluon-lang/lsp-types) from 0.92.1 to 0.93.0. - [Release notes](https://github.com/gluon-lang/lsp-types/releases) - [Changelog](https://github.com/gluon-lang/lsp-types/blob/master/CHANGELOG.md) - [Commits](https://github.com/gluon-lang/lsp-types/compare/v0.92.1...v0.93.0) --- updated-dependencies: - dependency-name: lsp-types 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>
* lsp: Implement support for workspace_folders (currently just one)Blaž Hrastnik2022-04-01
| | | | Refs #1898
* fix: Some LSPs still want rootPath, so provide itBlaž Hrastnik2022-03-31
| | | | Refs #1898
* Implement LSP `workspace/configuration` and ↵Triton1712022-02-28
| | | | | | | | | | | | | `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>
* Use which to resolve lsp/dap binariesBlaž Hrastnik2022-02-24
| | | | This resolves the following issue: https://github.com/helix-editor/helix/discussions/962#discussioncomment-1580046
* build(deps): bump tokio from 1.16.1 to 1.17.0 (#1691)dependabot[bot]2022-02-22
| | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.16.1 to 1.17.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.16.1...tokio-1.17.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>
* Merge remote-tracking branch 'origin/master' into debugBlaž Hrastnik2022-02-13
|\
| * Replace tendril with smartstringBlaž Hrastnik2022-02-10
| | | | | | | | Slightly smaller API surface, less dependencies.
| * build(deps): bump lsp-types from 0.91.1 to 0.92.0 (#1631)dependabot[bot]2022-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [lsp-types](https://github.com/gluon-lang/lsp-types) from 0.91.1 to 0.92.0. - [Release notes](https://github.com/gluon-lang/lsp-types/releases) - [Changelog](https://github.com/gluon-lang/lsp-types/blob/master/CHANGELOG.md) - [Commits](https://github.com/gluon-lang/lsp-types/compare/v0.91.1...v0.92.0) --- updated-dependencies: - dependency-name: lsp-types 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>
| * build(deps): bump tokio from 1.15.0 to 1.16.1 (#1610)dependabot[bot]2022-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.15.0 to 1.16.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.15.0...tokio-1.16.1) --- 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>
| * Release 0.6Blaž Hrastnik2022-01-04
| |
| * Optimize lsp_pos_to_pos (#1423)Kirawi2022-01-03
| | | | | | lines().count() is slow compared to len_lines()
| * Detect workspace root using language markers (#1370)Alexis Mousset2021-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Resolve completion item (#1315)Gabriel Berto2021-12-25
| | | | | | Co-authored-by: Gabriel Berto <gabriel.berto@pottencial.com.br>
| * LSP code action commands (#1304)Matouš Dzivjak2021-12-21
| | | | | | | | | | | | | | | | | | * feat(lsp): codeAction commands * Don't block on command call * Fix lifetime of command execution * Fix lint issues
| * build(deps): bump tokio from 1.14.0 to 1.15.0 (#1321)dependabot[bot]2021-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.14.0 to 1.15.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.14.0...tokio-1.15.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>
| * lsp: Don't panic if init failsBlaž Hrastnik2021-12-03
| | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'origin/master' into debugBlaž Hrastnik2021-11-30
|\|
| * build(deps): bump tokio from 1.13.1 to 1.14.0 (#1146)dependabot[bot]2021-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.13.1 to 1.14.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.13.1...tokio-1.14.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>
* | Merge remote-tracking branch 'origin/master' into debugBlaž Hrastnik2021-11-21
|\|
| * Add LSP rename_symbol (space-r) (#1011)CossonLeo2021-11-08
| | | | | | improve apply_workspace_edit
* | Merge branch 'master' into debugBlaž Hrastnik2021-11-06
|\|
| * build(deps): bump tokio-stream from 0.1.7 to 0.1.8 (#953)dependabot[bot]2021-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.7 to 0.1.8. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.7...tokio-stream-0.1.8) --- updated-dependencies: - dependency-name: tokio-stream dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
| * build(deps): bump tokio from 1.12.0 to 1.13.0 (#955)dependabot[bot]2021-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.12.0...tokio-1.13.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>