Closed notskm closed 5 years ago
It's problem of your neovim configuration, use set noswapfile
in your init.vim to avoid that.
I would prefer not turning off swap files if possible. I find it weird that Vim works fine with swapfiles enabled, but Neovim doesn't. This only seems to happen when jumping around using coc.nvim features, as well.
Please provide minimal vimrc with nvim -u mini.vim
. I can't reproduce it with minimal init.vim
set nocompatible
set runtimepath^=/path/to/coc.nvim
filetype plugin indent on
syntax on
set hidden
Could be some wired problem with neovim on windows.
set nocompatible
set runtimepath^=~/AppData/Local/nvim
filetype plugin indent on
syntax on
set hidden
call plug#begin('~/AppData/Local/nvim/plugged')
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': 'yarn install'}
call plug#end()
call coc#config("languageserver", {
\ "ccls": {
\ "command": "ccls",
\ "filetypes": ["c", "cpp", "cuda", "objc", "objcpp"],
\ "rootPatterns": ["compile_commands.json", ".ccls-cache", ".git/", ".hg/"],
\ "trace.server": "verbose",
\ "initializationOptions": {
\ "cache": {
\ "directory": ".ccls-cache"
\ }
\ }
\ }
\})
Result from CocInfo
Describe the bug Neovim complains about a swap file already existing when using
coc-definition
orcall CocAction('jumpDefinition')
on Windows. Vim does not complain.To Reproduce Using C++ and ccls or clangd with compile_commands.json,
:call CocAction('jumpDefinition')
or use thegd
mapping in the readme to jump to the definition of the function.If a swap file exists for the file you're jumping to, Neovim complains about the swap file.