Questions tagged [plugin-coc]
Intellisense engine for vim8 & neovim, full language server protocol support as VSCode
69
questions
0
votes
1
answer
18
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 = '<...
0
votes
1
answer
36
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; //...
0
votes
0
answers
34
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
36
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 ...
0
votes
2
answers
75
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 /...
1
vote
1
answer
231
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 ...
2
votes
1
answer
53
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.
...
0
votes
0
answers
26
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 ...
2
votes
1
answer
211
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
45
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
0
answers
30
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 ...
1
vote
0
answers
123
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
0
answers
29
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
0
answers
98
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....
1
vote
1
answer
46
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
113
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 ...
1
vote
0
answers
109
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
...
0
votes
0
answers
57
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
0
answers
83
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
1
answer
621
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
1
answer
185
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
75
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
0
answers
142
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
0
answers
93
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
0
answers
453
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
151
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
155
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). ...
0
votes
1
answer
115
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
vote
0
answers
598
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-...
0
votes
0
answers
28
views
coc-snippets popup preview with strange content and odd formatting
Cheers! I'm having an odd problem with coc + coc-snippets and javascript. The preview popup for previews is formatted in a strange way:
It shows this string "javascript.jsx" and there is no ...
2
votes
2
answers
58
views
Sending two keys in series during autocompletion confirmation
I have the following mapping:
inoremap <expr><CR> pumvisible() && complete_info().selected != -1? "\<C-y>" : "\<CR>"
inoremap <expr><Space&...
1
vote
0
answers
1k
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 ...
2
votes
2
answers
44
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 ...
0
votes
2
answers
2k
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&...
4
votes
1
answer
162
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 ...
1
vote
0
answers
42
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 ...
0
votes
0
answers
163
views
How to display additional info for a completion option in second popup menu
The coc.nvim plugin has a really cool feature where the completion, or at least the python completion, will have additional information about the option in a second popup menu. I have looked through a ...
3
votes
2
answers
1k
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.
2
votes
0
answers
337
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....
1
vote
0
answers
22
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()
------...
2
votes
1
answer
165
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 ...
0
votes
1
answer
141
views
coc.nvim - no rome found in your project root
I have the latest version of Ubuntu and recently installed vim. I'm trying to get coc.nvim to work. See https://github.com/neoclide/coc.nvim . This is an autocompletion package (and then some) for vim ...
1
vote
1
answer
484
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 ...
0
votes
0
answers
90
views
clang_complete: No python support available
I have installed SpaceVim. My init.toml file looks as follows:
#=============================================================================
# dark_powered.toml --- dark powered configuration example ...
4
votes
1
answer
2k
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 ...
1
vote
2
answers
318
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-...
2
votes
0
answers
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'...
7
votes
3
answers
8k
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....
1
vote
2
answers
2k
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 ...
2
votes
1
answer
647
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 ...