I am using https://github.com/zah/nim.vim in (neo)vim, but it isn't close to the experience of VSCode or (Spac)emacs, which both offer inline documentation, jump to definition etc.
Combined with https://github.com/w0rp/ale, vim is a nice place to be, but as a newbie I don't really care about autocomplete, but I do care passionately about seeing the relevant documentation.
So, without starting a flame war, can anybody recommend what magic incantations I need to perform/plugins to install to get the inline documentation.
I also noticed that emacs ,gd (goto definition) consistently finds the right place, vim consistently fails to find it :-).
What can you recommend?
Thanks!
P.S> I know vscode seems to be the default around here, but I can't give up my terminal, and as much as I have tried, I just can't get vscode to handle splits anywhere close to vim's efficiency.
Apparently nvim-nim works with neovim, but only if asynch mode is switched off with
g:nvim_nim_enable_async=0
Seems something in the nimsuggest protocol changed and the asynch communication function in nvim-nim wasn't updated. Shouldn't be too complicated, so if someone knows vim script: async mode would be faster..
All the non-experimental things from the help file (it's :help nim, not :help nvim-nim) seem to work, even the REPL.
The nvim-nim / YouCompleteMe / ale combo gives me all I need, with ale autocompletion disabled
g:ale_completion_enabled=0
and the more comprehensive omni-completion provided by the other two plugins.Hi @shashlick, so I am using vim (latest on macOS/brew) and vim-plug to install:
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
" Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'tpope/vim-commentary'
Plug 'w0rp/ale'
Plug 'baabelfish/nvim-nim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()
The instructions also state to add the following to your .vimrc:
fun! JumpToDef()
if exists("*GotoDefinition_" . &filetype)
call GotoDefinition_{&filetype}()
else
exe "norm! \<C-]>"
endif
endf
" Jump to tag
nn <M-g> :call JumpToDef()<cr>
ino <M-g> <esc>:call JumpToDef()<cr>
I haven't worried about autocomplete so I can't give you any help there, but gd (NimDefinition) and gt (NimInfo) work fine.
NOTE: it doesn't work for me in neovim due to some local python issue, hence using vim.
That's interesting - the JumpTodef() code is from zah/nim.vim but you are installing baabelfish/nvim-nim which has no such function.
I tried both plugins though and nim.vim complains that it was unable to locte definition, exit code 1 and nvim-nim complained there was no such function.