nvim: init.vim: Setup deoplete completion for Purescript
Also allow auto imports from PSC IDE. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
df3b9f5b0b
commit
495aa26e7f
1 changed files with 11 additions and 1 deletions
|
@ -378,7 +378,7 @@ augroup haskell_maps
|
||||||
au FileType haskell setlocal keywordprg=:Hoogle
|
au FileType haskell setlocal keywordprg=:Hoogle
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
augroup psc_ide_maps
|
augroup purescript_maps
|
||||||
au!
|
au!
|
||||||
au FileType purescript nmap <buffer> <silent> <LocalLeader>L :Plist<CR>
|
au FileType purescript nmap <buffer> <silent> <LocalLeader>L :Plist<CR>
|
||||||
au FileType purescript nmap <buffer> <silent> <LocalLeader>l :Pload<CR>
|
au FileType purescript nmap <buffer> <silent> <LocalLeader>l :Pload<CR>
|
||||||
|
@ -523,6 +523,13 @@ call deoplete#custom#source('_',
|
||||||
call deoplete#custom#option('sources', {
|
call deoplete#custom#option('sources', {
|
||||||
\ '_' : ['buffer', 'tag', 'around', 'file', 'member'],
|
\ '_' : ['buffer', 'tag', 'around', 'file', 'member'],
|
||||||
\ 'rust': ['racer'],
|
\ 'rust': ['racer'],
|
||||||
|
\ 'purescript': ['buffer', 'omni'],
|
||||||
|
\})
|
||||||
|
call deoplete#custom#source('omni', 'functions', {
|
||||||
|
\ 'purescript': 'PSCIDEComplete',
|
||||||
|
\})
|
||||||
|
call deoplete#custom#var('omni', 'input_patterns', {
|
||||||
|
\ 'purescript': '\w*',
|
||||||
\})
|
\})
|
||||||
call deoplete#custom#option({
|
call deoplete#custom#option({
|
||||||
\ 'auto_complete_delay': 200,
|
\ 'auto_complete_delay': 200,
|
||||||
|
@ -654,6 +661,9 @@ let g:netrw_winsize = 10
|
||||||
" For SLIMV
|
" For SLIMV
|
||||||
let g:lisp_rainbow=1
|
let g:lisp_rainbow=1
|
||||||
|
|
||||||
|
" For Purescript
|
||||||
|
let g:psc_ide_auto_imports = 1
|
||||||
|
|
||||||
" ----------------------------- Functions ------------------------------------
|
" ----------------------------- Functions ------------------------------------
|
||||||
function! Cscope(option, query)
|
function! Cscope(option, query)
|
||||||
let color = '{ x = $1; $1 = ""; z = $3; $3 = ""; printf "\033[34m%s\033[0m:\033[31m%s\033[0m\011\033[37m%s\033[0m\n", x,z,$0; }'
|
let color = '{ x = $1; $1 = ""; z = $3; $3 = ""; printf "\033[34m%s\033[0m:\033[31m%s\033[0m\011\033[37m%s\033[0m\n", x,z,$0; }'
|
||||||
|
|
Loading…
Reference in a new issue