Closed SergioRibera closed 3 years ago
Can you please paste the actual text of your init.vim? I'm not going to type it out to try to repro... Ideally, post your full init.vim so I can try it myself.
What OS is this?
Just guessing here but here are some things to try:
I have my init.vim somewhat dismembered and maybe with a lot of things wrong, so please don't judge xD. I forgot to put my operating system, I'm sorry.
SO: ArchLinux init.vim: https://termbin.com/eqm9 plugins.vim: https://termbin.com/hyjg pluginconfigs.vim: https://termbin.com/22q34 shortcuts.vim: https://termbin.com/494q themes.vim: https://termbin.com/cpwv
I did not manage to generate a log file for vim execution but if I did it would be very helpful.
OK it's a bit hard to debug a split up config like this. Could you try commenting out these lines and see if that changes things?
source ~/.config/nvim/pluginconfigs.vim
source ~/.config/nvim/shortcuts.vim
source ~/.config/nvim/themes.vim
And if it does, narrow it down to which script is the culprit?
I copied your config and tried running in archlinux with just OmniSharp-vim and vim-sharpenup. There are lots of errors due to other plugins and some strange config but after commenting some stuff out it works, nothing is hanging.
You say nvim just crashes and closes when you open a .proj file? This plugin shouldn't do anything in a .proj file...
Oh I think I see the problem. You are installing plugins into your autoload
directory. I bet that's the culprit. This line:
call plug#begin('~/.config/nvim/autoload/plugged')
should be:
call plug#begin('~/.config/nvim/plugged')
(Before making this change, exit all nvims and just move the dir, to save vim-plug re-installing all your plugins:
mv ~/.config/nvim/autoload/plugged ~/.config/nvim/plugged
The previous comment is correct and you should definitely move that plugged
dir out of autoload
... but it still works for me like that. I have copied your entire config and there are no errors. But there are some worrying things there that I think could be causing problems. Like these autocmds, which are not in augroup
s,:
au BufRead,BufNewFile *.ino,*.pde set filetype=cpp
" == AUTOCMD END ================================
autocmd FileType * command! -nargs=0 Prettier :CocCommand prettier.formatFile
And the mkview
/loadview
autocmds.
Can you tell me exactly how you're producing the issue? Can you share the project?
I just tried everything you suggested, I moved my plugged folder to the place you mention, then I tried to open other c# projects and the truth is that the problem persists :c
OK. Let's try narrowing down what it is in vim-sharpenup which is causing conflicts, by disabling the individual parts of this plugin.
" Disable codeaction lookup
let g:sharpenup_codeactions = 0
" Disable mappings
let g:sharpenup_create_mappings = 0
You haven't added lightline integration so don't need to do anything there.
So if you add those 2 lines above, does the error go away? What about with just one or the other?
OK. Let's try narrowing down what it is in vim-sharpenup which is causing conflicts, by disabling the individual parts of this plugin.
" Disable codeaction lookup let g:sharpenup_codeactions = 0 " Disable mappings let g:sharpenup_create_mappings = 0
You haven't added lightline integration so don't need to do anything there.
So if you add those 2 lines above, does the error go away? What about with just one or the other?
Apparently putting this in fixed it and now I can load any project without problems, but my question would be does this take away from my functionality? Because if there are certain things of this plugin that I would not like to lose, for example that popup that you open when you run \os
Yes these lines disable all of the plugin functionality 😄
Can you try with just one of those lines, then the other, and work out which one is causing the error?
The popups I was opening are just OmniSharp-vim popups, but using the mappings which vim-sharpenup creates automatically. I was using \osd
for the documentation popup (:OmniSharpDocumentation
) and <-\>
for the signature help (:OmniSharpSignatureHelp
). You already have your own mappings for omnisharp so you possibly don't need the vim-sharpenup ones, just map the OmniSharp-vim functions you want.
Thank you very much for all your help and patience, it has worked and I will be looking in depth to see what is causing this problem.
Just to let you know, the problem appears at the moment of activating this, see if it helps you.
let g:sharpenup_codeactions = 0
Sorry, I am a bit unsure which line is making the error go away. Each of those 2 lines disables part of the vim-sharpenup functionality.
So if you disable the mapping creation, your config is working correctly? You get the lightbulb icon (💡) popping up in lines where there are code actions available?
One last thing to test, if you don't mind (since I can't repro locally): if you add finish
in your init.vim after sourcing all your scripts, at line 6, do you still get errors? You've already tested disabling all the other parts of your config, but not the other contents of your init.vim, so it would be good to know if something in the rest of the init.vim is conflicting somehow.
Oh yes, I'm very interested in helping you, I'll let you know:
now I will try to deactivate all my configuration except my init and my plugins and see what happens with all the default settings.
Apparently it works without loading the other settings, but I still don't see the lightbulb icon.
I come to update the situation, something in my pluginconfigs.vim
file is not liking to coexist with sharpenup
and I have strong suspicions that Coc-vim
is the culprit..
I found the problem from the root and I'm sorry for the inconvenience, the problem is that I use a terminal (custom fork of st-suckless) and my version does not support fonts that have not been explicitly indicated to be used and the bulb icon is a non-unicode icon so I had problems with it, solution:
let g:sharpenup_codeactions_glyph = ''
Ok great, glad to get to the root of the problem!
Neovim works correctly without this plugin, but as soon as I integrate it and it's loading some project (.proj) it just closes until the terminal.
Nvim Version: NVIM v0.5.0-dev+1075-g02a3c4179 Terminal: st (my own version) Mono Version: 6.12.0
I attach an image of the plugins that I have installed in case that influences, besides the configuration that I tried to do.
If you need more details, I would be happy to provide them.