Giter VIP home page Giter VIP logo

coc-rls's Introduction

Neoclide

Neoclide is a rework of Nyaovim, the reason is I want it have best user experience.

Neoclide is an editor built with web technologies while emebed with neovim.

Neoclide is in early development, which means it could break easily, and you should not take it seriously.

Since I use Mac only, something could break on other platform, I need your help!

What have done

  • Global session save and restore
  • Fixed copy/paste behaviour
  • Fixed drag and click position calculate
  • Fixed trigger of VimLeave event
  • Background transparent support
  • Improved input method support
  • Improved cursor support
  • Accessable editor state object
  • Automatic resize handler, no screen blink

How to use

Since it's in early age, no prebuild currently avaiable, you have to use it from souce code.

  • Clone this repository

  • Run following commands to install dependencies and build code

    npm run dep
    npm run build
    
  • To start the app, use:

    npm run app
    

LICENSE

Copyright 2016 [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

coc-rls's People

Contributors

9999years avatar adnoc avatar avi-d-coder avatar chemzqm avatar dcchuck avatar ericbmerritt avatar exergonic avatar linarcx avatar mirsella avatar nullpo-head avatar steshaw avatar wfernandes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coc-rls's Issues

Running :Coclist diagnostics fails

When I try to run the rls diagnostics using :Coclist diagnostics, I get the following error in the logs:

'Vim:E117: Unknown function: coc#util#set_buf_var'

Here are the top level versions:
vim version: NVIM v0.3.7
node version: v10.13.0
coc.nvim version: 0.0.72-89a83c1d29
term: xterm-256color
platform: linux

Publish new version; RLS configuration option `use_crate_blacklist` is deprecated: use `crate_blacklist` instead

Whenever I start up nvim with coc-rls 1.1.2, I get this warning:

[coc.nvim] Setting sysroot to/home/aquatica/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
[coc.nvim] running: rustup run stable-x86_64-unknown-linux-gnu rls, at /home/aquatica/projects/latexdef
[coc.nvim] RLS configuration option `use_crate_blacklist` is deprecated: use `crate_blacklist` instead

It's fixed in the repo, but it hasn't been pushed to npm yet:

$ git diff 1.1.2 -- package.json
diff --git a/package.json b/package.json
index 5f3f723..b66cd8f 100644
--- a/package.json
+++ b/package.json
@@ -182,10 +182,27 @@
           "description": "Show warnings.",
           "scope": "resource"
         },
-        "rust.use_crate_blacklist": {
-          "type": "boolean",
-          "default": true,
-          "description": "Don't index crates on the crate blacklist.",
+        "rust.crate_blacklist": {
+          "type": [
+            "array",
+            "null"
+          ],
+          "default": [
+            "cocoa",
+            "gleam",
+            "glium",
+            "idna",
+            "libc",
+            "openssl",
+            "rustc_serialize",
+            "serde",
+            "serde_json",
+            "typenum",
+            "unicode_normalization",
+            "unicode_segmentation",
+            "winapi"
+          ],
+          "description": "Overrides the default list of packages for which analysis is skipped.\nAvailable since RLS 1.38",
           "scope": "resource"
         },
         "rust.build_on_save": {

Other info:

vim version: NVIM v0.4.2
node version: v12.10.0
coc.nvim version: 0.0.74-b04e619c64
term: screen-256color
platform: linux


:RustRun error

run :RustRun with the https://github.com/shuaixr/minigrep yields this error.
run cargo run from cli works fine.
It looks like running rustc instead of cargo run

log:
error[E0432]: unresolved import minigrep
--> src/main.rs:1:5
|
1 | use minigrep::Config;
| ^^^^^^^^ maybe a missing crate minigrep?

error[E0433]: failed to resolve: use of undeclared type or module minigrep --> src/main.rs:13:21 | 13 | if let Err(e) = minigrep::run(config) { | ^^^^^^^^ use of undeclared type or module minigrep error: aborting due to 2 previous errors
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432.
Press ENTER or type command to continue

uname -a
Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux

nvim --version

Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-PpSRXj/neovim-0.3.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -Wconversion -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-PpSRXj/neovim-0.3.4/build/config -I/build/neovim-PpSRXj/neovim-0.3.4/src -I/usr/include -I/build/neovim-PpSRXj/neovim-0.3.4/build/src/nvim/auto -I/build/neovim-PpSRXj/neovim-0.3.4/build/include
Compiled by team+vim@tracker.debian.org

Features: +acl +iconv -jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

rustc --version
rustc 1.43.0-nightly (8aa9d2014 2020-02-21)

cargo --version
cargo 1.43.0-nightly (e02974078 2020-02-18)

Updates to Cargo.toml not recognized

Thanks for your work on coc!

As of rust-lang/rls#1246 rls supports cargo rebuilds, but this does not work in coc-rls.

To re-create this issue, create a new project, use a dependency in main.rs, wait for the error about the dependency being unrecognized, update Cargo.toml, see that the error doesn't go away.

Perhaps the issue is that when a language client instance is created we don't create a selector for toml files? https://github.com/neoclide/coc-rls/blob/master/src/index.ts#L74

Disabling startup logs.

Hi, thanks for making this library.
Just a question. How do you disable [coc.nvim] startup messages?
I keep getting these two messages (which only recently appeared) and am unsure which settings can disable it:
image
image

I have tried "diagnostic.level": false in the CocConfigs with no effect.

self is not expanded from snippets in trait implementations

I am not sure whether I am misunderstanding something or my setup is buggy, here's a gif to demonstrate:

Where does the issue originate from? I've tried searching online but it doesn't seem like anyone else is being affected by this.

rls-name now simply as rls in nightly

On my Rust installation now RLS is now simply named "rls", instead of "rls-preview". This cause coc-rls to fail a regex match because it defaults to match "rls-preview".

Nix + macOS makes RLS fail to build

I am using Nix on macOS for development setup (nix-shell) together with the Mozilla rust overlay.

Using this plugin works fine through "rust-client.disableRustup": true however, when rls is started DYLD_LIBRARY_PATH and LD_LIBRARY_PATH is modified to include the sysroot (here).

However, this is not correct in the nix case and causes build errors. rls already works fine from the overlay and I only want it started in the simplest possible way (it is already in path) without any environment shenanigans.

Would it be possible to have a setting for the addition to library paths so that it can be disabled?

[coc.nvim] source rust-client timeout after 1000ms

Hi. i'v install rustup toolchain via in nixos:
https://nixos.org/nixpkgs/manual/#using-the-rust-nightlies-overlay
Then install rls from:
https://github.com/rust-lang/rls
And finally install coc-rls via: :CocInstall coc-rls.
But when i want to edit a rust file, i get this error:
[coc.nvim] source rust-client timeout after 1000ms

This is the output of :CocInfo:

## versions

vim version: NVIM v0.3.4
node version: v8.15.1
coc.nvim version: 0.0.61
term: xterm-kitty
platform: linux

## Error messages

## Output channel: rust-client
{"message":"linker `cc` not found","code
":null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level":"
error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code
":null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code
":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"
linker `cc` not found","code":null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered"
:"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error
","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n
\n"}
{"message":"linker `cc` not found","code":
null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code"
:null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children"
:[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":
null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"
level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","
code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level":"error","
spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"linker `cc` not found","code":null,"level":"error","spans":[],"children":[{"message":
"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}
],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"aborting due to previous error",
"code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level"
:"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children"
:[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level
":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level":"error
","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level
":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code"
:null,"level":"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error
","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n
"}
{"message":"linker `cc` not found","code":null,"level":"error"
,"spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error"
,"code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
{"message":"linker `cc` not found","code":null,"level":
"error","spans":[],"children":[{"message":"No such file or directory (os error 2)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: linker `cc` not found\n  |\n  = note: No such file or directory (os error 2)\n\n"}
{"message":"aborting due to previous error"
,"code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}

Cursor lags occasionally with coc enabled

Result from CocInfo

versions

vim version: NVIM v0.3.8
node version: v11.15.0
coc.nvim version: 0.0.74-c97d41aa1e
term: xterm-256color
platform: linux

Messages

[coc.nvim] Setting sysroot to/home/linusb/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
[coc.nvim] running: rustup run stable-x86_64-unknown-linux-gnu rls, at /home/linusb/git/budget_app
"src/main.rs" 32L, 545C written
[coc.nvim] Update completed

Describe the bug

With the plugin enabled, sometimes vim would lag behind. For example when navigating using j and k keys, the cursor would not move but would jump two lines after pressing the button again.

Reproduce the bug

  • Create file mini.vim with:

    set nocompatible
    set runtimepath^=/path/to/coc.nvim
    filetype plugin indent on
    syntax on
    set hidden
  • Start (neo)vim with command: vim -u mini.vim somefile.rs

  • Operate vim, move the cursor quickly for a while.

RLS configuration warning

RLS configuration option use_crate_backlist is deprecated: use crate_backlist instead, How to resolve

:CocRestart required?

Sorry if this has been asked before, I couldn't find any related issues. I'm using the latest coc.nvim and stable coc-rls, Code completions and suggestions are working, but I don't seem to see updated errors or warnings without invoking :CocRestart. Is this the expected behavior?

Additional info:
nvim 0.3.8
macos

`Could not find Cargo.toml in someday or any parent directory`

cod-rls has problem with finding Cargo.toml

When you cargo new someroject in a dir which is initialized to a git repo, like this:

ls -aR | grep ":" | sed -e 's/://' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'
   |-.git
   |---hooks
   |---info
   |---logs
   |-----refs
   |-------heads
   |-------remotes
   |---------origin
   |---objects
   |-----25
   |-----28
   |-----53
   |-----70
   |-----e5
   |-----info
   |-----pack
   |---refs
   |-----heads
   |-----remotes
   |-------origin
   |-----tags
   |-coctest
   |---src

and open contest/src/main.rs, coc-rls will inform that
image

It seems that coc-rls has problem with reading the true WORKINGDIR.

Installation Fails

Hello,

running :CocInstall coc-rlsyields:

00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'add'                         │00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'add'
                                                                                           │
[Process exited 1]

Any idea how to fix?
Best

Problem with installation

after following installation instructions, I open a rust file as instructed. I get prompted with the message "RLS not installed. Install?" and I select Yes. However, upon doing so I get this error:
Screen Shot 2019-04-27 at 8 26 31 AM

also, the output from :CocInfo:


vim version: NVIM v0.3.0
node version: v10.10.0
coc.nvim version: 0.0.65
term: iTerm.app
platform: darwin

## Error messages

## Output channel: snippets

## Output channel: rust-client
[Error  - 8:31:29 AM] Starting client failed: 
Error: Error starting up rls.

Completing entire function signature?

Hi, i am using neoclide/coc.nvim and autozimu/LanguageClient-neovim in neovim for syntax completion in rust. It works great, as soon as I download a new crate, the language server finds it (I did :CocInstall coc-rls) and shows function signature, trait definition, everything.

But I was wondering if I could configure these plugins to provide the entire function signature as completion, i.e. if I bring up the completion menu with tab (I use ervandew/supertab) it will insert the entire signature of the function I selected. Is this something I could do using this plugin?

Disable for git commit files

When I do a git commit, my default editor opens (neovim) with a temporary file .git/COMMIT_EDITMSG. It looks like coc-rls kicks in on that file and produces a bunch of errors.

Error detected while processing function <lambda>14[1]..<SNR>53_execute:
line    2:
Complete around error: Cannot read property 'toLowerCase' of null
Press ENTER or type command to continue
Error detected while processing function <lambda>14[1]..<SNR>53_execute[2]..<lambda>15[1]..<SNR>53_execute:
line    2:
Complete buffer error: Cannot read property 'toLowerCase' of null
Press ENTER or type command to continue
Error detected while processing function <lambda>14[1]..<SNR>53_execute[2]..<lambda>15[1]..<SNR>53_execute[2]..<lambda>16[1]..<SNR>53_execute:
line    2:
Complete file error: Cannot read property 'toLowerCase' of null

Rename is not working

When i try to run "(coc-rename)", i get the below error

"Rename failed: no information for symbol"

How to turn off the linting?

Sorry to create an issue for asking this question, let me know if there are other ways for simple question like this.

Code: -32603

When I save a Rust file I often get this error message: 'Code: -32603'

Could it be rustfmt? The buffer doesn't change in vim, but when I run it from the command line I get no problems and the file is formatted.

Where is `deglob`?

coc-rls README claims to support deglob refactor action.. but I cannot figure out a way to use it :(
For instance, how should I deglob this file?

use std::collections::*;

fn main() {
    let mut a = HashMap::new();
    let mut b = HashSet::new();
    a.insert(5, 8);
    b.insert(3);
    println!("{:?} {:?}", a, b);
}

I have tried requesting <Plug>(coc-codeaction) from the first line with no luck, or :call CocAction("doCodeAction", 'deglob') but nothing changed. A simple search like :help coc-nvim then /deglob yielded no result either :(

Is the feature actually supported?
If yes, how do I use it?

CocAction("format") looses information when sorting `use` statements.

With this simple main.rs:

use b;
use a;
use c;

fn main() {}

:call CocAction("format") transforms the file to:

use a;
use b;

fn main() {}

.. which is very wrong, as I expect

use a;
use b;
use c;

fn main() {}

so I've just.. lost information :\

What could be wrong?


Clue 1:

The problem also occurs with vanilla vim -u .vimrc-plain src/main.rs with .vimrc-plain:

call plug#begin('~/.vim/plugged')

Plug 'neoclide/coc.nvim', {'branch': 'release'}

call plug#end()

Clue 2:

From a neighbouring shell, cargo fmt or rustfmt src/main.rs yields expected results. How do Coc and rustfmt interact?

Can't get RLS working in no_std project

I've been trying to get RLS to work in a no_std crate but keep getting errors along the lines of "can't find crate for 'core'". My .vim/coc-settings.json is as follows:

  {    
      "diagnostic.enable": true,    
      "diagnostic.checkCurrentLine": false,    
      "languageserver": {    
        "rust": {    
          "command": "rls",    
          "filetypes": ["rust"],    
          "rootPatterns": ["Cargo.toml"]    
        }    
      },    
      "rust.all_targets": false,    
      "rust.sysroot": "/home/yuhan/projects/rust/embedded/msp430-quickstart/target/sysroot",    
      "rust.target": "msp430-none-elf",    
      "rust.rustflags": "-L  dependency=/home/yuhan/projects/rust/embedded/msp430-quickstart/target/sysroot/lib/rustlib/msp430-none-elf/lib"    
  }    

My code is at https://github.com/YuhanLiin/msp430fr2355-quickstart. It is an embedded project targetting MSP430. I've been following the instructions at rust-lang/rls#904 to no avail.

Uncaught exception: Error: Header must provide a Content-Length property

coc-rls started returning this issue. Not sure what's going on. I've looked around seems to be an issue with the communication between coc and the language server. However none of these tools have changed in a while.

Any idea on what might going on?

[coc.nvim] error: Uncaught exception: Error: Header must provide a Content-Length property.                                                                                               
    at StreamMessageReader.onData (/Users/murillo/.vim/plugged/coc.nvim/node_modules/vscode-jsonrpc/lib/messageReader.js:163:27)                                                          
    at Socket.<anonymous> (/Users/murillo/.vim/plugged/coc.nvim/node_modules/vscode-jsonrpc/lib/messageReader.js:148:18)                                                                  
    at Socket.emit (events.js:210:5)                                                                                                                                                      
    at addChunk (_stream_readable.js:309:12)                                                                                                                                              
    at readableAddChunk (_stream_readable.js:290:11)                                                                                                                                      
    at Socket.Readable.push (_stream_readable.js:224:10)                                                                                                                                  
    at Pipe.onStreamRead (internal/stream_base_commons.js:182:23) 

Unknown RLS configuration: `crate_blacklist` on opening any rust file

Whenever I open a rust file, I get this error:
[coc.nvim] Unknown RLS configuration: `crate_blacklist`
I've updated neovim itself and run PlugUpdate to make sure that things are updated. I know from #44 that this configuration option was recently name changed, but crate_blacklist is the new name.

Getting timeout

Diagnostics do work, but when triggering code completion - I get:

[coc.nvim] source rust timeout after 500ms

Happy to provide more info, just let me know what you need :)

I've only installed the nightly toolchain - in case that's a factor

Does not format if there are errors

Unlike other coc language servers, it seems like coc-rls won't run rustfmt unless there are no errors present in your project, even though rustfmt works on code that won't compile.

Rename functionality not working

I am currently trying to get coc.nvim working with rust. Most features work fine, but I can not rename anything (variables or modules). I use the example config of coc.nvim and after the shortcut <leader> rn, I can confirm a new name. However, it will not apply the change. I assume this is because the language server might not be correctly setup, even though I used the described setup in the README. Do you have any hints, what could cause this problem?

Toolchain argument missing

I'm using NixOs, and after following (I think) the instructions, I get this error:

[coc.nvim] Unexpected error initialising RLS - error running rustup
[coc.nvim] Error output from rust-client: Starting client failed: 
Error: Command failed: rustup component list --toolchain 
error: The argument '--toolchain <toolchain>' requires a value but none was supplied
USAGE:
    rustup component list --toolchain <toolchain>

Am I missing something?

Nixos documentation

I have successfully installed the plugin in my Nixos system, and I was wondering why the documentation suggests to install and use rustup. (Disclaimer: very new to this.)

When using the Mozilla overlay, correct me if I'm wrong, you already get a channel. Then you fire up vim and coc, and it uses rustup to download and install another stable (or whatever) channel.

Instead I simply put "rust-client.disableRustup": true in the config, no rustup in default.nix, and it seems to work.

Am I missing something?

How to disable the warning underline

Screen Shot 2019-12-22 at 10 27 49 PM

I've already got the warning by the "x" symbol on the left by another plugin(ale + rls). I think i don't need the the waning underline which coc-rls bring to me(In fact i don't need any warning from coc-rls). I have set {"rust.show_warnings": false} in coc-settings.json, but it doesn't work. So please tell me how to disable the warning informations.

coc-implementation doesn't work

First of all, thanks for that plugin 👍
Now, I am wondering why coc-implementation saying Implementation not found for clone() method in next code:

let opt: Option<i32> = Some(22);
opt.clone();

coc-definition jumps to pub trait Clone, thats seems legit. But I want to jump to impl<T: Clone> Clone for Option<T>, how to do that and why coc-implementation can't find it?

Looks like bug.

No completion for std crates

With the default configuration, I get no completion for crates/items in std. For example, completion at the following points fails with coc-rls but succeeds in VS Code. [cursor] marks the cursor position when completion should trigger:

use std::[cursor];
use std::thread::[cursor];
use std::collections::HashMap;

fn main() {
 let foo: HashMap<String, i32> = HashMap::new();
 foo.[cursor]
}

In the VS Code extension, I had to select my toolchain, etc. Is that required for coc-rls? Is there any other configuration required to get proper completions? I do get completion for 3rd-party crates and instances of types from 3rd party crates, so coc-rls is working to some extent...

Command error: request error nvim_call_function - Vim(let):E15: Invalid expression

Hello! I'm trying to figure out how to use coc-rls.
I have setup cargo, have updated (:CocCommand rls.update) coc-rls latest version @1.1.4, neovim :checkhealth is all ok, but when try to run .rs file i get this nasty message:

[coc.nvim] Command error: request error nvim_call_function - Vim(let):E15: Invalid expression: 'ps -o state= -o comm= -t '#{pane_tty}'  
 | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$''

CocInfo:

vim version: NVIM v0.5.0-139-g610755ff6
node version: v12.16.1
coc.nvim version: 0.0.75-d5e12d81b2
term: screen-256color
platform: linux

[coc.nvim] Setting sysroot to/home/sky/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
[coc.nvim] running: rustup run stable-x86_64-unknown-linux-gnu rls, at /home/sky/rust_learning/a3_rust-by-example

## Output channel: prettier
## Output channel: snippets

CocOpenLog (selected printout of Error message):

2020-03-08T22:33:53.834 ERROR (pid:19851) [commands] - Error: request error nvim_call_function - Vim(let):E15: Invalid expression: 'ps -o state= -o comm= -t '#{pane_tty}'   | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$''
    at /home/sky/.config/nvim/plugged/coc.nvim/build/index.js:14243:32
    at NvimTransport.parseMessage (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:10847:17)
    at DecodeStream.<anonymous> (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:10817:18)
    at DecodeStream.emit (events.js:311:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at DecodeStream.Readable.push (_stream_readable.js:209:10)
    at DecodeStream.Transform.push (_stream_transform.js:152:32)
    at DecodeBuffer.DecodeStream.decoder.push (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:13767:12)
    at DecodeBuffer.flush (/home/sky/.config/nvim/plugged/coc.nvim/build/index.js:12757:12)

How to fix the above problem, and have coc-rls start to work?

could not find `Cargo.toml`

could not find Cargo.toml

If you first open a non-Rust file and then open a Rust file, the following error occurs:
could not find Cargo.toml in /Users/nabezokodaikon/workspace/develop-private/learning-rust or any parent directory

High cpu usage when edit rust files!

Hi. i follow the instructions and successfully installed coc-rls plugin in neovim. there is an issue that when i open a .rs file, my cpu usage go to 80% and i can hear my Fan sounds that working hard!
This issues occur only if i edit rust files.

do not require rustup

I don't use rustup because I don't want another package manager. I just pacman -S rust and rls and analysis and src are available. But coc-rls doesn't work :-(

rust-client fails with internal compiler error

command

running :RustRun with the rust example from the website yields this error. However, running cargo run from command-line works fine.

Cargo.toml

[package]
name = "hello"
version = "0.1.0"
authors = ["luis"]
edition = "2018"

[dependencies]
ferris-says = "0.1"

main.rs

use ferris_says::say; // from the previous step
use std::io::{stdout, BufWriter};

fn main() {
    let stdout = stdout();
    let out = b"Hello fellow Rustaceans!";
    let width = 24;

    let mut writer = BufWriter::new(stdout.lock());
    say(out, width, &mut writer).unwrap();
}

versions

vim version: NVIM v0.3.4
node version: v12.1.0
coc.nvim version: 0.0.66
cargo 1.34.0 (6789d8a0a 2019-04-01)
rustc 1.34.1 (fc50f328b 2019-04-24)
term: xterm-256color
platform: linux

Error messages

error[E0432]: unresolved import "ferris_says"

Output channel: rust-client

{"message":"src/librustc/ty/context.rs:541: node_type: no type for node expr <Self>::SC_NEGATE_REQS (id=50338)","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":"error: internal compiler error: src/librustc/ty/context.rs:541: node_type: no type for node expr <Self>::SC_NEGATE_REQS (id=50338)\n\n"}
thread 'rustc
' panicked at 'Box', src/librustc_errors/lib.rs:620:9
note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.34.1 (fc50f328b 2019-04-24) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.