Compare commits
8 Commits
6fb310f1f4
...
7a8a1f425f
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a8a1f425f | |||
| ea4275de9c | |||
| 728fc1cc94 | |||
| cb32e85d5c | |||
| fd0ec0ec30 | |||
| 2f8ea2f5bc | |||
| aa30843b94 | |||
| 9347f35352 |
@ -7,7 +7,45 @@ syntax on
|
|||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
|
|
||||||
call CmdAlias('hasktags', '!/home/jule/.cabal/bin/hasktags -c .<CR>')
|
" tags
|
||||||
|
call CmdAlias('hasktags', '!hasktags -c .<CR>')
|
||||||
|
|
||||||
|
" from
|
||||||
|
" https://raw.githubusercontent.com/begriffs/haskell-vim-now/master/git-hscope
|
||||||
|
call CmdAlias('codex', 'call system("haskell-ctags")<CR><CR>call LoadHscope()<CR>')
|
||||||
|
|
||||||
|
|
||||||
|
map <leader>tg :codex<CR>
|
||||||
|
set tags=tags;/,codex.tags;/
|
||||||
|
|
||||||
|
nnoremap <leader>gd <C-]>
|
||||||
|
nnoremap <silent> <leader>cgd :cs find g <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nnoremap <silent> <C-\> :cs find c <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
|
||||||
|
set cscopeprg=do_at_stack_root\ hscope
|
||||||
|
set csre
|
||||||
|
set csto=1 " search codex tags first
|
||||||
|
set nocst
|
||||||
|
" set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
|
||||||
|
|
||||||
|
function! LoadHscope()
|
||||||
|
set nocscopeverbose " suppress 'duplicate connection' error
|
||||||
|
let hsf = findfile("hscope.out", ".;")
|
||||||
|
if filereadable(hsf)
|
||||||
|
exe "cs add " . hsf
|
||||||
|
elseif $HSCOPE_DB != ""
|
||||||
|
cs add $HSCOPE_DB
|
||||||
|
endif
|
||||||
|
set cscopeverbose
|
||||||
|
endfunction
|
||||||
|
au BufEnter /*.hs call LoadHscope()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"hoogle
|
||||||
|
nnoremap <leader>ho :Hoogle<CR>
|
||||||
|
nnoremap <leader>hc :HoogleClose<CR>
|
||||||
|
|
||||||
|
|
||||||
" haskell-vim
|
" haskell-vim
|
||||||
@ -58,7 +96,7 @@ let g:vim_annotations_offset = '/.liquid/'
|
|||||||
|
|
||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
let g:LanguageClient_autoStart = 1
|
let g:LanguageClient_autoStart = 0
|
||||||
let g:LanguageClient_serverCommands = {
|
let g:LanguageClient_serverCommands = {
|
||||||
\ 'haskell': ['hie-wrapper', '--lsp', '-d', '-l', $HOME.'/lang-server.log'],
|
\ 'haskell': ['hie-wrapper', '--lsp', '-d', '-l', $HOME.'/lang-server.log'],
|
||||||
\ }
|
\ }
|
||||||
@ -66,16 +104,17 @@ let g:LanguageClient_serverCommands = {
|
|||||||
let g:LanguageClient_diagnosticsEnable = 0
|
let g:LanguageClient_diagnosticsEnable = 0
|
||||||
|
|
||||||
nnoremap <leader>lc :call LanguageClient_contextMenu()<CR>
|
nnoremap <leader>lc :call LanguageClient_contextMenu()<CR>
|
||||||
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
" nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||||
nnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
|
nnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
|
||||||
vnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
|
vnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
|
||||||
nnoremap <silent> <F8> :call LanguageClient#textDocument_rename()<CR>
|
nnoremap <silent> <C-F8> :call LanguageClient#textDocument_rename()<CR>
|
||||||
|
|
||||||
" deoplete
|
" deoplete
|
||||||
call deoplete#custom#option('sources',{
|
call deoplete#custom#option('sources',{
|
||||||
\ '_': ['buffer'],
|
\ '_': ['buffer'],
|
||||||
\ 'haskell': ['neosnippet', 'buffer', 'file', 'LanguageClient']
|
\ 'haskell': ['neosnippet', 'buffer', 'file', 'neco-ghc']
|
||||||
\ })
|
\ })
|
||||||
|
" \ 'haskell': ['neosnippet', 'buffer', 'file', 'neco-ghc']
|
||||||
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
call deoplete#enable()
|
call deoplete#enable()
|
||||||
call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
|
call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
|
||||||
@ -83,8 +122,8 @@ call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
|
|||||||
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
|
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
|
||||||
|
|
||||||
" ALE
|
" ALE
|
||||||
let g:ale_enabled = 1
|
let g:ale_enabled = 0
|
||||||
let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools'], 'c':['clang']}
|
let g:ale_linters = {'haskell':[], 'c':['clang']}
|
||||||
" let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools', 'argon'], 'c':['clang']}
|
" let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools', 'argon'], 'c':['clang']}
|
||||||
" let g:ale_fixers = {
|
" let g:ale_fixers = {
|
||||||
" \ 'haskell': ['brittany'],
|
" \ 'haskell': ['brittany'],
|
||||||
@ -99,7 +138,6 @@ let g:ale_haskell_argon_info_level = 6
|
|||||||
" neco-ghc
|
" neco-ghc
|
||||||
" let g:necoghc_enable_detailed_browse = 1
|
" let g:necoghc_enable_detailed_browse = 1
|
||||||
" let g:haskellmode_completion_ghc = 0
|
" let g:haskellmode_completion_ghc = 0
|
||||||
" let g:necoghc_enable_detailed_browse = 1
|
|
||||||
" autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
|
" autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
|
||||||
" let g:ycm_semantic_triggers = {'haskell' : ['.']}
|
" let g:ycm_semantic_triggers = {'haskell' : ['.']}
|
||||||
|
|
||||||
@ -135,10 +173,16 @@ nmap <F6> :GhcModType<CR>
|
|||||||
" let g:intero_window_size = 15
|
" let g:intero_window_size = 15
|
||||||
|
|
||||||
" " Sets the intero window to split vertically; default is horizontal
|
" " Sets the intero window to split vertically; default is horizontal
|
||||||
" let g:intero_vertical_split = 1
|
" " let g:intero_vertical_split = 1
|
||||||
|
|
||||||
|
" " let g:intero_ghci_options = '-dynamic'
|
||||||
|
|
||||||
" " OPTIONAL: Make the update time shorter, so the type info will trigger faster.
|
" " OPTIONAL: Make the update time shorter, so the type info will trigger faster.
|
||||||
" set updatetime=1000
|
" set updatetime=1000
|
||||||
|
|
||||||
" map <silent> <leader>t <Plug>InteroGenericType
|
" map <silent> <leader>t <Plug>InteroGenericType
|
||||||
|
" nnoremap <silent> <leader>jd :InteroGoToDef<CR>
|
||||||
|
" map <silent> <leader>T <Plug>InteroType
|
||||||
|
" nnoremap <silent> <leader>it :InteroTypeInsert<CR>
|
||||||
|
" nnoremap <leader>ist :InteroSetTargets<SPACE>
|
||||||
" endif
|
" endif
|
||||||
|
|||||||
4
custom-snippets/haskell.snippets
Normal file
4
custom-snippets/haskell.snippets
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
snippet docsec
|
||||||
|
------------------------
|
||||||
|
--[ ${0:DOCUMENT SECTION} ]--
|
||||||
|
------------------------
|
||||||
2
custom-snippets/markdown.snippets
Normal file
2
custom-snippets/markdown.snippets
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
snippet tc
|
||||||
|
\textcolor{${1:red}}{${0}}
|
||||||
17
vimrc
17
vimrc
@ -88,27 +88,27 @@ Plug 'w0rp/ale', {
|
|||||||
" if has("nvim")
|
" if has("nvim")
|
||||||
" Plug 'parsonsmatt/intero-neovim'
|
" Plug 'parsonsmatt/intero-neovim'
|
||||||
" endif
|
" endif
|
||||||
Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
|
" Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
|
||||||
" completion based on ghc-mod, not LSP
|
" completion based on ghc-mod, not LSP
|
||||||
" Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
|
" Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
|
||||||
Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' }
|
Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' }
|
||||||
Plug 'neovimhaskell/haskell-vim', { 'for': ['haskell', 'cabal'] }
|
Plug 'neovimhaskell/haskell-vim', { 'for': ['haskell', 'cabal'] }
|
||||||
Plug 'ucsd-progsys/liquid-types.vim', { 'for': 'haskell' }
|
" Plug 'ucsd-progsys/liquid-types.vim', { 'for': 'haskell' }
|
||||||
Plug 'bitc/lushtags', {
|
Plug 'bitc/lushtags', {
|
||||||
\ 'do': 'bash -c \"cabal clean && cabal sandbox delete && cabal sandbox init && cabal install && cp .cabal-sandbox/bin/lushtags ~/.cabal/bin/lushtags\"',
|
\ 'do': 'bash -c \"stack install\"',
|
||||||
\ 'for': 'haskell',
|
\ 'for': 'haskell',
|
||||||
\ }
|
\ }
|
||||||
" Plug 'timmytofu/vim-cabal-context', { 'for': 'haskell' }
|
" Plug 'timmytofu/vim-cabal-context', { 'for': 'haskell' }
|
||||||
Plug 'itchyny/vim-haskell-indent', { 'for': 'haskell' }
|
Plug 'itchyny/vim-haskell-indent', { 'for': 'haskell' }
|
||||||
Plug 'dan-t/vim-hsimport', { 'for': 'haskell' }
|
Plug 'dan-t/vim-hsimport', { 'for': 'haskell' }
|
||||||
|
Plug 'Twinside/vim-hoogle', { 'for': 'haskell' }
|
||||||
|
|
||||||
" clojure
|
" clojure
|
||||||
" Plug '~/.vim/unmanaged-vim-plug/paredit', { 'for': 'clojure' }
|
|
||||||
" Plug '~/.vim/unmanaged-vim-plug/tslime', { 'for': 'clojure' }
|
" Plug '~/.vim/unmanaged-vim-plug/tslime', { 'for': 'clojure' }
|
||||||
Plug 'guns/vim-slamhound', {'for': 'clojure'}
|
Plug 'guns/vim-slamhound', {'for': 'clojure'}
|
||||||
Plug 'guns/vim-sexp', {'for': 'clojure'}
|
" Plug 'guns/vim-sexp', {'for': 'clojure'}
|
||||||
Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': 'clojure'}
|
" Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': 'clojure'}
|
||||||
Plug 'kovisoft/paredit', {'for': 'clojure'}
|
" Plug 'kovisoft/paredit', {'for': 'clojure'}
|
||||||
Plug 'tpope/vim-salve', { 'for': 'clojure' }
|
Plug 'tpope/vim-salve', { 'for': 'clojure' }
|
||||||
Plug 'tpope/vim-projectionist', { 'for': 'clojure' }
|
Plug 'tpope/vim-projectionist', { 'for': 'clojure' }
|
||||||
Plug 'tpope/vim-dispatch', { 'for': 'clojure' }
|
Plug 'tpope/vim-dispatch', { 'for': 'clojure' }
|
||||||
@ -183,6 +183,7 @@ if has('conceal')
|
|||||||
endif
|
endif
|
||||||
" Enable snipMate compatibility feature.
|
" Enable snipMate compatibility feature.
|
||||||
let g:neosnippet#enable_snipmate_compatibility = 1
|
let g:neosnippet#enable_snipmate_compatibility = 1
|
||||||
|
let g:neosnippet#snippets_directory='~/.vim/custom-snippets'
|
||||||
|
|
||||||
|
|
||||||
" vim airline
|
" vim airline
|
||||||
@ -193,7 +194,7 @@ let g:neosnippet#enable_snipmate_compatibility = 1
|
|||||||
let g:LanguageClient_autoStart = 0
|
let g:LanguageClient_autoStart = 0
|
||||||
|
|
||||||
" deoplete
|
" deoplete
|
||||||
let g:deoplete#enable_at_startup = 0
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
|
||||||
" ==== delimitMate ====
|
" ==== delimitMate ====
|
||||||
let g:delimitMate_matchpairs = "(:),[:],{:}"
|
let g:delimitMate_matchpairs = "(:),[:],{:}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user