Comments (11)
Also checkout https://github.com/neoclide/coc.nvim/wiki/Statusline-integration for include g:coc_status
in your statusline, so you can see the server status.
from coc-rls.
The example is used in languageserver
section, but you don't need that when using extension, I should update the example.
from coc-rls.
It may be unrelated to your issue. This doesn't happen for me with Rust, completion is working fine, at least so far on the code I've tried until now, but the same thing happens for me when using coc-pyls, and it always happen when I open a script outside of its directory, like vim ~/.local/bin/foo.py
instead of cd ~/.local/bin && vim foo.py
. The latter works fine, the former hangs. But I think it may possibly be a pyls issue.
You may try describe whether that affects you. You should also state whether it happens for specific source code and not for other cases, in that case, you should post it (it will be probably a RLS issue though).
from coc-rls.
500ms is too low, server could be slow sometimes.
Try change coc.preferences.timeout
to 2000
in your coc-settings.json.
from coc-rls.
Thanks!
Followup: I do get auto-complete in Rust for core things - but it doesn't seem to work for imported crates properly.
I'm very new to Rust and getting into it by way of Wasm so maybe things are getting confused by the presence of both Cargo.toml and tsconfig.json in the project root?
Here's the stuff I've added to my config now:
coc-settings.json
{
"coc.preferences.timeout": 5000,
"coc.preferences.acceptSuggestionOnCommitCharacter": true,
"tslint.enable": false,
"coc.preferences.autoTrigger": "always"
}
init.vim
"Status line
function! StatusDiagnostic() abort
let info = get(b:, 'coc_diagnostic_info', {})
if empty(info) | return '' | endif
let msgs = []
if get(info, 'error', 0)
call add(msgs, 'E' . info['error'])
endif
if get(info, 'warning', 0)
call add(msgs, 'W' . info['warning'])
endif
return join(msgs, ' '). ' ' . get(g:, 'coc_status', '')
endfunction
" Airline statusline integration
let g:airline_section_error = '%{airline#util#wrap(StatusDiagnostic(),0)}'
Btw the airline just shows "RLS" - and flashes through some other stuff as I type... not sure the right way to set that up either.. sorry!
from coc-rls.
Seems g:airline_section_error
could only be number, there should be some way to integrate a custom varialbe or function with ariline, but I don't know either.
Could be RLS have trouble when analyzing your project, you can get the output channel: https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel
from coc-rls.
Oh interesting... it seems I am getting info for some third-party crates but not others!
Could be just my lack of Rust knowledge and maybe I'm doing something wrong... don't want to take this thread off-track so feel free to close it, since completions are definitely coming through for at least some crates :)
Out of curiousity -
I don't see anything with :CocCommand workspace.showOutput
.. is there a window I need to open?
Also, is this a legal coc-settings.json
? I get a warning that tsserver
and rls
are invalid keys:
{
"coc.preferences.timeout": 5000,
"coc.preferences.acceptSuggestionOnCommitCharacter": true,
"tslint.enable": false,
"coc.preferences.autoTrigger": "always",
"rls": {
"command": "rustup",
"trace.server": "verbose",
"args": ["run", "nightly", "rls"],
"filetypes": ["rust"],
"settings": {}
}
}
Thanks again!
from coc-rls.
The configuration is invalid, for coc-rls, checkout https://github.com/neoclide/coc-rls#configuration for configuration keys you can use.
from coc-rls.
Oh- does this not contradict the example in https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel ?
from coc-rls.
It may be unrelated to your issue. This doesn't happen for me with Rust, completion is working fine, at least so far on the code I've tried until now, but the same thing happens for me when using coc-pyls, and it always happen when I open a script outside of its directory, like
vim ~/.local/bin/foo.py
instead ofcd ~/.local/bin && vim foo.py
. The latter works fine, the former hangs. But I think it may possibly be a pyls issue.
For what is worth, that's not happening anymore, issue is gone.
from coc-rls.
Rls can't response when it's busy, make sure your have statueline integration to get the status, checkout :h coc-status
.
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.