Questions tagged [plugin-coc]

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

Filter by
Sorted by
Tagged with
-1 votes
0 answers
12 views

I cannot rename variables when I try to refactor the code in Vim

I have a code refactoring question. I am using vim/coc/tsserver in my typescript project. The problem is that coc-rename doesn't work for me. When I try to rename any variable, I get an error: Error: ...
0 votes
0 answers
7 views

Coc Nvim automatically select all text between tags

I have mapped esc to < C-J> in .vimrc and whenever I try to go to normal mode after inserting some text inside any html tag using that mapping it selects all the character between that tag like ...
1 vote
1 answer
59 views

coc-pairs not working

I've followed the instructions at https://github.com/neoclide/coc-pairs to install the autopair extension for coc: :CocInstall coc-pairs After running this command, I get the following message: ...
  • 93
0 votes
2 answers
107 views

Neovim keep html tags indented in react/jsx files

When I edit a .html file I get this when pressing enter key: <div>|</div> <div> | </div> and while I edit a react file, the behavior is not what I was expecting: <div>...
0 votes
0 answers
78 views

How are formatters in CoC configured?

I have been using CoC for a few weeks now and I quite like it. Recently I started configuring the formatting options. I have put "coc.preferences.formatOnSave": true and configured .clang-...
0 votes
0 answers
26 views

How to tab autocomplete in command-line and search using CoC?

How can I have autocompletion in the colon command-line and during / search just as autocomplete works in my buffers?
  • 1,857
1 vote
1 answer
37 views

How to remove definition In between lines by coc-nvim

I want to remove the inline definition that come like this (underline parts): These are coming due to coc-nvim and I don't want to see them. How can I get rid of them?
0 votes
1 answer
87 views

How can I export a list of coc-extensions and install it on another machine?

I would like to make a file list of all my coc-extensions and afterwards install them in another vim environment. I am not able to save the output of the vim command :CocList extensions to a text file....
  • 111
0 votes
0 answers
14 views

Need to set colorscheme to run CocStart

I have installed coc.nvim with Vundle. But it never starts automatically. To make it works, I need to set colorschemes and run :CocStart whenever I open vim. I have tried to write those 2 commands in ...
0 votes
0 answers
51 views

coc-snippets tab to next placeholder

I'm currently trying to setup coc-snippets and have quite some problems with it. I'm currently using the snippets directory (I think they are interpreted as snipmate snippets). I have set as key for ...
0 votes
1 answer
89 views

Disable coc diagnostic popups

How do I disable coc diagnostic popups (such as unused variable)? I have suggestions disabled with "suggest.autoTrigger": "none" but I'm struggling to figure out how to disable on-...
1 vote
0 answers
99 views

coc-java server gets crashed

I'm trying to use vim and coc to work with java. I'm new on java language and this is confusing. I installed coc and node to use the coc-java server. Next I use CocConfig and write this to it: { &...
1 vote
1 answer
22 views

Is it possible to edit function definition box info with Coc + vim?

When I am writing php code, I often create a comment before a function. This comment also includes the comments for a parameter. Like this: /** * This function finds cheese. * @param $mix is the ...
  • 553
0 votes
1 answer
76 views

How to specify different tab widths for different languages? [duplicate]

I am using Neovim (v.0.8.0) along with nvim-lspconfig and neoclide/coc. It is working pretty well. The only problem being tab widths. If I am writing in say, Java or C, I use 4-space wide tabs, ...
  • 3
0 votes
0 answers
20 views

How can I enable html autocomplete in .tmpl files?

I'm editing .tmpl files which are mostly html with some template language syntax inside {{ double curly braces }}. I'm using COC for autocompletion and I want to be able to use the autocomplete ...
1 vote
1 answer
192 views

Change the keys for accepting coc dropdown?

When I type in Vim, I get autocomplete from coc. To accept one of the items on the list I need to press Ctrly. I would like to change this button to Enter but I cannot figure out how to do so. I do ...
  • 553
1 vote
1 answer
47 views

How can I configure Vim to work with bitcoin core C++ code and have intellisense like functionality?

I installed Conquer Of Completion (COC) plugin and now I can edit C++ projects with Vim taking advantage of syntax highlighting, autocompletion, inline error messages, etc. But when I try to open ...
1 vote
1 answer
176 views

How to get similar completion from coc as ycm?

I've been user of YCM for years now. Recently discovered coc-vim and trying it out. Looks like it provides loads of additional features on top of what YCM has. One thing that I can't figure out how to ...
  • 151
0 votes
0 answers
435 views

Coc.nvim doesn't work correctly

Yesterday, I installed coc.nvim in vim on windows. I remember that it showed up the suggestion tab. But today, I removed go and visual studio, then it didn't show up anymore. I tried to reinstall Go, ...
1 vote
1 answer
587 views

nvim (plugged with coc, coc-clangd) is showing parameters for every function. How do disable it?

my nvim (plugged with coc + coc-clangd) is showing the paramters for every function, how do I disable it ? I'm using a common vimrc for vim and neovim, but this problem only happens in neovim. FILE *...
  • 111
0 votes
1 answer
328 views

Indent changes when using CoC, how do I stop this?

I have set up my init.vim file to always use tabs as indentation by adding this to it: set tabstop=4 set shiftwidth=4 set noexpandtab Ever since I installed CoC to use Rust's language server, it ...
0 votes
1 answer
339 views

how to accept tabnine suggestion?

I'm using tabnine and COC. I have a ~/.vimrc with the following lines: inoremap <expr> <C-j> pumvisible() ? "\<C-N>" : "j" ...
2 votes
1 answer
626 views

Automatically add parentheses to functions on Tab using coc.nvim autocompletion

I just started using coc.nvim with coc-pyright on Vim 8.2.5050. In the GitHub readme of the coc.nvim plugin, I found instructions to get autocomplete working with the Tab key. While this is working ...
  • 23
0 votes
0 answers
55 views

Clojure-lsp in vim - outdated message box doesn't go away?

I recently added the coc extension for clojure. When I opened Vim it asked me to install clojure-lsp from Github. I did that. Now, every time I open my nvim with a clojure file I get a warning to ...
  • 553
0 votes
1 answer
226 views

Slow down system when open nvim [closed]

When I open neovim, system slows down. Even neovim's itself. switching between buffers take one or two seconds. I think this is because of autocompletion system. I use Coc. When I run neovim, a ...
2 votes
1 answer
61 views

Autocomplete LateX citations in chapters directory

Currently writing my thesis using LateX, I'm trying to obtain autocomplete on my citations when writing the chapters. The directory structure is that each chapter has its own main.tex files (template ...
  • 23
1 vote
1 answer
901 views

How can i use Enter to select item from popup menu?

I am using UltiSnippets let g:UltiSnipsExpandTrigger='<None>' let g:UltiSnipsJumpForwardTrigger = '<tab>' let g:UltiSnipsJumpBackwardTrigger = '<S-b>' let g:coc_snippet_next = '<...
  • 35
1 vote
1 answer
395 views

neovim lsp configuration

I'm a begginer in vim/neovim world. I understand that lsp is for autocompletion, auto import, signature info, etc... So I have installed coc.nvim. But I have some question about the concept : if I ...
  • 111
0 votes
1 answer
793 views

How to set prettier indents?

I have set tabstop to 4. But when I use prettier, it defaults my indentations to 2 spaces. How do I change this? I am using the coc prettier extension. const thing = () => { var hi = 1; //...
  • 553
0 votes
0 answers
330 views

coc.nvim and formatSelected with golang not working

Getting this error message when running the shortcut: [coc.nvim]: Error on "formatSelected": formatRange provider not found for current buffer, your language server doesn't support it. ...
0 votes
0 answers
55 views

forced inserted ^Z in coc

I'm using the plugin coc for autocompletion. My problem is that when coc opens the pop up menu with the completion items and I continue typing then a ^Z character is inserted in the buffer as shown in ...
1 vote
2 answers
798 views

How do I link CoC to the correct Python interpreter?

I just installed Ubuntu linux on my laptop and made sure to install python. After installing Python, I type the command python3 --version and found that I got version 3.9.7, which is stored in the /...
  • 119
1 vote
1 answer
825 views

Problem with coc-clangd

I use coc and coc-clangd for C/C++. When I want to use gtk I get this message: When I compile the file with command below, the process completes successfully. gcc `pkg-config --cflags gtk+-3.0` -o ...
3 votes
1 answer
480 views

Create highlight group that modifies an existing one

I would like to create a new highlighting group that is exactly like an existing one except for one (or more) properties. For example, the new group could be an underlined version of the existing one. ...
  • 131
0 votes
0 answers
110 views

How can I config vim to show me value of a variable / const?

I have a vim configuration with COC installed where I can gd to jump to a definition. How can I config it, so it will, upon hovering on the word (with cursor, not mouse), will do the following: if is ...
3 votes
1 answer
540 views

Validate and autocomplete JSON by schema

I've got a project with some relatively complicated .json file structure, and it's kind of pain to recall this structure, when I always need to reference another files to do it right. So I try to ...
0 votes
0 answers
56 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-...
  • 101
1 vote
1 answer
446 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 ...
1 vote
1 answer
103 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 ...
0 votes
1 answer
198 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 ...
  • 113
1 vote
0 answers
341 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
1 answer
1k 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, ...
  • 121
0 votes
1 answer
421 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
0 answers
406 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, ...
  • 117
0 votes
1 answer
328 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(...
  • 195
0 votes
0 answers
2k 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 ...
0 votes
1 answer
217 views

Vim Formatter vs VsCode Formatter Problem with GIT

I am using Vim (neovim) for the past couple of weeks now. I am facing one problem with the way vim formats the code. My other team members uses vscode which formats JS file on Save something like this:...
1 vote
1 answer
218 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). ...
  • 145
0 votes
1 answer
259 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') ...
  • 1,075
1 vote
0 answers
871 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-...
  • 141