Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

by default do not pass a rust source #78

Open
lu-zero opened this issue Dec 27, 2016 · 2 comments
Open

by default do not pass a rust source #78

lu-zero opened this issue Dec 27, 2016 · 2 comments

Comments

@lu-zero
Copy link

lu-zero commented Dec 27, 2016

This way the racer default can be used.

It would make it work out of box on rustup setups.

@qzed
Copy link

qzed commented Dec 27, 2016

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.

@lu-zero
Copy link
Author

lu-zero commented Dec 27, 2016

#79 this is the current kludge that works well enough to me.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants