edubkendo / atom-racer Goto Github PK
View Code? Open in Web Editor NEWIntelligent code completion for Rust in the Atom Editor. Requires Racer.
License: MIT License
Intelligent code completion for Rust in the Atom Editor. Requires Racer.
License: MIT License
From @VRcOd on December 8, 2015 12:48
[Enter steps to reproduce below:]
Atom Version: 1.2.4
System: Ubuntu 15.04
Thrown From: Atom Core
Atom racer is not properly configured.
At undefined
undefined
-7:21.9.0 application:add-project-folder (atom-text-editor.editor.is-focused)
3x -6:50.9.0 core:move-down (atom-text-editor.editor.is-focused)
-6:49.9.0 core:move-up (atom-text-editor.editor.is-focused)
3x -6:49.1.0 core:move-down (atom-text-editor.editor.is-focused)
-6:46.1.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
2x -6:45.5.0 editor:newline (atom-text-editor.editor.is-focused)
-6:45.1.0 core:move-up (atom-text-editor.editor.is-focused)
-6:44.8.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-6:44.8.0 snippets:expand (atom-text-editor.editor.is-focused)
-6:44.8.0 editor:indent (atom-text-editor.editor.is-focused)
-4:43.3.0 core:paste (atom-text-editor#racer.racerBinPath.editor.mini.is-focused)
12x -1:31.3.0 core:backspace (atom-text-editor#racer.racerBinPath.editor.mini.is-focused)
{}
# User
language-rust, v0.4.5
linter-rust, v0.2.11
racer, v0.17.2
# Dev
No dev packages
Copied from original issue: atom/atom#9980
I ran into the same problem as described in this issue #48. I have all pereferences configured right (racerBinPath=C:\Users\Zhukovskiy.cargo\bin\racer.exe, rustSrcPath=C:\Users\Zhukovskiy\Documents\rustc-beta but I get "keyword autocomplete" only from 'language-rust' plugin. I cannot figure out what's going on. I use v1.5beta right now.
Output
EACCES, unlink '/home/me/.atom/packages/racer/.npmignore'
Permissions
me-desktop packages # ls -al /home/me/.atom/packages/racer
total 136
drwxr-xr-x 5 root root 4096 Mar 23 18:32 .
drwxr-xr-x 13 me me 4096 Apr 22 17:48 ..
-rw-r--r-- 1 root root 1708 Mar 23 18:32 CHANGELOG.md
drwxr-xr-x 2 root root 4096 Mar 23 18:32 lib
-rw-r--r-- 1 root root 1073 Mar 23 18:32 LICENSE.md
drwxr-xr-x 4 root root 4096 Mar 23 18:32 node_modules
-rw-r--r-- 1 root root 37 Mar 23 18:32 .npmignore
-rw-r--r-- 1 root root 4834 Mar 23 18:32 package.json
-rw-r--r-- 1 root root 86315 Mar 23 18:32 racer.gif
-rw-r--r-- 1 root root 1005 Mar 23 18:32 README.md
drwxr-xr-x 2 root root 4096 Mar 23 18:32 spec
-rw-r--r-- 1 root root 200 Mar 23 18:32 .travis.yml
me-desktop packages #
sudo chown -R
whoami /home/me/.atom/packages/racer/
had no output but did not change permissions.
If I try to complete something like Mutex::new
, I get Mutex::new(${1:t: T})
inserted in the editor. This is with atom-racer 0.18.0 and racer 1.2.6.
Looks like this might actually be a problem with a dependency, runas
.
> [email protected] install /private/var/folders/tn/qtn_4h693933whtf14410v240000gn/T/apm-install-dir-114717-20025-k92350/node_modules/racer/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild
CXX(target) Release/obj.target/runas/src/main.o
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/fuzzaldrin
npm http GET https://registry.npmjs.org/tmp
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/pathwatcher
npm http 304 https://registry.npmjs.org/fs-plus
npm http 304 https://registry.npmjs.org/fuzzaldrin
npm http 304 https://registry.npmjs.org/underscore-plus
npm http 304 https://registry.npmjs.org/tmp
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan/0.8.0
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/runas
npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/emissary
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/nan/0.8.0
npm http 304 https://registry.npmjs.org/runas
In file included from ../src/main.cc:1:
../../nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../../nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
v8::ThrowException(error);
~~~~^
../../nan/nan.h:355:65: error: no member named 'New' in 'v8::String'
v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
~~~~~~~~~~~~^
../../nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~^
../../nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../../nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../../nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:727:49: error: too few arguments to function call, single argument 'isolate' was not specified
v8::Local<v8::Object> obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/colin/.atom/.node-gyp/.node-gyp/0.11.13/deps/v8/include/v8.h:2372:3: note: 'New' declared here
static Local<Object> New(Isolate* isolate);
^
In file included from ../src/main.cc:1:
../../nan/nan.h:733:49: error: too few arguments to function call, single argument 'isolate' was not specified
v8::Local<v8::Object> obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/colin/.atom/.node-gyp/.node-gyp/0.11.13/deps/v8/include/v8.h:2372:3: note: 'New' declared here
static Local<Object> New(Isolate* isolate);
^
In file included from ../src/main.cc:1:
../../nan/nan.h:740:12: error: no member named 'Dispose' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
handle.Dispose();
~~~~~~ ^
../../nan/nan.h:741:12: error: no member named 'Clear' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
handle.Clear();
~~~~~~ ^
../../nan/nan.h:746:39: error: no member named 'NewSymbol' in 'v8::String'; did you mean 'IsSymbol'?
NanPersistentToLocal(handle)->Set(NanSymbol("callback"), fn);
^~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:181:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
~~~~~~~~~~~~^
/Users/colin/.atom/.node-gyp/.node-gyp/0.11.13/deps/v8/include/v8.h:1356:8: note: 'IsSymbol' declared here
bool IsSymbol() const;
^
In file included from ../src/main.cc:1:
../../nan/nan.h:746:39: error: call to non-static member function without an object argument
NanPersistentToLocal(handle)->Set(NanSymbol("callback"), fn);
^~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:181:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
~~~~~~~~~~~~^~~~~~~~~
../../nan/nan.h:750:46: error: no member named 'NewSymbol' in 'v8::String'; did you mean 'IsSymbol'?
return NanPersistentToLocal(handle)->Get(NanSymbol("callback"))
^~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:181:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
~~~~~~~~~~~~^
/Users/colin/.atom/.node-gyp/.node-gyp/0.11.13/deps/v8/include/v8.h:1356:8: note: 'IsSymbol' declared here
bool IsSymbol() const;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/runas/src/main.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/tn/qtn_4h693933whtf14410v240000gn/T/apm-install-dir-114717-20025-k92350/node_modules/racer/node_modules/pathwatcher/node_modules/runas
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/property-accessors
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/mixto
npm http 304 https://registry.npmjs.org/property-accessors
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls runas
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/.apmrc" "--userconfig" "/Users/colin/.atom/.apmrc" "install" "/Users/colin/.atom/.node-gyp/.atom/.apm/racer/0.2.2/package.tgz" "--target=0.11.13" "--arch=x64"
npm ERR! cwd /private/var/folders/tn/qtn_4h693933whtf14410v240000gn/T/apm-install-dir-114717-20025-k92350
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/var/folders/tn/qtn_4h693933whtf14410v240000gn/T/apm-install-dir-114717-20025-k92350/npm-debug.log
npm ERR! not ok code 0
Not sure Racer allows that, but it would be pretty cool to have suggestions pop up even if the typed case was wrong (std::char::tolo
and std::char::ToLo
should both lead to std::char::ToLowerCase
).
Hi, think I have everything set up correctly, but I can't get anything to autocomplete.
Racer works fine from the CLI, I've set the paths up in the config, and I have language-rust installed. Not sure where I'm going wrong.
Config:
racer:
racerBinPath: "/usr/bin/racer"
rustSrcPath: "/usr/src/rust/src/"
Some racer output:
/usr/bin/racer complete std::io::Br
MATCH Broadcast,628,11,/usr/src/rust/src/libstd/io/mod.rs,Struct,pub struct Broadcast<T, U> {
MATCH Broadcast,628,11,./libstd/io/mod.rs,Struct,pub struct Broadcast<T, U> {
Source dir;
ls -l
total 232
-rw-r--r-- 1 tom tom 37519 May 13 21:03 AUTHORS.txt
-rwxr--r-- 1 tom tom 40449 May 13 21:03 configure*
-rw-r--r-- 1 tom tom 6100 May 13 21:03 CONTRIBUTING.md
-rw-r--r-- 1 tom tom 16809 May 13 21:03 COPYRIGHT
-rw-r--r-- 1 tom tom 10847 May 13 21:03 LICENSE-APACHE
-rw-r--r-- 1 tom tom 1071 May 13 21:03 LICENSE-MIT
-rw-r--r-- 1 tom tom 10059 May 13 21:03 Makefile.in
drwxr-xr-x 1 tom tom 32 May 13 21:03 man/
drwxr-xr-x 1 tom tom 380 May 14 07:25 mk/
-rw-r--r-- 1 tom tom 4355 May 13 21:03 README.md
-rw-r--r-- 1 tom tom 86070 May 13 21:03 RELEASES.md
drwxr-xr-x 1 tom tom 920 May 14 07:25 src/
I keep getting "Racer returned a non-zero exit status: 1" messages. Obviously, the problem is my Racer install, not this plugin, but Racer works fine from the command line. Since this message doesn't display the message Racer failed with, it's difficult to figure out what's going on. Is there a way to get Racer failure messages out of the plugin?
Default key is F3. But it's not work on my Atom. When I add
'atom-text-editor':
'f1': 'racer:find-definition'
to my keymap.cson file. The "find-definition" function can work well by F1 key. I think F3 is good key for "find-definition". Because the Eclipse also use this key. So how can I use F3 for "find-definition" on my Atom.
Use ::getPaths instead
Project.getPath (C:\Users\Jerom\AppData\Local\atom\app-0.190.0\resources\app\src\project.js:585:12)
RacerClient.process_env_vars (C:\Users\Jerom\.atom\packages\racer\lib\racer-client.coffee:48:50)
[Enter steps to reproduce below:]
i installed the racer package (racer-git from AUR)
I have the rust-nightly-bin package, which I don't believe includes a copy of the src so I cloned rust-lang and pointed racer to the src directory from the rust-lang repo
Can't seem to get the autocomplete to work.
Atom Version: 0.177.0
System: linux 3.18.5-1-ARCH
Thrown From: racer package, v0.9.1
Uncaught Error: spawn ENOTDIR
At child_process.js:1160
Error: spawn ENOTDIR
at exports._errnoException (util.js:753:11)
at ChildProcess.spawn (child_process.js:1160:11)
at Object.exports.spawn (child_process.js:993:9)
at new BufferedProcess (/usr/share/atom/resources/app/src/buffered-process.js:51:37)
at /home/leshow/.atom/packages/racer/lib/racer-client.coffee:41:21
at /home/leshow/.atom/packages/racer/node_modules/temp/lib/temp.js:252:7
at FSReqWrap.oncomplete (fs.js:100:15)
-4:15.0 core:select-down (atom-text-editor.editor.is-focused)
2x -4:14.6 core:backspace (atom-text-editor.editor.is-focused)
-4:11.7 core:cut (atom-text-editor.editor.is-focused)
-4:10.2 core:save (atom-text-editor.editor.is-focused)
3x -1:50.9 core:backspace (atom-text-editor.editor.mini)
-0:01.2 editor:newline (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"seti-ui",
"base16-tomorrow-dark-theme"
],
"autoHideMenuBar": true
},
"racer": {
"racerBinPath": "/usr/bin/racer/",
"rustSrcPath": "/home/leshow/Development/rust/rust/src/"
}
}
# User
angularjs, v0.1.0
autocomplete-haskell, v0.2.0
autocomplete-plus, v2.1.3
color-picker, v1.4.4
highlight-line, v0.9.3
language-haskell, v1.0.0
language-rust, v0.3.5
linter-rust, v0.0.3
minimap, v4.1.2
racer, v0.9.1
remember-session, v0.5.1
seti-ui, v0.6.3
# Dev
No dev packages
/cc @atom/core
atom.services is no longer available. To register service providers and
consumers, use the providedServices
and consumedServices
fields in
your package's package.json.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:64:11)
Object.activate (/Users/stefan/.atom/packages/racer/lib/racer.coffee:20:25)
This might not be something that you can take care of on your end, but it seems that Racer is rapidly creating/deleting a temp file in the working directory when doing autocomplete.
This results in the file browser pane in atom flickering (as the temp file rapidly appears and disappears) every time I type.
Here is a pic showing the temp file in the file browser http://i.imgur.com/3v6rV7v.png
@alkama I don't know if you are watching this thread but especially since you mentioned a synchronous re-write, I thought I'd point you at it. I also thought you might have some insights to offer in that thread.
Hi..I install the packages using the package manager, but I open the console and get this
Failed to activate package named 'racer' RangeError: Maximum call stack size exceeded
/opt/atom/resources/app/src/package.js:168
Uncaught RangeError: Maximum call stack size exceeded /opt/atom/resources/app/node_modules/underscore-plus/node_modules/underscore/underscore.js:1021
3
Uncaught RangeError: Maximum call stack size exceeded /opt/atom/resources/app/node_modules/underscore-plus/node_modules/underscore/underscore.js:1021
Failed to activate package named 'racer' RangeError: Maximum call stack size exceeded
/opt/atom/resources/app/src/package.js:168
the problem seems this method in underscore
_.isObject = function(obj) {
return obj === Object(obj);
I don't know if this can help...
I needed remove the package using apm because this affect all my others packages and made the editor very inestable...
the stacktracer is pretty long and I cant found where start inside the racer package, please let me know if you can solve
using rustup
installed racer with cargo install racer
apm install language-rust linter-rust racer
I added my rust src path and the path to cargo in the racer settings.
path to racer executable: /home/leshow/.cargo/bin/racer
path to rust source code directory: /home/leshow/Development/rust/rust/src/
when I start to type
use std::io::B
nothing happens, a hidden file seems to flash in the file tree to the left but I get no completions. If i mess up the rust src path then I get error outputs, but with everything configured correctly I get nothing.
however it works from the cli
> racer complete std::io::B
MATCH BufReader,48,11,/home/leshow/Development/rust/rust/src/libstd/io/buffered.rs,Struct,pub struct BufReader<R>
MATCH BufWriter,300,11,/home/leshow/Development/rust/rust/src/libstd/io/buffered.rs,Struct,pub struct BufWriter<W: Write>
MATCH BufRead,1199,10,/home/leshow/Development/rust/rust/src/libstd/io/mod.rs,Trait,pub trait BufRead: Read
MATCH Bytes,1544,11,/home/leshow/Development/rust/rust/src/libstd/io/mod.rs,Struct,pub struct Bytes<R>
atom-racer is working great for completions from std and the current file in a project but it does not show completions from external crates and other files in the current project. I was under the impression that racer supported external crates, reading dependencies from Cargo.toml files, and detecting the .cargo folder. Should these features work in atom-racer? Am I doing something wrong?
[Enter steps to reproduce below:]
Atom Version: 1.2.4
System: Ubuntu 15.04
Thrown From: Atom Core
racer.rustSrcPath is not set in your config.
At undefined
undefined
-2:03.9.0 core:move-right (atom-text-editor.editor.is-focused)
4x -2:03.4.0 core:move-left (atom-text-editor.editor.is-focused)
3x -1:59.7.0 core:move-right (atom-text-editor.editor.is-focused)
3x -1:46.1.0 core:move-down (atom-text-editor.editor.is-focused)
3x -1:44.2.0 core:backspace (atom-text-editor.editor.is-focused)
-0:05.9.0 core:paste (atom-text-editor.editor.is-focused)
-0:04.3.0 core:undo (atom-text-editor.editor.is-focused)
-0:01.6.0 core:backspace (atom-text-editor.editor.is-focused)
{
"core": {},
"editor": {
"invisibles": {},
"scrollPastEnd": true
}
}
# User
language-rust, v0.4.5
linter-rust, v0.2.11
racer, v0.17.2
# Dev
No dev packages
Hi
How can I add multiple sources? For example if I want to have code completion on my own crates?
Hi, I am on arch linux, running latest version of atom from git. I installed necessary plugins and code completions works perfectly. But not code navigation. "Go to definition" does nothing.
Please provide suggestions to debug the issue.
seems to not return anything. I just built rust off of master set the RUST_SRC_PATH to it, and
./target/release/racer complete std::io::option returns nothing
Since the dawn of time Unix supported searching for binary in $PATH
. Please just use racer
as the default value for the utility instead of /usr/local/bin/racer
which is still worse than the standard /usr/bin/racer
.
Also maybe also use /usr/src/rust/src
? Any official package, when provided by a Linux distro, would use this path anyway.
Thanks!
/usr/share/atom/resources/app.asar/src/buffered-process.js:260
Error: spawn EACCES
at exports._errnoException (util.js:734:11)
at ChildProcess.spawn (child_process.js:1145:11)
at Object.exports.spawn (child_process.js:977:9)
at BufferedProcess.module.exports.BufferedProcess.spawn (/usr/share/atom/resources/app.asar/src/buffered-process.js:188:44)
at new BufferedProcess (/usr/share/atom/resources/app.asar/src/buffered-process.js:52:14)
at /home/thers/.atom/packages/racer/lib/racer-client.coffee:41:23
at /usr/share/atom/resources/app.asar/node_modules/temp/lib/temp.js:252:7
at FSReqWrap.oncomplete (fs.js:77:15)
Config:
racer:
racerBinPath: "/home/thers/.local/share/racer/target/release"
rustSrcPath: "/usr/local/src/rust/src"
Recently the auto completion of atom-racer is totally broken. The plugin simply stopped working, and also does not provide any error message.
Sorry for reporting. The bug was caused by a broken file system. I discovered it just a minute after reporting the bug.
I get the following message when using atom-racer on Centos/RHEL 7
racer returned a non-zero exit code: 1 /home/darius/Projects/Software/racer/target/release/racer: /lib64/libc.so.6: version 'GLIBC_2.18' not found (required by /home/darius/Projects/Software/racer/target/release/racer)
I do know EL7 has glibc 2.17 but when using Emacs with racer, I do not get an error when using it as well as via terminal which makes me believe something is going on with atom-racer. I could be wrong but I only get this with atom, and nothing else.
Path to the Racer executable is /home/amos/custom/racer/target/release/racer
. It looks right to me:
➜ rust git:(master) which racer
/home/amos/custom/racer/target/release/racer
Path to the Rust source code directory is /home/amos/custom/rust
. Also looks right to me:
➜ rust git:(master) pwd
/home/amos/custom/rust
➜ rust git:(master) ls
AUTHORS.txt COPYRIGHT LICENSE-MIT README.md
config.mk dist Makefile RELEASES.md
config.stamp dl Makefile.in src
configure doc man tmp
CONTRIBUTING.md LICENSE-APACHE mk x86_64-unknown-linux-gnu
language-rust
is installed.
Do you recognize this error message, or is it a bug with racer? If so, how can I get more information so I can file it with the racer folks?
I installed the package, and according to the installation guidelines, I should now go to Packages, look for Racer and click Settings. Racer doesn't have a settings button. Some other packages do, some don't. Racer for sure doesn't.
I noticed that racer only suggest the standard lib's functions. How can I know the functions of third-party lib by using racer instead of referring it's documentation
This comes twice in the developer console on Atom 0.165.0 with Autocomplete-Plus 1.0.0 (which moved to http://www.github.com/atom-community/autocomplete-plus) and Atom-Racer 0.7.1 installed; I even uninstalled all other packages that could somehow interfere, but no luck :-(
Any ideas? Thanks!
Failed to activate package named 'racer' Error: Failed to execute 'registerElement' on 'Document': Registration failed for type 'select-list'. A type with that name is already registered.
at Error (native)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/node_modules/autocomplete-plus/lib/select-list-element.coffee:157:47)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/node_modules/autocomplete-plus/lib/select-list-element.coffee:1:1)
at Module._compile (module.js:468:26)
at Object.requireCoffeeScript [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/coffee-cache.js:61:19)
at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:318:12)
at Module.require (module.js:373:17)
at require (module.js:392:17)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/node_modules/autocomplete-plus/lib/main.coffee:3:21)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/node_modules/autocomplete-plus/lib/main.coffee:1:1)
at Module._compile (module.js:468:26)
at Object.requireCoffeeScript [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/coffee-cache.js:61:19)
at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:318:12)
at Module.require (module.js:373:17)
at require (module.js:392:17)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/lib/racer-provider.coffee:1:26)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/lib/racer-provider.coffee:1:1)
at Module._compile (module.js:468:26)
at Object.requireCoffeeScript [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/coffee-cache.js:61:19)
at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:318:12)
at Module.require (module.js:373:17)
at require (module.js:392:17)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/lib/racer.coffee:1:17)
at Object.<anonymous> (/Users/dominik/.atom/packages/racer/lib/racer.coffee:1:1)
at Module._compile (module.js:468:26)
at Object.requireCoffeeScript [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/coffee-cache.js:61:19)
at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:318:12)
at Module.require (module.js:373:17)
at require (module.js:392:17)
at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/src/package.js:599:34)
at Package.module.exports.Package.activateConfig (/Applications/Atom.app/Contents/Resources/app/src/package.js:242:12)
at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:224:14)
at /Applications/Atom.app/Contents/Resources/app/src/package.js:213:28
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:159:15)
at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:207:14)
at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:410:21)
at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:396:33
at Config.module.exports.Config.transact (/Applications/Atom.app/Contents/Resources/app/src/config.js:283:16)
at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:390:19)
at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:379:19)
at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:605:21)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:12:8)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:23:4)
at Module._compile (module.js:468:26)
at Object.Module._extensions..js (module.js:486:10)
at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:318:12)
at Module.require (module.js:373:17)
at require (module.js:392:17)
at window.onload (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:59:25)
´´´
Because I use a similar Rust Sublime-plugin I've tried to use this one to see if I could replace Sublime completely with Atom 😄
My Racer is installed under c:\bin\racer\racer.exe and the Rust sources are located under a separate disk: d:\src\rust\rust-master\src
Also I've executed "apm install racer" directly after the plugin installation.
However, neither the code completion nor F3 seem to be working at all.
There are no other active plugins because I wanted to use Atom for Rust only.
Not sure what the issue is, but no completion behaviour is observed on my machine. I'm running the latest build of Atom on a Ubuntu 14.04 machine. I'm reasonably sure that things are correctly set up.
Racer now has a daemon mode which, as of 1.1.0, has some progress towards caching syntax completion information. It is started with the daemon
command and receives the usual commands through stdin.
[Enter steps to reproduce below:]
Atom Version: 0.187.0
System: linux 3.13.0-37-generic
Thrown From: racer package, v0.9.1
Uncaught Error: spawn EACCES
At child_process.js:1160
Error: spawn EACCES
at exports._errnoException (util.js:753:11)
at ChildProcess.spawn (child_process.js:1160:11)
at Object.exports.spawn (child_process.js:993:9)
at new BufferedProcess (/usr/share/atom/resources/app/src/buffered-process.js:51:37)
at /home/andrew/.atom/packages/racer/lib/racer-client.coffee:41:21
at /usr/share/atom/resources/app/node_modules/temp/lib/temp.js:252:7
at FSReqWrap.oncomplete (fs.js:100:15)
{
"core": {
"themes": [
"atom-dark-ui",
"base16-tomorrow-dark-theme"
]
},
"racer": {
"racerBinPath": "/home/andrew/.atom/packages/racer",
"rustSrcPath": "/usr/local/share/doc/rust/html/src/core"
}
}
# User
autocomplete-plus, v2.6.0
color-picker, v1.5.0
language-rust, v0.4.2
linter, v0.12.0
linter-jshint, v0.1.0
linter-rust, v0.0.7
minimap, v4.6.0
racer, v0.9.1
# Dev
No dev packages
racer.racerBinPath is not set in your config.
At undefined
undefined
-3:56.4.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
-0:31.5.0 core:save (atom-text-editor.editor.is-focused)
-0:29.7.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-0:29.7.0 snippets:expand (atom-text-editor.editor.is-focused)
-0:29.7.0 editor:indent (atom-text-editor.editor.is-focused)
-0:27.1.0 core:save (atom-text-editor.editor.is-focused)
-0:22.2.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
{
"core": {},
"editor": {
"invisibles": {}
}
}
# User
language-cmake, v0.1.4
language-rust, v0.4.5
racer, v0.17.2
# Dev
No dev packages
@edubkendo thanks for your work in integrating racer in Atom. I am using atom-racer for completion but I am relying on ctags to and the Atom symbols-view package in order to go to the definition of a given rust function/type. My hunch is that racer has a better Rust parser and it is also providing a find-definition. Here is the vim integration
https://github.com/phildawes/racer/blob/master/editors/racer.vim#L99
Would it make sense to integrate find-definition directly into atom-racer? If so what are next steps I could help with? I have written node code but I have no experience with Atom.
I'm not entirely sure what this type of completion is called, however it doesn't seem to be working (does racer even support it?).
Here's the code I'm using:
fn main() {
let a: [i32, 3] = [1, 2, 3];
println!("Length: {}", a.len());
}
If I delete .len()
from the println!
and type a dot, I'd expect the completion to list all of the methods I can call on the array, however nothing happens.
I can confirm the package is working to some extent, as completion for things like std::[anything]
works.
Here are the versions of rustc
, cargo
and racer
I am running:
rustc 1.8.0-beta.2 (2879d940a 2016-03-22)
cargo 0.9.0-nightly (8fc3fd8 2016-02-29)
racer 1.2.6
racer:
racerBinPath: "/Users/jack/.cargo/bin/racer"
rustSrcPath: "/Users/jack/.rust/src/beta/src"
There's no errors in the developer console or anywhere else I can find.
While typing code, after the last ;
(semicolon) a new completion shows up (first entry Trait AsMut
), which is undesired.
Atom: v1.12.0-dev-44c0fe5
// e.g.
let mut t = String::new();
A new feature idea :-)
This way the racer default can be used.
It would make it work out of box on rustup
setups.
We use temporary files to communicate with racer and need to place them along with your source files.
We shaped them as .racertmpXXXXX because the .* files are ignored by default by Atom.
As I understand, atom-tracer
writes a file every time it requests a completion, then deletes it. Doesn't this constant writing/deleting has significant inpact on SSD health?
find-definiton works fine in my projects even on std-library use std::collections::HashMap;
- it jumps directly into my rust-source at /usr/local/src/rust/src/. However this is readonly - and I would like to keep it that way.
If I want to explore rust-source by use of find-definition
it does not work unless I make it writable for my current user.
I understand that racer needs to have some temporary files. But shouldn't it be possible to explore read-only repositories? I think racer could use a standard-temporary directory like /var or /tmp in that case (or even in general).
What do you think?
After several attempts, I couldnt get atom-racer working with atom. I reinstalled it, relocated racer and rust source but there is no completion, nor any sign of it being operational. Any clue as to why?
[Enter steps to reproduce below:]
Atom Version: 0.207.0
System: Mac OS X 10.10.3
Thrown From: racer package, v0.11.0
Uncaught Error: spawn ELOOP
At /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:260
Error: spawn ELOOP
at exports._errnoException (util.js:734:11)
at ChildProcess.spawn (child_process.js:1145:11)
at Object.exports.spawn (child_process.js:977:9)
at BufferedProcess.module.exports.BufferedProcess.spawn (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:188:44)
at new BufferedProcess (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:52:14)
at /Users/umurgedik/.atom/packages/racer/lib/racer-client.coffee:41:23
at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/temp/lib/temp.js:252:7
at FSReqWrap.oncomplete (fs.js:77:15)
{
"core": {
"themes": [
"one-light-ui",
"one-light-syntax"
],
"disabledPackages": [
"emmet",
"autocomplete-haxe"
]
},
"racer": {
"rustSrcPath": "/Users/umurgedik/Applications/rust/src"
}
}
# User
.bin, vundefined
atom-alignment, v0.12.1
atom-typescript, v4.5.7
autocomplete-paths, v1.0.2
build, v0.36.1
docblockr, v0.7.2
file-icons, v1.5.7
haxe, v0.6.1
language-haxe, v0.3.0
language-rust, v0.4.3
linter, v0.12.6
linter-rust, v0.1.0
racer, v0.11.0
# Dev
No dev packages
Would it be possible to add support to search through the project's symbols (e.g. function/struct definitions) using the fuzzy finder? You can already jump to a definition of a symbol by placing the cursor on it and pressing the jump to symbol shortcut key, but it would be very handy to be able to just type the name of the struct/function/whatever you want to jump to and go there. This is a common feature in IDEs.
About my environment:
However, when I use find-definition, there are two different behaviors. Note that I'm using the command palette to launch the Racer: Find Definition
command.
._main.rs.racertmp
, followed by a bunch of numbers, and the file I'm currently working in is named main.rs. It disappears very quickly.Hmm, I was wondering why everything appeared to work from the command line but not in Atom. I was also wondering why I remember it working before whatever I was doing now. Apparently, I had copied the binary, not a symlink in this newer installation I've done.
Anyway, a symlink at /usr/local/bin/racer
that points to wherever the racer
binary may be placed after compilation doesn't appear to work. My coffeescript skills are non-existent but I bet it has something to do with this.
Received this error on Windows 7 x64. "racer complete std::" in cmd works fine, though.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.