Closed alterae closed 2 years ago
Works here?
Can you provide the output of the LSP: Troubleshoot server
command?
Can you provide the output of the
LSP: Troubleshoot server
command?
## Server Configuration
- command
```json
[
"${storage_path}/LSP-rust-analyzer/rust-analyzer"
]
"/home/michelle/.cache/sublime-text/Package Storage/LSP-rust-analyzer/rust-analyzer"
source.rust
source.rust
{}
{
"rust-analyzer": {
"assist": {
"allowMergingIntoGlobImports": true,
"importEnforceGranularity": false,
"importGranularity": "crate",
"importGroup": true,
"importPrefix": "plain"
},
"callInfo": {
"full": true
},
"cargo": {
"allFeatures": false,
"autoreload": true,
"features": [],
"noDefaultFeatures": false,
"noSysroot": false,
"runBuildScripts": true,
"target": null,
"unsetTest": [
"core"
],
"useRustcWrapperForBuildScripts": true
},
"cargoRunner": null,
"checkOnSave": {
"allFeatures": null,
"allTargets": true,
"command": "clippy",
"enable": true,
"extraArgs": [],
"features": null,
"noDefaultFeatures": null,
"overrideCommand": null,
"target": null
},
"completion": {
"addCallArgumentSnippets": true,
"addCallParenthesis": true,
"autoimport": {
"enable": true
},
"autoself": {
"enable": true
},
"postfix": {
"enable": true
}
},
"debug": {
"engine": "auto",
"engineSettings": {},
"openDebugPane": false,
"sourceFileMap": {
"/rustc/<id>": "${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"
}
},
"diagnostics": {
"disabled": [],
"enable": true,
"enableExperimental": true,
"remapPrefix": {},
"warningsAsHint": [],
"warningsAsInfo": []
},
"experimental": {
"procAttrMacros": false
},
"files": {
"excludeDirs": [],
"watcher": "client"
},
"highlighting": {
"strings": true
},
"hover": {
"documentation": true,
"linksInHover": true
},
"hoverActions": {
"debug": true,
"enable": true,
"gotoTypeDef": true,
"implementations": true,
"linksInHover": true,
"references": false,
"run": true
},
"inlayHints": {
"chainingHints": true,
"enable": true,
"maxLength": 25,
"parameterHints": true,
"smallerHints": true,
"typeHints": true
},
"joinLines": {
"joinAssignments": true,
"joinElseIf": true,
"removeTrailingComma": true,
"unwrapTrivialBlock": true
},
"lens": {
"debug": true,
"enable": true,
"implementations": true,
"methodReferences": false,
"references": false,
"run": true
},
"linkedProjects": [],
"lruCapacity": null,
"notifications": {
"cargoTomlNotFound": true
},
"procMacro": {
"enable": true,
"server": null
},
"runnableEnv": null,
"runnables": {
"cargoExtraArgs": [],
"overrideCargo": null
},
"rustcSource": null,
"rustfmt": {
"enableRangeFormatting": false,
"extraArgs": [],
"overrideCommand": null
},
"terminusAutoClose": false,
"terminusUsePanel": true,
"workspace": {
"symbol": {
"search": {
"kind": "only_types",
"scope": "workspace"
}
}
}
}
}
{}
/home/michelle/code/rust/pong/src/game/ball.rs
{
"auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
"lsp_active": true,
"syntax": "Packages/Rust Enhanced/RustEnhanced.sublime-syntax"
}
source.rust
[
"/home/michelle/code/rust/pong"
]
{
"folders": [
{
"binary_file_patterns": [
"target/*"
],
"path": "."
}
]
}
{
"clients": {
"ccls": {
"auto_complete_selector": "punctuation.accessor | (meta.preprocessor.include string - punctuation.definition.string.end)",
"command": [
"ccls"
],
"selector": "source.c | source.c++ | source.objc | source.objc++"
},
"ocaml": {
"command": [
"ocamllsp"
],
"enabled": true,
"selector": "source.ocaml"
}
},
"diagnostics_highlight_style": {
"error": "underline",
"hint": "stippled",
"info": "stippled",
"warning": "underline"
},
"lsp_format_on_save": true,
"popup_max_characters_height": 25,
"popup_max_characters_width": 78,
"semantic_highlighting": true,
"show_code_lens": "phantom",
"show_diagnostics_panel_on_save": 0
}
I'm using built-in Rust syntax from Packages/Rust/Rust.sublime-syntax
. You are using Packages/Rust Enhanced/RustEnhanced.sublime-syntax
.
I guess you've disabled the built-in syntax so the mdpopups dependency used for highlighting the code blocks can't find it and defaults to plain text.
I guess one option is to re-enable the built-in syntax. You should still be able to use "RustEnhanced" for the files themselves.
Ah, yeah. Re-enabling the Rust package solved the issue. Thank you.
Currently, code in hover tooltips (such as the line that shows what module a given symbol is in, the symbol signature, and any code blocks in the documentation for a symbol) generated by this plugin lack any syntax highlighting. This somewhat impairs readability of these tooltips.
This does not seem to be a general issue with Sublime LSP, as LSP-Deno highlights code in tooltips just fine.
Screenshots
LSP-rust-analyzer tooltip, from a project of mine
LSP-Deno tooltip, for comparisson