Questions tagged [plugin-coc]

Intellisense engine for vim8 & neovim, full language server protocol support as VSCode

Filter by
Sorted by
Tagged with
9
votes
2answers
6k views

Change color of CoC suggestion box

I successfully installed CoC in my Vim to have some code-suggestions/completions while coding in Rust. It works fine, but I want to change the color and basic looks of the suggestion box. I tried ...
8
votes
3answers
6k views

open coc-definition in new split in coc

I am using coc.vim in neovim. coc.vim suggests the following mapping for jumping to the definition of a class/method. nmap <silent> gd <Plug>(coc-definition) If there is only a single ...
5
votes
1answer
5k views

How can I hide and scroll popup window in coc.nvim in Vim?

How can I scroll and hide a floating window in Vim using the coc.nvim plugin? I added these mappings to my vim.rc file but I still cannot manage it. I would expect if I press ctrl+f once I have a ...
4
votes
2answers
5k views

How to format files on save using black with neovim and coc

I'm trying to have python files format on save using black and neovim, with coc. Coc config I have the following coc config: { "coc.preferences.useQuickfixForLocations": true, "coc....
3
votes
2answers
708 views

Is there a way to toggle coc's linting?

I'd like to be able to turn it off when starting a new project and turn it back on when I have written more code.
3
votes
1answer
124 views

Vim getting stuck after selecting a file in fzf preview

My FZF preview window works fine as long as I'm in some small project, with fewer files. But when I'm in some node project with node_modules and a ton of files, after selecting the file I want to jump ...
3
votes
1answer
2k views

Multiple plugin managers [duplicate]

I found out that a plugin I really like doesn't support the plugin manager I like, So the question is, can I use multiple plugin managers at the same time with vim? If so, I think I can use another ...
2
votes
2answers
982 views

Configuring CoC -- open suggestion-box with shortcut only

I successfully installed CoC in my Vim to have some code-suggestions/completions while coding in Rust. It works fine, but I want make the suggestion-box only show up when I press a key-shortcut (E.g ...
2
votes
1answer
145 views

Why use coc and not only the single plugins providing code completion for a language?

I'm trying to wrap my head around the necessity of the coc plugin, since if I have it installed it still needs the coc-vimtex plugin for LaTeX support (which I get is necessary since not all languages ...
2
votes
1answer
1k views

Changing colour of pop-up coc.nvim lint warning in custom colourscheme

I'm using the colorscheme monokai and coc.nvim with pylint to lint Python code in Vim (terminal, not GUI, in terminal.app on macOS which I'm pretty sure has 256 colours). The linting pops up on a ...
2
votes
1answer
514 views

CoC Python reports unresolved import in git subfolder

I have a Python project in a subfolder within my git repo: .git api/ requirements.txt .venv/ myproj/ __init__.py foo.py bar.py The virtual environment is installed in the api ...
2
votes
1answer
525 views

How to press ESC only once to close suggestions list and exit insert mode

When using CoC.nvim's suggestion list, I often find myself pressing Esc twice to return to normal mode - once for cancelling CoC's list session and once to actually exit insert mode. I find that ...
2
votes
2answers
36 views

Concatenate mapping with zt mapping

I'm using CoC and coc-python, and there is the gd mapping, which goes to the definition of a symbol. The mapping is defined as: nmap <silent> gd <Plug>(doc-definition) Now, I want to ...
2
votes
0answers
291 views

Getting LSP running for Julia using Coc-Plugin

so I'm trying to get LSP working for Julia using the CoC Plugin. It works for python or HTML. So I'm using: Coc-Plugin: https://github.com/neoclide/coc.nvim CoC-Extension (coc-julia): https://github....
2
votes
0answers
2k views

View pylint errors using coc and neovim

For the following code there is an error in the gutter, but I don't know how to view the actual message for it. Similarly here: In the bottom right of the editor are warnings and errors: But I don'...
2
votes
1answer
459 views

View full (non-truncated) diagnostic error

I am using coc.nvim to get "intellisense" on my project. The diagnostic warnings & errors are great. However, sometimes those error messages are quite long, but the coc diagnostics ...
2
votes
1answer
90 views

How to highlight multiple words that are unrelated

I need to highlight multiple words that are unrelated, eg: aaa bbb ccc ddd I would like to highlight aaa and ddd, and keep cursor at both of those words, so when I try to change the word for example ...
2
votes
0answers
237 views

(coc.nvim) RLS warning: ...use crate_blacklist instead

I've got a warning on start: [coc.nvim] RLS configuration option use_crate_blacklist is deprecated: use crate_blacklist instead Probably I have to put into my coc-settings.json "rust.crate_blacklist"...
1
vote
1answer
41 views

why does COC extension changes the displayed name of vim windows

I have recently installed COC extension to vim and I am enjoying so far, but I started to have a problem once I had installed the COC extension for java and clang. So after the very moment after I ...
1
vote
1answer
107 views

(coc-)vimtex .bib completion strange suggstions

I've noticed that (coc-)vimtex gives suggestions about bib(la)tex keys and allows too searching in the entries of the literature. Now this search works sometimes for me, sometimes not (see the gif). ...
1
vote
1answer
261 views

How to remap command based on buffer type?

I have coc.vim installed and added suggested mappings, then I installed vim-fugitive and I want to remap the "Toggle an inline diff of the file under the cursor." fugitive_= to Tab but the coc.vim is ...
1
vote
1answer
328 views

Unmap <c-n> / <c-p> in completion menu to use as previous / next snippet placeholder with Coc

My completion mappings scheme with coc is the following: <c-@> (ctrl-space): trigger the menu / use the selected item (or the first one) <c-j> and <c-k>: navigate the list (or also ...
1
vote
1answer
658 views

Set CoC nodejs path dynamically

Currently for CoC I am setting the nodejs path like this: let g:coc_node_path = '/usr/local/.nvm/versions/node/v12.4.0/bin/node' But I want this variable to be set to the output of which node. How ...
1
vote
1answer
129 views

What is the "stuck text" that happens on my screen as a byproduct of a plugin? How can I remove it?

When I'm using Vim in the terminal, I sometimes get stuff like this: The square bracket floating is what I'm talking about. When my autocompleter plugin stops completing, sometimes it "forgets" to ...
1
vote
1answer
236 views

How do I view the linting errors?

When editing a python file I get an error indicator (>>) at line 118 : This happened after I installed the coc-python plugin. I understand that this line fails some kind of linting setting ...
1
vote
0answers
35 views

coc.nvim having issues with background color and error messages

Above is what I see in NeoVim 0.4.4 (on Ubuntu) when I get a type error using coc.nvim and the Haskell Language Server. My configuration for all background and theme related things are: syntax on ...
1
vote
0answers
369 views

NeoVim latest version autocompletion opens and closes immediately

I am new to Vim and NeoVim, I setup the latest NeoVim on MAC using brew install nvim --head. I setup the latest verison for the lsp suppport. I installed the CoC plugin and the CoC-go plugin for auto-...
1
vote
0answers
891 views

How to use colored icons for autocomplete menu nvim.coc?

I am using neovim-qt for typescript react development. From last week I am configuring my neovim. I have configured coc.nvim which is giving pretty good autocompletion. I wanted to add icons for ...
1
vote
0answers
36 views

How to change colour of reference counts next to definitions

I'm using CoC with the elm-language-server, and I've found that for each top level definition, at the end of the line I have an extra annotation printed that gives a reference count and whether it's ...
1
vote
0answers
20 views

Signature pop-up describes dataclass as "The most base type"

I'm using coc-python for Python IDE-like features. If I define a dataclass I would expect the signature pop-up to show me which fields an instance of this class expects. Instead I get: MyClass() ------...
1
vote
1answer
2k views

Correct way to setup python version for coc

I want to set PYTHONPATH and python interpreter according to projects I am working on. I am working both on projects involving python 2.0, and ones involving python 3.0. There is the concept of ...
0
votes
2answers
227 views

How to get emoji completion in markdown with `:<emoji>`, using neovim and coc

I'm sure that I've seen it so that one is able to use :<emoji and there's a pop up menu to select from, I can't seem to get this working though. I tried installing: https://github.com/junegunn/vim-...
0
votes
2answers
963 views

On opening a .js file, auto completion is working but an error message is showing on startup

When I'm opening my app.js file in the vim status bar following error is shown [coc.nvim] Failed to load the ESLint library for the document /mnt/d/js/my_take/js_sandbox/app.js Even though the ...
0
votes
1answer
69 views

How to suppress error message of autocmd command when the `silent` doesn't work?

I'm using Coc.vim and I've created an issue on their GitHub, but I'm not sure about whether this can be done by modifying the line I'm using: autocmd CursorHold * silent call CocActionAsync('doHover') ...
0
votes
2answers
1k views

coc.nvim with pyright

I have coc.nvim with pyright installed. I added the following to my .vimrc nmap <silent> gd <Plug>(coc-definition) nmap <silent> gy <Plug>(coc-type-definition) nmap <silent&...
0
votes
2answers
1k views

How to scroll down the output of coc help without using the mouse?

When coc prompts with information about what a class / function does there's help to the right, but if I want to scroll down within this help I have to use the mouse. I'm wondering if there's a nicer ...
0
votes
0answers
37 views

How can I end up in not visual mode after Coc inserts code?

I am using Coc through vim-plug in Neovim. Coc allows the use of so-called code actions, which, when triggered, allows different Coc plugins to do stuff. For instance, when writing Rust, coc-rust-...
0
votes
0answers
21 views

Autocomplete strings with spaces

Am using conqueror of completion with latex autocomplete. Created a label with spaces. If i type \ref{, autocomplete will display that label as one of the options, however ctrl+n will only complete ...
0
votes
0answers
70 views

nvim: how to manually clear popups which do not clear themselves?

While it may not be the only culprit, coc.nvim is a bit notorious for leaving popups hanging around the screen long after they should be cleared. Sometimes, as in the gif below, dangling popups will ...
0
votes
0answers
17 views

Is it possible to sort the list of recommendations on coc.vim by type?

On coc.vim, it recommends functions, classes, interfaces, properties and other things like the following: I know their types by checking the letters on the right. On the image above, I means ...
0
votes
0answers
29 views

Autocompletion not working as expected in COC-snippets

I am currently using Coc, together with a few extensions, including coc-java and coc-snippets. However I found that some of the options I see in the pop-up-menu(PUM for short). do not work as expected....
0
votes
0answers
51 views

How can use Tab to navigate completion list

I use both coc.nvim and Ultisnip for completion in vim. coc-snippet does not support some feature in Ultisnip so I use Ultisnip instead But I have a problem is <Tab> for trigger completion in ...
0
votes
0answers
25 views

How to fix fzf preview window?

I'm using SpaceVim. I use coc.nvim to find references of a variable and it uses fzf preview window to display the results because of the coc-fzf plugin . I want the fzf preview window not to be closed ...
0
votes
0answers
27 views

Coc and YouCompleteMe show errors on c++ code that compiles perfectly

I'm trying to configure vim/nvim to write c++ code in it. I've tried installing YouCompleteMe in vim, and now I tried installing COC in nvim to compare the two. I've got a c++ project which compiles ...
0
votes
1answer
225 views

Configuring coc.nvim coc-solargraph with standardrb for RSpec files

I am trying to configure coc.nvim for my vim 8.2. I mapped my formatting to leader-d with: nnoremap <Leader>d :call CocAction('format') <CR> which works fine for ruby filetype. However, ...
0
votes
1answer
69 views

How to set the intelephense workspace for CoC phpls?

I'm using coc-phpls to edit a plugin project inside a bigger project. i.e. the dir structure is like /var/www/example/ /var/www/example/libraries/ /var/www/example/plugins/myplugin ← my working dir. ...
0
votes
0answers
32 views

Coc Diagnostic Language Server Does not underline the column with the issue

I am using clj-kondo linter and recently, the column with the error does not get underlined. Now my linting results look like this: The lines 5 and 9 correctly display that there are warning. If I ...
0
votes
0answers
51 views

coc diagnostic signs displaying incorrectly

My coc settings are practically copied and pasted from nicknisi/dotfiles. I'm using SourceCodePro from Nerd Fonts. { "suggest.enablePreview": true, "codeLens.enable": true, ...
0
votes
0answers
45 views

Conflicting suggestions on Coc.nvim with Prettier and ESLint

I am working in a team and none are using Vim. Most are use VS Code, and things are working fine for them. However, I have this problem: ticket.additionalNocs.forEach((additionalNoc) => nocs.push(...
0
votes
0answers
100 views

How do make autocompletion (Coc) work on Tab instead of Enter?

I use Coc-Python for Python autocompletions. It completes on Enter, however, I want to complete only on pressing Tab and reserve Enter for its normal behavior which is entering a new line. How do I do ...