Comments (9)
coc-rls has problem with reading the true WORKINGDIR.
It doesn't use cwd, it resolve Cargo.toml
from current file.
I can't reproduce the problem. Consider upload full output by use "tsserver.trace.server": "verbose",
in configuration: "tsserver.trace.server": "verbose",
from coc-rls.
Sorry, I followed your step, but cannot get log as a result of "tsserver.xxx command not found
".
But I tried to config rls
in coc-settings.json
as following:
"rls": {
"command": "rustup",
"args": ["run", "nightly", "rls"],
"filetypes": ["rust"],
"settings": {},
"enable": true,
"trace.server": "verbose"
}
The problem was reproduced, and I got the log here:
https://paste.ubuntu.com/p/8xvWPY8XDr/
from coc-rls.
Do you have Cargo.toml
file in directory file:///Users/ionizing/Documents/tests/rusttest/CLRS
?
Maybe your cargo
is just too old, and it can't generate the file for you, try upgrade.
from coc-rls.
No. Cargo.toml
exists in file:///Users/ionizing/Documents/tests/rusttest/CLRS/coctest
, and the rust project root directory is file:///Users/ionizing/Documents/tests/rusttest/CLRS/coctest
. When I delete the .git/
in CLRS
, both coc-rls
and rls
works well.
from coc-rls.
I've fixed this issue in coc-rls, to fix the problem with configuration, you need to add "rootPatterns": ["Cargo.toml"],
to rls
section.
from coc-rls.
I found a workaround: cd into the root dir of project, open src files via NERDTree
and Cargo.toml
can be found correctly.
from coc-rls.
I ran into this today... This only happens when you have a git project with multiple rust crates inside, because the default rootPatterns look for the .git
directory. Which makes it work without config by chance on "normal" rust crates, because they likely happen to have a .git
dir at the same root as the Cargo.toml
.
to make this work for sub-crates I opened the config of coc in vim with command :CocConfig
and pasted this:
{
"languageserver": {
"rls": {
"command": "rustup",
"args": ["run", "nightly", "rls"],
"filetypes": ["rust"],
"rootPatterns": ["Cargo.toml"]
}
}
}
this seems to be the minimal config to make it work. I don't fully understand how the coc-rls plugs into coc, but I'd vote for injecting the "Cargo.toml"
into rootPatterns by default when the coc-rls is loaded. This way it actually looks for the cargo.toml in every case, and no custom config file writing is necessary (just having languageserver -> rls -> rootPatterns
is not enough, all of the above is needed, probably causing other side-effects?)
from coc-rls.
https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders
from coc-rls.
thanks, now using autocmd FileType rust let b:coc_root_patterns = ['Cargo.toml', '.git']
in .vimrc
from coc-rls.
Related Issues (20)
- coc-implementation doesn't work HOT 1
- Nix + macOS makes RLS fail to build HOT 1
- Suppress startup message HOT 3
- CocAction('format') using 2 spaces instead of 4 HOT 6
- Option to not to ask to install RLS? HOT 4
- rls doesnt start under cygwin vim HOT 3
- "Run Test" code lens issues bare "cargo run"
- Go to definition not working for rust stdlib HOT 2
- Fix prefix for coc-settings in the README
- Cant get autocompletion HOT 2
- NeoVim crashing on auto complete HOT 1
- Question: Is rust-analyzer engine supported? HOT 2
- Doesn't install (Timeout) HOT 1
- Conflict with existing keybindings in init.vim HOT 2
- Wondering how to activate this feature?
- Async and detect slow HOT 1
- coc-rls installation/usage without rustup? HOT 2
- how can I set tab width? HOT 1
- How to disable expandtab feature? HOT 1
- The last component of the type is always missing in floating window. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-rls.