Created
March 11, 2020 00:21
-
-
Save mikebelanger/782d1a03433be7825e4d107a669a1ee2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=UTF-8 | |
call plug#begin() | |
Plug 'alaviss/nim.nvim' | |
Plug 'prabirshrestha/asyncomplete.vim' | |
Plug 'neomake/neomake' | |
Plug 'vim-airline/vim-airline' | |
Plug 'autozimu/LanguageClient-neovim', { | |
\ 'branch': 'next', | |
\ 'do': 'bash install.sh', | |
\ } | |
call plug#end() | |
call neomake#configure#automake('w') | |
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, candidates)})} | |
\ }) | |
noremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" | |
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" | |
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>" | |
" When writing a buffer (no delay). | |
set number | |
set cursorline | |
hi cursorline cterm=none term=none | |
autocmd WinEnter * setlocal cursorline | |
autocmd WinLeave * setlocal nocursorline | |
highlight CursorLine guibg=#303000 ctermbg=234 | |
set hidden | |
nnoremap <F5> :call LanguageClient_contextMenu()<CR> | |
let g:LanguageClient_serverCommands = { | |
\ 'nim': ['~/.nimble/bin/nimlsp'], | |
\ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment