You can test vim-easycomplete If you want use vim write nim language
Works well, can autocomplete functions variables macros ...
How to install
Plug 'jayli/vim-easycomplete' # vim plugs
nimble install nimlsp # nimble
# OK, you can write nim code comfortably using vim now :)
# (don't set dict, It is easy to delay popmenu)
Thanks for the updates.
For auto-completion (based on nimsuggest) and linting I was using this setup:
call plug#begin()
"Autocompletion
Plug 'alaviss/nim.nvim'
Plug 'prabirshrestha/asyncomplete.vim'
#Linting and syntax
Plug 'baabelfish/nvim-nim'
Plug 'dense-analysis/ale'
call plug#end()
au User asyncomplete_setup call asyncomplete#register_source({
\ 'name': 'nim',
\ 'whitelist': ['nim'],
\ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start,>
\ })
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
but there is no detailed documentation how to configure everything for Nim to have the same (or almost) experience, as for VSCode (jump to symbol docs).
There's a manual on how to setup auto-completion based on nimlsp on https://github.com/PMunch/nimlsp , but I failed to configure it.
If you have complete init.vim for Nim in NeoVim, I would very appreciate.
this nim.vim haven't autoload & omnifunc, But have color syntax ... good for other plugin together use. ( For example vim-easycomplete )
No dependency libraries, Not need add vimrc code ( you can bakup and remove other complate plugin & maps code , Experience how it feels to use them )