coq_nvim icon indicating copy to clipboard operation
coq_nvim copied to clipboard

How to complete rust?

Open lucasjinreal opened this issue 2 years ago • 5 comments

Hi, I have installed coq, and also COQdeps installed requirements.

But currently, it can only promot on buffer (exited chars in doc), but can not promot functions, modules, keywords in rust.

image

How can I make it fully completion?

Same on python scripts:

image

lucasjinreal avatar Oct 01 '22 08:10 lucasjinreal

Hi, did you solve this at all? I am struggling to setup python LSP as well, there seems to be no instructions on how to configure it

EnricoSteez avatar Nov 11 '22 14:11 EnricoSteez

@jinfagang @EnricoSteez

You need the appropriate LSP (Language Server Protocol) installed.

For example, I use nvim and nvim-lspconfig for most of my LSP needs. My editor is not currently configured for Python, but you should find a suitable option under Configs, rust_analyzer for rust. (You will need to install the LSP yourself, or find a suitable auto-installer, either way is pretty straightforward).

If you're not using nvim there should be similar solutions for vim, it's been a while since I used vanilla vim actively, so don't know what the current goto is!

Hopefully that pushes you in the right direction 🙏 nvim-lspconfig requires a bit of configuration, but I believe in you!

Also mentioned in COQ docs

zArubaru avatar Nov 12 '22 11:11 zArubaru

@zArubaru I have pyright set up and working, I even used git_ancestor so that it picks ups the correct project root dir. When I run :LspInfo, everything is working correctly. But still, coq does not show the completions from pyright, only from other sources such as TMUX, current BUF and SNIPpets

EnricoSteez avatar Nov 12 '22 14:11 EnricoSteez

Any updates here? Rust LSP completions does not show up in the completion list. However python with pyright lsp server works fine. If there is someone who uses COQ with Rust, please, share the configuration 🙏

BugLight avatar Mar 17 '23 21:03 BugLight

I solved this by setting vim.g.coq_settings = { limits = { completion_auto_timeout = 0.2 } }, because it seemed like the rust LSP could not catch up with the refresh rate of coq_nvim.

Docs

wiebecommajonas avatar Nov 16 '23 09:11 wiebecommajonas