Add snippets support
This commit is contained in:
parent
282cea9bab
commit
a356fa835c
@ -73,9 +73,9 @@ nnoremap <silent> <F8> :call LanguageClient#textDocument_rename()<CR>
|
|||||||
" deoplete
|
" deoplete
|
||||||
call deoplete#custom#option('sources',{
|
call deoplete#custom#option('sources',{
|
||||||
\ '_': ['buffer'],
|
\ '_': ['buffer'],
|
||||||
\ 'haskell': ['ultisnips', 'buffer', 'file', 'LanguageClient']
|
\ 'haskell': ['neosnippet', 'buffer', 'file', 'LanguageClient']
|
||||||
\ })
|
\ })
|
||||||
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
call deoplete#enable()
|
call deoplete#enable()
|
||||||
|
|
||||||
|
|
||||||
|
25
vimrc
25
vimrc
@ -71,6 +71,10 @@ else
|
|||||||
Plug 'roxma/vim-hug-neovim-rpc'
|
Plug 'roxma/vim-hug-neovim-rpc'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" snippets
|
||||||
|
Plug 'Shougo/neosnippet.vim'
|
||||||
|
Plug 'honza/vim-snippets'
|
||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
" setting this per-language breaks "let g:LanguageClient_autoStart = 1",
|
" setting this per-language breaks "let g:LanguageClient_autoStart = 1",
|
||||||
Plug 'autozimu/LanguageClient-neovim', {
|
Plug 'autozimu/LanguageClient-neovim', {
|
||||||
@ -170,6 +174,27 @@ endif
|
|||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
|
|
||||||
|
" neosnippet
|
||||||
|
" Plugin key-mappings.
|
||||||
|
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||||
|
imap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||||
|
smap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||||
|
xmap <C-k> <Plug>(neosnippet_expand_target)
|
||||||
|
|
||||||
|
" SuperTab like snippets behavior.
|
||||||
|
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||||
|
imap <expr><tab> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
|
smap <expr><tab> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<tab>"
|
||||||
|
|
||||||
|
" For conceal markers.
|
||||||
|
if has('conceal')
|
||||||
|
set conceallevel=2 concealcursor=niv
|
||||||
|
endif
|
||||||
|
" Enable snipMate compatibility feature.
|
||||||
|
let g:neosnippet#enable_snipmate_compatibility = 1
|
||||||
|
let g:neosnippet#disable_runtime_snippets = 1
|
||||||
|
|
||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
let g:LanguageClient_autoStart = 0
|
let g:LanguageClient_autoStart = 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user