atom-racer
atom-racer copied to clipboard
by default do not pass a rust source
This way the racer default can be used.
It would make it work out of box on rustup
setups.
This would definitely be an improvement. A temporary workaround to automatically detect the rustup
source component would be to add something like this to the init script:
do setRustSrcPath = () ->
exec = require('child_process').exec
exec 'rustc --print sysroot', (error, stdout, stderr) ->
if error
atom.notifications.addFatalError 'failed to determine rust source path: ' + stderr
path = stdout.trim() + '/lib/rustlib/src/rust/src'
atom.config.set 'racer.rustSrcPath', path
I'm not sure if this is a 100% correct (and good idea due to the asynchronous execution) though.
https://github.com/edubkendo/atom-racer/pull/79 this is the current kludge that works well enough to me.