Unfuck haskell config for large projects

This commit is contained in:
Julian Ospald 2018-08-04 19:42:36 +08:00
parent ea4275de9c
commit 7a8a1f425f
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 15 additions and 9 deletions

View File

@ -96,7 +96,7 @@ let g:vim_annotations_offset = '/.liquid/'
" LSP
let g:LanguageClient_autoStart = 1
let g:LanguageClient_autoStart = 0
let g:LanguageClient_serverCommands = {
\ 'haskell': ['hie-wrapper', '--lsp', '-d', '-l', $HOME.'/lang-server.log'],
\ }
@ -104,16 +104,17 @@ let g:LanguageClient_serverCommands = {
let g:LanguageClient_diagnosticsEnable = 0
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>
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
call deoplete#custom#option('sources',{
\ '_': ['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>"
call deoplete#enable()
call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
@ -121,8 +122,8 @@ call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
" ALE
let g:ale_enabled = 1
let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools'], 'c':['clang']}
let g:ale_enabled = 0
let g:ale_linters = {'haskell':[], 'c':['clang']}
" let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools', 'argon'], 'c':['clang']}
" let g:ale_fixers = {
" \ 'haskell': ['brittany'],
@ -137,7 +138,6 @@ let g:ale_haskell_argon_info_level = 6
" neco-ghc
" let g:necoghc_enable_detailed_browse = 1
" let g:haskellmode_completion_ghc = 0
" let g:necoghc_enable_detailed_browse = 1
" autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
" let g:ycm_semantic_triggers = {'haskell' : ['.']}
@ -173,10 +173,16 @@ nmap <F6> :GhcModType<CR>
" let g:intero_window_size = 15
" " 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.
" set updatetime=1000
" 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

2
vimrc
View File

@ -88,7 +88,7 @@ Plug 'w0rp/ale', {
" if has("nvim")
" Plug 'parsonsmatt/intero-neovim'
" endif
Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
" Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
" completion based on ghc-mod, not LSP
" Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' }