rust-lang / atom-ide-rust Goto Github PK
View Code? Open in Web Editor NEWRust IDE support for Atom, powered by the Rust Analyzer or Rust Language Server
License: MIT License
Rust IDE support for Atom, powered by the Rust Analyzer or Rust Language Server
License: MIT License
atom-languageclient sends null as params for this notification which crashes latest rls (after languageserver-types = "0.27"
update).
FIxed by atom/atom-languageclient#171 + release
I'm using Atom with ide-rust
plugin on ArchLinux with rust
installed through the system package manager, pacman
. Everytime I create or open a .rs
-file in Atom I see a popup asking me to install the nightly toolchain with rustup
. However, I am not going to use rustup
because pacman
can do just fine and I dislike having a thousand different package managers installed on my system. Especially since rust already brings its own package manager, cargo
.
However, some features such as code completion are not available. I guess this is due to ide-rust
not knowing where to find the sources of rust, which can be found at /usr/lib/rustlib/src/rust/src/
. How can I tell ide-rust
where to find those sources without using rustup
?
Most other rust packages for atom conflict in some way with ide-rust either by being themselves language server clients, or otherwise providing a subset of rls functionality.
Generating a warning when ide-rust and one of these conflicting packages are activated, with buttons to disable either ide-rust or the other, should help steer people away from unintended behaviour & bugs.
The diagnostics don't work when there is llvm-sys
as dependency.
Cargo failed to install a dependency and atom-ide-rust did not show me any error.
My Cargo.toml
:
[package]
name = "llvmtest"
version = "0.1.0"
authors = ["Bruno Corrêa Zimmermann <[email protected]>"]
[dependencies]
rustc-serialize = "0.3"
llvm-sys = "*"
My Cargo.lock
:
[[package]]
name = "aho-corasick"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gcc"
version = "0.3.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "llvm-sys"
version = "50.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "llvmtest"
version = "0.1.0"
dependencies = [
"llvm-sys 50.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "memchr"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "regex"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "regex-syntax"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rustc-serialize"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "semver"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "semver-parser"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "thread_local"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unreachable"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4"
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
"checksum libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1e5d97d6708edaa407429faa671b942dc0f2727222fb6b6539bf1db936e4b121"
"checksum llvm-sys 50.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e988d82cf3f66de901b7ea6cca10234f375b2338cd7f40e86e6c97ccd639bc0"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "744554e01ccbd98fff8c457c3b092cd67af62a555a43bfe97ae8a0451f7799fa"
"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963"
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
My src/lib.rs
:
pub should throw some error
My rustup show
command:
Default host: x86_64-unknown-linux-gnu
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-2017-11-01-x86_64-unknown-linux-gnu
nightly-2018-01-21-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.25.0-nightly (ae920dcc9 2018-01-22)
My rustup component list
shows:
cargo-x86_64-unknown-linux-gnu (default)
rust-analysis-x86_64-unknown-linux-gnu (installed)
rust-docs-x86_64-unknown-linux-gnu (default)
rust-src (installed)
rust-std-aarch64-apple-ios
rust-std-aarch64-linux-android
rust-std-aarch64-unknown-cloudabi
....
atom-ide-rust version: 0.11.0
Rls Toolchain version in package configuration: nightly-2018-01-21
Here's an animation of me autocompleting a method that's required by a trait:
We display the type signature when previewing the completion, but we don't include the full signature when actually inserting the text of the completion... we just insert the method name. In this situation, it seems like it would be the most useful to include the full signature since the interface of the method I am implementing is defined by the trait.
I'm not sure if there's enough data in the protocol to decide whether or not we're completing a method definition or a method call and act appropriately. @damieng, any insight on that?
Looks like rust-lang/cargo#4788 changed the way workspace crates are handled. Should atom-ide-rust
take any action?
Trying to type or moving the cursor in a .rs file spams this error.
Atom: 1.24.0 x64
Electron: 1.6.16
OS: "Arch Linux"
Thrown From: ide-rust package 0.14.0
Uncaught Error: Header must provide a Content-Length property.
At /home/moult/.atom/packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:200
Error: Header must provide a Content-Length property.
at StreamMessageReader.onData (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:200:27)
at /packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:185:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:551:20)
# rustup show
Default host: x86_64-unknown-linux-gnu
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-2018-03-01-x86_64-unknown-linux-gnu (default)
active toolchain
----------------
nightly-2018-03-01-x86_64-unknown-linux-gnu (default)
rustc 1.26.0-nightly (0ff9872b2 2018-02-28)
atom-ide-ui 0.9.2
autocomplete-haskell 1.0.1
autocomplete-python 1.10.5
build 0.70.0
build-cargo 2.0.0
busy 0.7.0
busy-signal 1.4.3
haskell-ghc-mod 2.2.3
ide-haskell 2.3.0
ide-haskell-cabal 2.1.2
ide-rust 0.14.0
intentions 1.1.5
language-docker 1.1.8
language-haskell 1.17.3
language-latex 1.1.1
language-rust 0.4.12
latex 0.49.0
latex-completions 0.3.3
linter 2.2.0
linter-spell 0.15.0
linter-spell-latex 0.11.0
linter-ui-default 1.6.10
pdf-view 0.65.0
pretty-json 1.6.4
racer 0.20.0
Rls needs a root or parent Cargo.toml to work with multiple crates.
Rls sends down an error describing the issue now which is better than it was (#49, #57) but is still a bit of a messy error the first time you see it (#68).
Can we do better?
Note: Detecting that the error has happened is a bit of a pain, until maybe rust-lang/rls#723 is implemented.
It seems that methods, which have been implemented from a trait, are not available in auto completion. For example the to_string()
method on &str
is not available.
Is this a known issue, or a mistake in my setup?
I realize this might be difficult to debug given its nature - let me know if anyone has any ideas / where I should direct my efforts.
I'm getting a recurring error in Atom. It's particularly odd because Atom blames ide-rust and gives a link to an ide-rust file which doesn't exist because I've uninstalled ide-rust (initially to attempt to silence the error. I believe I'm getting it concurrent with Atom calling ide-python.
To confirm re the package being uninstalled, when I copy and paste the path that Atom references, it's not there:
cd /Users/maximilian/.atom/packages/ide-rust 1753ms Tue Jan 16 13:45:52 2018
cd: The directory '/Users/maximilian/.atom/packages/ide-rust' does not exist
Atom: 1.23.3 x64
Electron: 1.6.15
OS: Mac OS X 10.13.2
Thrown From: 'ide-rust' package vundefined
Uncaught Error: Header must provide a Content-Length property.
At /Users/maximilian/.atom/packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:200
Error: Header must provide a Content-Length property.
at StreamMessageReader.onData (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:200:27)
at /packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:185:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:551:20)
-8:12.8.0 core:save (input.hidden-input)
4x -7:45.6.0 core:move-down (input.hidden-input)
-7:43.7.0 editor:newline (input.hidden-input)
4x -7:40.3.0 core:backspace (input.hidden-input)
-7:36.9.0 core:save (input.hidden-input)
2x -6:38.2.0 editor:newline (input.hidden-input)
-6:37.8.0 core:move-up (input.hidden-input)
5x -6:36.1.0 core:backspace (input.hidden-input)
2x -6:32 autocomplete-plus:confirm (input.hidden-input)
-6:29.5.0 core:backspace (input.hidden-input)
-6:25.6.0 autocomplete-plus:confirm (input.hidden-input)
-6:24.8.0 editor:newline (input.hidden-input)
-6:10.5.0 window:toggle-dev-tools (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)
-5:39.8.0 command-palette:toggle (input.hidden-input)
-5:38.1.0 editor:consolidate-selections (input.hidden-input)
-5:38.1.0 core:cancel (input.hidden-input)
atom-beautify 0.30.9
atom-ide-ui 0.7.1
atom-python-test 0.9.0
autocomplete-python 1.10.5
block-travel 1.0.5
build 0.70.0
build-cargo 2.0.0
busy 0.7.0
busy-signal 1.4.3
docker 0.8.0
file-icons 2.1.15
highlight-selected 0.13.1
Hydrogen 2.2.2
ide-python 0.5.0
incremental-search 5.2.2
intentions 1.1.5
language-docker 1.1.8
language-ini 1.19.0
language-rust 0.4.12
last-cursor-position 0.9.2
linter 2.2.0
linter-flake8 2.3.0
linter-less 2.6.0
linter-ui-default 1.6.10
project-manager 3.3.5
python-debugger 0.2.0
python-indent 1.1.4
python-tools 0.6.9
remote-sync 4.1.8
sort-lines 0.18.0
sourcegraph 1.0.5
sync-settings 0.8.3
teletype 0.5.0
wakatime 7.0.4
Upon closing a Rust tab in Atom, an Uncaught Error: Connection is closed
message is sometimes generated.
Atom: 1.20.0-beta7 x64
Electron: 1.6.9
OS: Mac OS X 10.12.6
Thrown From: ide-rust package 0.1.0
Uncaught Error: Connection is closed.
At /Users/eliza/.atom/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:604
Error: Connection is closed.
at /packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:129:28)
at throwIfClosedOrDisposed (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:604:19)
at Object.sendNotification (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:658:13)
at LanguageClientConnection._sendNotification (/packages/ide-rust/node_modules/atom-languageclient/build/lib/languageclient.js:233:15)
at LanguageClientConnection.didCloseTextDocument (/packages/ide-rust/node_modules/atom-languageclient/build/lib/languageclient.js:130:10)
at TextEditorSyncAdapter.didDestroy (/packages/ide-rust/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:203:22)
at wrapped (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:101:22)
at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at TextEditor.module.exports.TextEditor.destroyed (/Applications/Atom Beta.app/Contents/Resources/app/src/text-editor.js:661:26)
at TextEditor.module.exports.Model.destroy (/Applications/Atom Beta.app/Contents/Resources/app/src/model.js:31:64)
at Pane.module.exports.Pane.destroyItem (/Applications/Atom Beta.app/Contents/Resources/app/src/pane.js:707:66)
at TabBarView.module.exports.TabBarView.closeTab (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:341:32)
at HTMLDivElement.TabView.didClickCloseIcon (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:229:25)
-0:28.5.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling)
atom-ide-ui 0.2.0
atom-language-rust 0.12.2
atom-toolbar 0.1.6
autocomplete-racer 0.1.3
build 0.68.0
build-cargo 2.0.0
build-sbt 0.6.0
busy 0.7.0
busy-signal 1.4.3
cotton-candy 0.1.1
dbg 1.6.2
dbg-gdb 1.7.7
docker 0.8.0
editorconfig 2.2.2
fairyfloss 0.2.0
fairygloss 0.4.0
file-icons 2.1.11
hyperclick 0.0.0
ide-haskell 2.0.5
ide-json 0.1.0
ide-rust 0.1.0
intentions 1.1.5
language-docker 1.1.8
language-latex 1.1.1
language-rust 0.4.12
language-rust-redux 0.2.2
language-scala 1.1.9
language-scala-plus 1.2.2
latex 0.46.0
latex-hyperclick 0.2.0
linter 2.2.0
linter-chktex 1.3.1
linter-docker 0.2.1
linter-rust 0.8.0
linter-scalastyle 1.4.1
linter-spell 0.15.0
linter-spell-latex 0.10.0
linter-ui-default 1.6.8
linter-ui-plus 0.3.2
nucleus-dark-ui 0.12.3
output-panel 0.3.4
pigments 0.40.2
pristine-ui 1.1.7
rust-doc-viewer 2.6.3
rustsym 0.4.0
sbt 0.12.0
symbols-tree-nav 0.15.5
symbols-view-plus 0.117.0-plus
tool-bar 1.1.0
toolbar-basic 0.3.1
toolbar-icons-ide 1.1.0
wakatime 7.0.3
So i've run into an issue with this package. Diagnostics or Linting doesn't work while a .rs file is open. Saving the file or going to the new line does not lint the file. It seems that this only happens when the file is first opened and in order to kick it off again you have to close and reopen this file.
Would it be possible to implement proper code linting using the RLS or even Racer if needed?
Atom: version is 1.23.3 (all packages updated to latest)
Rust: nightly-x86_64-pc-windows-msvc (default)
rustc 1.25.0-nightly (e6072a7b3 2018-01-13)
Hi Ryan (or anyone reading this),
I've been using atom-ide-rust
for some time, but the rls stopped working lately. I get a Cargo failed: Error compiling dependent crate message when I start atom in a Rust project directory. Other things (like rustfmt
) still work.
Here's the output I get with atom.config.set('core.debugLSP', true)
:
/home/althonos/.local/share/atom/packages/ide-rust/node_modules/atom-languageclient/build/lib/logger.js:9
Rust (RLS) stderr {
"message":"multiple input filenames provided",
"code":null,
"level":"error",
"spans":[],
"children":[],
"rendered":
"error: multiple input filenames provided\n\n"
}
with:
$ rls --version
rls-preview 0.128.0-nightly (453f5e4 2018-05-28)
$ atom --version
Atom : 1.27.1
Electron: 1.8.4
Chrome : 59.0.3071.115
Node : 8.2.1
I get an error when I try to edit a folder that contains many crates. So the Cargo.toml
files are not at the root, but in the folders. Seems RLS is checking for a Cargo.toml
at the root of my folder instead of starting where my main.rs
file is.
Two examples of multi-crate repos:
This is the error:
Error reading manifest path: ErrorMessage { msg: "could not find Cargo.toml in C:\\Users\\danny\\Dev\\chip8\\ or any parent directory" }
stack backtrace:
0: 0x7ff755ab9529 - git_reference_type
1: 0x7ff755ab9a7e - git_reference_type
2: 0x7ff755ab8a80 - git_reference_type
3: 0x7ff75596b213 - git_commit_tree_id
4: 0x7ff75596b6d0 - git_commit_tree_id
5: 0x7ff7552844bd -
6: 0x7ff7551566a5 -
7: 0x7ffa3a1cae12 - _rust_maybe_catch_panic
8: 0x7ff7551d4b7b -
9: 0x7ffa3a1c8b4f - std::sys::windows::thread::Thread::new::he6cb72092aa085f2
10: 0x7ffa7a731fe4 - BaseThreadInitThunk
Rust (RLS) C:\Users\danny\Dev\chip8\
I don't think the <toolchain>
argument is optional. At least rustup run rls
gives a pretty clear error message.
error: The following required arguments were not provided:
<command>...
USAGE:
rustup run <toolchain> <command>...
For more information try --help
This should be, for the moment,
return cp.spawn("rustup", ["run", "nightly", "rls"], {
Since I updated atom-ide-rust
to v0.17.0, I get a warning asking me to choose between atom-ide-rust
and autocomplete-racer
, even when I’m in a non-Rust project.
I know these packages are redundant on autocompletion, but I do use autocomplete-racer
since RLS does not currently show documentation in code completion, and I find this is a really handy feature.
I see three possible workaround to this temporary* issue:
Warn only when in a Rust project. I can say “OK, I’m in the Rust context, there is a package conflict but I’m OK with it”. Outside of the Rust context it is just annoying to have such warning.
Add a “Keep both packages enabled” option. This would add an option in the config.cson
to disable the warning.
A slightly different way to (2): add an option in the configuration to allow conflicting packages.
I personnally prefer the option (2), as it is straightforward for a user to dissmiss the warning and it affects only one conflicting package.
* the documentation in code completion should be come some day in RLS.
Rust IDE support for Atom, powered by the Rust Langauge Server (RLS)
Langauge should be Language
I get this error message on a private project when I open any *.rs
file. The error only started showing up with a recent rust-ide
release. When I run cargo check
as instructed, it finishes successfully with no other feedback.
parasyte@Turkatron:~/projects/endeavium/endeavium-rs (master)$ cargo check
Compiling byteorder v1.1.0
Compiling sdl2-sys v0.30.0
Compiling bitflags v1.0.0
Compiling cc v1.0.1
Compiling bitflags v0.7.0
Compiling libc v0.2.32
Compiling num-traits v0.1.40
Compiling serde v1.0.15
Compiling quote v0.3.15
Compiling approx v0.1.1
Compiling lazy_static v0.2.9
Compiling unicode-xid v0.0.4
Compiling rand v0.3.17
Compiling synom v0.11.3
Compiling num-integer v0.1.35
Compiling syn v0.11.11
Compiling miniz-sys v0.1.10
Compiling num-iter v0.1.34
Compiling num v0.1.40
Compiling cgmath v0.15.0
Compiling serde_derive_internals v0.16.0
Compiling sdl2 v0.30.0
Compiling flate2 v0.2.20
Compiling serde_derive v1.0.15
Compiling imagefmt v4.0.0
Compiling odyssium v0.1.0 (file:///Users/parasyte/projects/endeavium/endeavium-rs/odyssium)
Compiling serde_bytes v0.10.2
Compiling serde_cbor v0.6.1
Compiling endeavium v0.1.0 (file:///Users/parasyte/projects/endeavium/endeavium-rs)
Finished dev [unoptimized + debuginfo] target(s) in 12.0 secs
parasyte@Turkatron:~/projects/endeavium/endeavium-rs (master)$ cd odyssium
parasyte@Turkatron:~/projects/endeavium/endeavium-rs/odyssium (master)$ cargo check
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading bitflags v1.0.1
Downloading num-traits v0.1.43
Downloading rand v0.3.22
Downloading num-traits v0.2.0
Downloading rand v0.4.2
Downloading libc v0.2.36
Compiling num-traits v0.2.0
Compiling approx v0.1.1
Compiling libc v0.2.36
Compiling bitflags v1.0.1
Compiling rand v0.4.2
Compiling num-traits v0.1.43
Compiling rand v0.3.22
Compiling cgmath v0.15.0
Compiling odyssium v0.1.0 (file:///Users/parasyte/projects/endeavium/endeavium-rs/odyssium)
Finished dev [unoptimized + debuginfo] target(s) in 6.48 secs
I do not have a Cargo.toml
in the root project directory, but this shouldn't really matter, right?
Here's a screenshot of the Atom dev console with the logging from rust-ide
. It doesn't really provide any useful information:
This looks a lot like atom/atom#6437 -- CPU runs constantly until I disable ide-rust
. JavaScript profiler in Atom developer tools show that it is constantly forking.
Repro with Atom 0.21.0 on macOS:
cargo new foobar
cd foobar
open -a /Applications/Atom.app --args "$PWD" "$PWD/src/lib.rs"
watch -n 0.1 'ls -lR'
Repro on Linux:
cargo new foobar
cd foobar
atom "$PWD" "$PWD/src/lib.rs"
watch -n 0.1 'ls -lR'
The watch command at the end will show that it's constantly rebuilding rls
dependencies. This appears to be a conflict between file change notification watchers. But I cannot pinpoint the cause beyond these initial steps.
I don't have this problem when opening a parent directory of the rust project. In this case, rls
isn't getting built in the project directory, either.
For me, today, I see the following when invoking the same commands this package runs internally to install the rust language server:
> rustup component add rls-preview --toolchain nightly
error: toolchain 'nightly-x86_64-apple-darwin' does not contain component 'rls-preview' for target 'x86_64-apple-darwin'
If I remove --nightly
from this package's checking / installation packages and use rustup run stable rls
to start the server, things seem to work.
I didn't file this issue on the rust language server itself because I'm wondering if I'm missing something silly, but I thought I should let you know @mehcode.
I am not sure how to reproduce this, this seems to happen seemingly randomly when I'm working on code.
When this happens this error will keep repeating until I re-open atom.
Atom: 1.24.0 ia32
Electron: 1.6.16
OS: Microsoft Windows 10 Pro
Thrown From: ide-rust package 0.14.0
Uncaught Error: Header must provide a Content-Length property.
At C:\Users\Layl\.atom\packages\ide-rust\node_modules\vscode-jsonrpc\lib\messageReader.js:200
Error: Header must provide a Content-Length property.
at StreamMessageReader.onData (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:200:27)
at /packages/ide-rust/node_modules/vscode-jsonrpc/lib/messageReader.js:185:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:551:20)
-0:45.5.0 intentions:highlight (input.hidden-input)
-0:45.3.0 core:copy (input.hidden-input)
2x -0:42 core:backspace (input.hidden-input)
-0:41 autocomplete-plus:confirm (input.hidden-input)
-0:40.5.0 intentions:highlight (input.hidden-input)
-0:40.4.0 core:paste (input.hidden-input)
2x -0:37.1.0 core:backspace (input.hidden-input)
2x -0:28.3.0 intentions:highlight (input.hidden-input)
-0:27.4.0 core:copy (input.hidden-input)
-0:26.4.0 intentions:highlight (input.hidden-input)
-0:26.3.0 core:paste (input.hidden-input)
-0:24.9.0 intentions:highlight (input.hidden-input)
-0:24.7.0 core:save (input.hidden-input)
2x -0:23.9.0 core:backspace (input.hidden-input)
-0:22.5.0 intentions:highlight (input.hidden-input)
-0:22.4.0 core:save (input.hidden-input)
atom-ide-ui 0.9.2
file-icons 2.1.17
file-types 0.5.5
gruvbox-plus-syntax 1.3.1
ide-rust 0.14.0
intentions 1.1.5
language-cmake 1.1.0
language-glsl 2.0.4
language-latex 1.1.1
language-markedly 0.0.0
language-openscad 0.4.3
language-rust 0.4.12
language-vue 0.23.1
language-x86-64-assembly 2.2.11
minimap 4.29.8
minimap-linter 2.1.3
pdf-view 0.65.0
Thanks for working on Rust support in Atom! 😄
The top two properties displayed are private to the structure I'm using. If I (or an unsuspecting user of my library) were to try to use those, it would result in a compilation error. It would be great if ide-rust could filter to only what's available in the current scope. (maybe using RLS or something)
When editing code I get those errors at each keyboard stroke with a very anoying popup.
It seems to happen once RLS has crashed, because I am making it hard for RLS to find errors in my incorrect code in my editor.
I installed today RLS using rustup component add rls-preview rust-analysis rust-src
.
I can reproduce on MAC OS X.
It might be that RLS became more unstable recently and that the plugin needs to be better fault tolerant.
Atom: 1.27.2 x64
Electron: 1.7.15
OS: Ubuntu 18.04
Thrown From: ide-rust package 0.16.3
Uncaught Error: Connection is closed.
At /home/meven/.atom/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:613
Error: Connection is closed.
at /packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:138:28)
at throwIfClosedOrDisposed (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:613:19)
at Object.sendNotification (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:667:13)
at LanguageClientConnection._sendNotification (/packages/languageserver-rust/node_modules/atom-languageclient/build/lib/languageclient.js:233:15)
at LanguageClientConnection.didChangeTextDocument (/packages/languageserver-rust/node_modules/atom-languageclient/build/lib/languageclient.js:126:10)
at TextEditorSyncAdapter.sendIncrementalChanges (/packages/languageserver-rust/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:178:24)
at Function.module.exports.Emitter.simpleDispatch (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at TextBuffer.module.exports.TextBuffer.emitDidChangeTextEvent (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/node_modules/text-buffer/lib/text-buffer.js:1792:32)
at TextBuffer.module.exports.TextBuffer.transact (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/node_modules/text-buffer/lib/text-buffer.js:996:18)
at TextEditor.transact (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/src/text-editor.js:2002:30)
at HTMLElement.newCommandListeners.(anonymous function) (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/src/register-default-commands.js:704:28)
at CommandRegistry.handleCommandEvent (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/src/command-registry.js:384:49)
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
at WindowEventHandler.handleDocumentKeyEvent (/home/meven/Téléchargements/atom-1.27.2-amd64/resources/app/src/window-event-handler.js:110:40)
-1:10.1.0 snippets:previous-tab-stop (input.hidden-input)
-1:10.1.0 editor:outdent-selected-rows (input.hidden-input)
-1:04.3.0 core:copy (input.hidden-input)
-1:00.4.0 core:paste (input.hidden-input)
-0:52 core:delete (input.hidden-input)
-0:46.2.0 core:copy (input.hidden-input)
-0:45.6.0 core:paste (input.hidden-input)
3x -0:44.4.0 core:backspace (input.hidden-input)
-0:40.4.0 core:copy (input.hidden-input)
2x -0:38.7.0 core:backspace (input.hidden-input)
-0:37.4.0 core:paste (input.hidden-input)
2x -0:35.8.0 core:save (input.hidden-input)
-0:16.9.0 core:delete (input.hidden-input)
-0:13.5.0 core:save (input.hidden-input)
7x -0:11.5.0 core:backspace (input.hidden-input)
-0:07.2.0 core:save (input.hidden-input)
atom-ide-ui 0.12.0
autocomplete-html-entities 0.2.0
ide-rust 0.16.3
language-rust 0.4.12
languageserver-rust 0.3.0
nuclide 0.307.0
Useful when a project won't work with rls, but has rust in it. Users would rather disable ide-rust on this project, than totally.
Ie rust-lang/rust itself doesn't play nice with rls.
[Enter steps to reproduce:]
Not, sure. I've got that on first save of Rust code (Cmd-S) after upgrading to ide-rust 0.6.0
Atom: 1.22.0 x64
Electron: 1.6.15
OS: Mac OS X 10.13.1
Thrown From: ide-rust package 0.6.0
Uncaught Error: Connection is closed.
At /Users/imp/.atom/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:613
Error: Connection is closed.
at /packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:138:28)
at throwIfClosedOrDisposed (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:613:19)
at Object.sendNotification (/packages/ide-rust/node_modules/vscode-jsonrpc/lib/main.js:667:13)
at LanguageClientConnection._sendNotification (/packages/ide-rust/node_modules/atom-languageclient/build/lib/languageclient.js:242:15)
at LanguageClientConnection.didChangeTextDocument (/packages/ide-rust/node_modules/atom-languageclient/build/lib/languageclient.js:131:10)
at TextEditorSyncAdapter.sendIncrementalChanges (/packages/ide-rust/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:200:24)
at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at TextBuffer.module.exports.TextBuffer.emitDidChangeTextEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1675:28)
at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:975:18)
at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1687:32)
at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1248:30
at TextEditor.module.exports.TextEditor.mergeSelections (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2635:24)
at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2597:41)
at TextEditor.module.exports.TextEditor.mutateSelectedText (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1246:25)
at TextEditor.module.exports.TextEditor.insertText (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1212:25)
at TextEditorComponent.didTextInput (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:1627:30)
atom-beautify 0.30.6
atom-ide-ui 0.5.4
atomatigit 1.5.5
autocomplete-python 1.10.3
browser-plus 0.0.98
build 0.69.0
build-cargo 2.0.0
build-make 0.13.0
busy 0.7.0
busy-signal 1.4.3
ide-rust 0.6.0
imdone-atom 2.2.7
imdone-atom-github 0.1.11
intentions 1.1.5
language-diff 0.7.0
language-docker 1.1.8
language-rust 0.4.12
linter 2.2.0
linter-pycodestyle 2.1.3
linter-rust 0.8.1
linter-ui-default 1.6.10
merge-conflicts 1.4.5
minimap 4.29.7
minimap-git-diff 4.3.1
project-manager 3.3.5
python-tools 0.6.9
racer-plus 2.0.0
release-notes 0.53.0
rust-api-docs-helper 0.5.1
rusty-dark-syntax 0.7.0
split-diff 1.5.1
sync-settings 0.8.3
tool-bar 1.1.0
travis-ci-status 1.3.1
First documentation on hover worked, but no snippets. I disabled and re-enabled it, then no documentation on hover, but snippets is back.
Using Atom 1.21.0 x64 on Linux; my installed packages:
I'm getting errors pointing to a missing rustup
installation while I'm very certain it is available and present in PATH
:
Uncaught (in promise) Error: failed to start server: Error: Command failed: rustup run stable-x86_64-pc-windows-gnu rustc --version
error: toolchain 'stable-x86_64-pc-windows-gnu' is not installed
at RustLanguageClient.startServerProcess (C:\Users\user\.atom\packages\ide-rust\lib\index.js:622)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Running rustup run stable-x86_64-pc-windows-gnu rustc --version
in cmd
works nicely and returns rustc 1.27.0 (3eda71b00 2018-06-19)
. rustup component list --toolchain stable
confirms that the required components are there:
cargo-x86_64-pc-windows-gnu (default)
rls-preview-x86_64-pc-windows-gnu (installed)
rust-analysis-x86_64-pc-windows-gnu (installed)
rust-docs-x86_64-pc-windows-gnu (default)
rust-mingw-x86_64-pc-windows-gnu (default)
rust-src (installed)
rust-std-x86_64-pc-windows-gnu (default)
rustc-x86_64-pc-windows-gnu (default)
I've also tried to make it work with nightly-x86_64-pc-windows-gnu
(that I also have along with RLS), but it only changed the flavor of the error to:
Error: Command failed: rustup run nightly-x86_64-pc-windows-gnu rustc --version
error: toolchain 'nightly-x86_64-pc-windows-gnu' is not installed
Debug mode doesn't show any more errors.
Example:
struct Foo(u32);
impl Foo {
fn new(num: u32) -> Foo {
Foo(num)
}
}
fn main() {
Foo::
Hit Ctrl-Space and it will turn into
Foonew(num)
instead of
Foo::new(num)
Same happens if I choose form multiple completions.
I've just started looking into using Atom and RLS for Rust development, so I'm not sure if it's related to this project, or to atom-ide, or to RLS itself.
I'm not certain if this is a problem with atom-ide-rust or with the RLS itself, but after I've been coding for a while my command-line cargo builds start stalling:
$ cargo test
Compiling corrosion v0.1.0 (file:///C:/Users/Brook/Dropbox/workspace/Corrosion)
Closing Atom unblocks cargo and allows it to continue. I see no errors in the developer log in Atom, though I do see the following repeated a number of times:
[ide-rust] rustup toolchain list
[ide-rust] rustup component list --toolchain nightly
[ide-rust] All dependencies installed and ready to go
[ide-rust] rustup toolchain list
[ide-rust] rustup component list --toolchain nightly
[ide-rust] All dependencies installed and ready to go
[ide-rust] rustup toolchain list
[ide-rust] rustup component list --toolchain nightly
[ide-rust] All dependencies installed and ready to go
[Enter steps to reproduce:]
Atom: 1.23.3 x64
Electron: 1.6.15
OS: Ubuntu 17.10
Thrown From: ide-rust package 0.12.0
Failed to load the ide-rust package
At Unexpected token )
SyntaxError: Unexpected token )
at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:94:52)
at Object.value [as .js] (/opt/atom/resources/app/src/compile-cache.js:239:29)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (/app.asar/static/index.js:47:45)
at require (internal/module.js:20:19)
at customRequire (/opt/atom/resources/app/static/<embedded>:96:26)
at Package.module.exports.Package.requireMainModule (/opt/atom/resources/app/src/package.js:937:35)
at /opt/atom/resources/app/src/package.js:160:34
at Package.module.exports.Package.measure (/opt/atom/resources/app/src/package.js:99:21)
at Package.module.exports.Package.load (/opt/atom/resources/app/src/package.js:145:18)
at PackageManager.loadAvailablePackage (/opt/atom/resources/app/src/package-manager.js:618:16)
at config.transact (/opt/atom/resources/app/src/package-manager.js:531:20)
at Config.module.exports.Config.transact (/opt/atom/resources/app/src/config.js:342:22)
at PackageManager.loadPackages (/opt/atom/resources/app/src/package-manager.js:529:23)
at /opt/atom/resources/app/src/atom-environment.js:832:34
atom-beautify 0.30.9
atom-ide-ui 0.8.1
color-picker 2.2.5
dbg 1.6.3
dbg-gdb 1.7.8
docblockr 0.13.6
emmet 2.4.3
file-icons 2.1.16
gcc-make-run 0.2.12
Hydrogen 2.2.2
ide-clangd 0.1.2
ide-csharp 0.6.1
ide-css 0.2.0
ide-flowtype 0.19.0
ide-html 0.4.1
ide-java 0.7.0
ide-json 0.2.0
ide-php 0.7.5
ide-python 0.7.0
ide-rust 0.12.0
ide-typescript 0.7.2
language-mips 0.3.0
language-rust 0.4.12
minimap 4.29.7
output-panel 0.3.4
package-sync 1.1.0
pigments 0.40.2
I'm using ide-rust
with a project using glium
and following the tutorials. https://github.com/glium/glium/tree/master/book
The linter doesn't seem to be working when I'm in this glium project. When I enable logging, I get logger.ts:19 Rust (RLS) stderr thread 'main' has overflowed its stack
in the console.
Currently waiting before releasing the next version for a Rls release with clippy_preference
and the clippy feature enabled.
Hello !
When we install atom-ide-rust, it install some things needing for a good experience but it doesn't install/use a (good) syntax highlighting =/
Same usage as currently shown has been improved as you can apply diagnostic fixes with a click of a button.
Add a usage example using >= v0.22
Hi, and thanks for developing this package, I really like it!
The problem I experience is that, except outlines, no Feature seems to work for examples in the example
folder. Especially autocomplete, hover-features and diagnostics are missing. I'm not quiet sure whether this is a missing feature or just a specific problem with my machine.
Hi, thanks for making this plugin!
I have found that if anything goes wrong with this plugin (rls doesn't load for some reason, rls crashes, etc.), no error message is shown and furthermore autocomplete just completely stops working. I would prefer the default autocomplete over no autocomplete. Would it be possible to fallback to that if no completions are available from RLS?
Also, if there could be an atom command to restart RLS without restarting the entire editor, that would really help as well. 😄
variable does not need to be mutable
appeared but the variable really needed to be mutable.
So I wanted to create a minimalist project to expose the bug but when I copied the code into the new project the warning did not appear in the new project.
I realized that if I run cargo clear
in the original project, the bug disappear.
I dont manage to reproduce the bug.
It seems when ever I use a package with unsafe functions, the autocomplete system does not list them. For example I'm trying to use the ShellExecuteExA function from the winapi, but it's not listed in autocomplete, and I don't get any info for what I should provide to the function.
Atom: 1.24.0-beta3
Rust: stable-x86_64-pc-windows-msvc
rustc 1.23.0 (766bd11c8 2018-01-01)
On the Atom IDE page, the outline view not only has some colouring, but items in the list are nested where appropriate. In my current file, a struct is listed with it's properties below it, but with no nesting, they're all presented at the same top level?
This enhancement was mentioned in a previous issue: #58 (comment) about filtering out local variables.
I have Rust installed (both Nightly and Beta), added the rls-preview
component (which failed on nightly) but from what I can tell the package isn't working. I'm not seeing any completions, tooltips or the outline view working.
At the end of closing each line whether with semicolon or closed brackets, it prompts autocomplete suggestion. Upon pressing return
to start a newline, it inserts the first suggestion (always std
) instead of new line. It's a real productivity kill to have to press esc
each time to close the prompt and avoid mistakenly inserting std
.
Strong chance this is a atom-ide-ui
problem, not atom-ide-rust
.
To reproduce, type fn main
then enter to get the following generated:
fn fn main() {
unimplemented!()
}
The outline view would be more useful if there were a way to filter out the variables. It seems most of the times developers are interested in functions, traits and structs, but the variables make them sparse.
I don't know the proper way to implement this behaviour though.
Is it supposed to work?
Debug mode shows no events on Ctrl+] or Ctrl+Alt+Dn or Right Click→Go to Declaration.
rls v0.122.2
Atom : 1.27.0
Electron: 1.7.11
Chrome : 58.0.3029.110
Node : 7.9.0
FYI-- unless the root project folder added to Atom contains the Cargo.toml, the RLS won't work.
I didn't have any warnings about this requirement in Atom, but did in VSCode.
Rls build progress messages have changed rust-lang/rls#653. ide-rust should try to support both if possible.
This is currently a proposed LSP extension based on: microsoft/language-server-protocol#245
The next thing I'm going to look into, at some point, is checking for an updated toolchain release on startup, and prompting the user to update.
rustup run $toolchain rustc -vV
has a commit date.)Thanks for the package. Is there a way to pass configuration to rls? For example I'd like to try the workspace_mode
.
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.