You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: What to do with a multi-workspace project has different toolchain versions defined in rust-toolchain.toml?
See intellij-rust's guessAndSetupRustProject function. The toolchain settings is per-project and stored in toolchain in Project.rustSettings, so we could reuse this level of the project model hierarchy for LSP4IJ language servers.
Language Servers in LSP4IJ are singletons. We cannot start multiple rust-analyzer processes.
Show references (missing rust-analyzer.showReferences command)
Hide the line if not appropriate.
"Has implementations" sidebar icon and action (LSP4IJ has X implementations but not in sidebar)
#hard Inline jump to referenced symbol and "Jump to Source" button in Quick Documentation.
Might need to keep the buggy type inference code in intellij-rust if we could not fetch type information from the LSP server.
Rendered comments in reader mode and Markdown syntax highlighting in comments in main editor.
The latter might be solved by keeping the Psi parsing, we'll see.
Syntax highlighting (in quick doc Markdown code blocks)
Features to implement in LSP4IJ:
Code Inspection support (report errors in batch code inspection run, LSP4IJ issue 476)
Reliable and performant semantic highlighting (see LSP4IJ's issue tracker)
Features know to be sacrificed after transition to rust-analyzer:
Syntax highlighting and code completion in #[cfg]-disabled code.
This was a trade-off made in intellij-rust that could result in false positives of duplicate code. rust-analyzer chose otherwise.
Clickable types in function signature of Quick Documentation. (see also point 5 above, but this is about function signature and traits)
rust-analyzer bugs:
Quick Documentation issues with tokio's recv() and standard library's unwrap_or_else().
Link to referenced tokio type opens a 404 page in browser.
Link to other crate's symbol is not found and IntelliJ throws an error.
Link to symbols in the same crate is not parsed correctly, instead shows the weird [xxx].
Go to definition jumps to start of doc-comment, not the symbol itself.
Features to keep:
Cargo.toml
andCargo.lock
syntax support, which is not covered by rust-analyzer.rust-analyzer.runSingle
anddebugSingle
commands, so you have to be implement it in language plugins.//
at start of line.///
doc-comment).Features to integrate with LSP4IJ:
tests
andbenches
directories.rustup
(prompt for or automatically install rust-analyzer, and configure the LSP4IJ language server)rust-toolchain.toml
?guessAndSetupRustProject
function. The toolchain settings is per-project and stored intoolchain
inProject.rustSettings
, so we could reuse this level of the project model hierarchy for LSP4IJ language servers.rust-analyzer.showReferences
command)X implementations
but not in sidebar)Features to implement in LSP4IJ:
and LSP4IJ is not mature yet, see list of issues at https://github.com/redhat-developer/lsp4ij/issues.
Features know to be sacrificed after transition to
rust-analyzer
:#[cfg]
-disabled code.This was a trade-off made in intellij-rust that could result in false positives of duplicate code.
rust-analyzer
chose otherwise.rust-analyzer
bugs:recv()
and standard library'sunwrap_or_else()
.tokio
type opens a 404 page in browser.xxx
].@l2dy if you want to evaluate LSP4IJ with rust very quickly without developing an IJ plugin please read https://github.com/redhat-developer/lsp4ij/blob/main/docs%2Fuser-defined-ls%2Frust-analyzer.md
If you think the result is good, you should develop an IJ plugin to define lsp command and define the rust analyzer ls with lsp4ij extension point to embed the ls in the plugin. Please read https://github.com/redhat-developer/lsp4ij/blob/main/docs/DeveloperGuide.md
Originally posted by @angelozerr in #33 (comment)
The text was updated successfully, but these errors were encountered: