-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-analyzer won't work on this rustlings repo #12235
Comments
You need to set |
I get this error when I put that line in my settings.json
|
Never mind. You've started from an older version of |
I pulled from the Rustlings repo and fixed the conflicts and errors, but still rust-analyzer doesnt work. Not seeing any rust-analyszer errors. I'm already like 80% done with Rustlings so if it's just this repo I'll live without it.
|
@7-- Hi, maybe it's too late for it, but I had the same problem, |
I ran into this as well. I can confirm that running |
I got neovim and running |
For me |
You mean the truncation happened on the r-a side or the path in the json file was truncated? If the latter it would be nice to report that to the rustlings repo. Regarding the errors I am unsure, it might not work that well given the structure (I'm hoping to make rustlings work better with some design changes) |
I can confirm that the command still works if you have any problems regarding intellisense. |
Running |
I'm doing Rustlings excersises. If I clone this Rustlings repo rust-analyzer works fine. https://github.com/rust-lang/rustlings
I created my own repo for Rustlings so I can save my work. This repo won't work with rust-analyzer reguarless of commit number. I tried cloning a new copy then checking out a bunch of old commits in the repo (before any of my changes) and oddly no version works at all. https://github.com/7--/rustlings
See if you can get rust-analyzer to work on this repo even using an old version. This repo was working fine at one point. rust-analyzer is the only extension I have installed in VS code.
rust-analyzer version: 5d5bbec 2022-05-09 stable
Status:
Workspaces:
Loaded 75 packages across 1 workspace.
Analysis:
32mb of files
0b of index symbols (0)
1037 trees, 128 preserved
11163 trees, 128 preserved (Macros)
253mb in total
Rust Analyzer Client:
INFO [5/12/2022, 4:32:18 PM]: Extension version: 0.2.1048
INFO [5/12/2022, 4:32:18 PM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: false },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/': '${env:USERPROFILE}/.rustup/toolchains//lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
assist: {
exprFillDefault: 'todo',
importGranularity: 'crate',
importEnforceGranularity: false,
importPrefix: 'plain',
importGroup: true,
allowMergingIntoGlobImports: true
},
cache: { warmup: true },
callInfo: { full: true },
cargo: {
autoreload: true,
allFeatures: true,
unsetTest: [ 'core' ],
features: [],
runBuildScripts: true,
runBuildScriptsCommand: null,
useRustcWrapperForBuildScripts: true,
noDefaultFeatures: false,
target: null,
noSysroot: false
},
checkOnSave: {
enable: true,
allFeatures: null,
allTargets: true,
command: 'check',
noDefaultFeatures: null,
target: null,
extraArgs: [],
features: null,
overrideCommand: null
},
completion: {
addCallArgumentSnippets: true,
addCallParenthesis: true,
snippets: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an
Arc
',scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an
Rc
',scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned
Box
',scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a
Result::Ok
',scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a
Result::Err
',scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an
Option::Some
',scope: 'expr'
}
},
postfix: { enable: true },
autoimport: { enable: true },
autoself: { enable: true },
privateEditable: { enable: false }
},
diagnostics: {
enable: true,
enableExperimental: false,
disabled: [],
remapPrefix: {},
warningsAsHint: [],
warningsAsInfo: []
},
experimental: { procAttrMacros: true },
files: { watcher: 'client', excludeDirs: [] },
highlightRelated: {
references: true,
exitPoints: true,
breakPoints: true,
yieldPoints: true
},
highlighting: { strings: true },
hover: { documentation: true, linksInHover: true },
hoverActions: {
debug: true,
enable: true,
gotoTypeDef: true,
implementations: true,
references: false,
run: true
},
inlayHints: {
renderColons: true,
maxLength: 25,
parameterHints: true,
typeHints: true,
chainingHints: true,
closureReturnTypeHints: false,
reborrowHints: false,
lifetimeElisionHints: { enable: 'never', useParameterNames: false },
hideNamedConstructorHints: false
},
joinLines: {
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true,
joinAssignments: true
},
lens: {
debug: true,
enable: true,
implementations: true,
run: true,
methodReferences: false,
references: false,
enumVariantReferences: false,
forceCustomCommands: true
},
linkedProjects: [],
lruCapacity: null,
notifications: { cargoTomlNotFound: true },
primeCaches: { numThreads: 0 },
procMacro: { enable: true, server: null, ignored: {} },
runnables: { overrideCargo: null, cargoExtraArgs: [] },
rustcSource: null,
rustfmt: {
extraArgs: [],
overrideCommand: null,
enableRangeFormatting: false
},
workspace: {
symbol: { search: { scope: 'workspace', kind: 'only_types', limit: 128 } }
}
}
INFO [5/12/2022, 4:32:18 PM]: PersistentState: { serverVersion: '0.2.1048' }
INFO [5/12/2022, 4:32:19 PM]: Using server binary at /home/phil/.vscode/extensions/matklad.rust-analyzer-0.2.1048-linux-x64/server/rust-analyzer
INFO [5/12/2022, 4:32:22 PM]: Extension version: 0.2.1048
INFO [5/12/2022, 4:32:22 PM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: false },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/': '${env:USERPROFILE}/.rustup/toolchains//lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
assist: {
exprFillDefault: 'todo',
importGranularity: 'crate',
importEnforceGranularity: false,
importPrefix: 'plain',
importGroup: true,
allowMergingIntoGlobImports: true
},
cache: { warmup: true },
callInfo: { full: true },
cargo: {
autoreload: true,
allFeatures: true,
unsetTest: [ 'core' ],
features: [],
runBuildScripts: true,
runBuildScriptsCommand: null,
useRustcWrapperForBuildScripts: true,
noDefaultFeatures: false,
target: null,
noSysroot: false
},
checkOnSave: {
enable: true,
allFeatures: null,
allTargets: true,
command: 'check',
noDefaultFeatures: null,
target: null,
extraArgs: [],
features: null,
overrideCommand: null
},
completion: {
addCallArgumentSnippets: true,
addCallParenthesis: true,
snippets: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an
Arc
',scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an
Rc
',scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned
Box
',scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a
Result::Ok
',scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a
Result::Err
',scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an
Option::Some
',scope: 'expr'
}
},
postfix: { enable: true },
autoimport: { enable: true },
autoself: { enable: true },
privateEditable: { enable: false }
},
diagnostics: {
enable: true,
enableExperimental: false,
disabled: [],
remapPrefix: {},
warningsAsHint: [],
warningsAsInfo: []
},
experimental: { procAttrMacros: true },
files: { watcher: 'client', excludeDirs: [] },
highlightRelated: {
references: true,
exitPoints: true,
breakPoints: true,
yieldPoints: true
},
highlighting: { strings: true },
hover: { documentation: true, linksInHover: true },
hoverActions: {
debug: true,
enable: true,
gotoTypeDef: true,
implementations: true,
references: false,
run: true
},
inlayHints: {
renderColons: true,
maxLength: 25,
parameterHints: true,
typeHints: true,
chainingHints: true,
closureReturnTypeHints: false,
reborrowHints: false,
lifetimeElisionHints: { enable: 'never', useParameterNames: false },
hideNamedConstructorHints: false
},
joinLines: {
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true,
joinAssignments: true
},
lens: {
debug: true,
enable: true,
implementations: true,
run: true,
methodReferences: false,
references: false,
enumVariantReferences: false,
forceCustomCommands: true
},
linkedProjects: [],
lruCapacity: null,
notifications: { cargoTomlNotFound: true },
primeCaches: { numThreads: 0 },
procMacro: { enable: true, server: null, ignored: {} },
runnables: { overrideCargo: null, cargoExtraArgs: [] },
rustcSource: null,
rustfmt: {
extraArgs: [],
overrideCommand: null,
enableRangeFormatting: false
},
workspace: {
symbol: { search: { scope: 'workspace', kind: 'only_types', limit: 128 } }
}
}
The text was updated successfully, but these errors were encountered: