在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):eagletmt/ghcmod-vim开源软件地址(OpenSource Url):https://github.com/eagletmt/ghcmod-vim开源编程语言(OpenSource Language):Vim Script 94.6%开源软件介绍(OpenSource Introduction):ghcmod.vimHappy Haskell programming on Vim, powered by ghc-mod
Features
Completions are supported by another plugin. See neco-ghc . RequirementsVimghcmod.vim contains ftplugin.
Please make sure that filetype plugin is enabled.
To check it, type vimprochttps://github.com/Shougo/vimproc ghc-mod >= 5.0.0cabal install ghc-mod DetailsIf you'd like to give GHC options, set let g:ghcmod_ghc_options = ['-idir1', '-idir2'] Also, there's buffer-local version autocmd BufRead,BufNewFile ~/.xmonad/* call s:add_xmonad_path()
function! s:add_xmonad_path()
if !exists('b:ghcmod_ghc_options')
let b:ghcmod_ghc_options = []
endif
call add(b:ghcmod_ghc_options, '-i' . expand('~/.xmonad/lib'))
endfunction :GhcModType, :GhcModTypeClearType Since ghc-mod 1.10.8, not only sub-expressions but name bindings and sub-patterns are supported. Type Sub-expressions are highlighted as hi ghcmodType ctermbg=yellow
let g:ghcmod_type_highlight = 'ghcmodType' :GhcModCheck, :GhcModLintYou can get compiler errors/warnings by Similarly, type If you'd like to pass options to hlint, set let g:ghcmod_hlint_options = ['--ignore=Redundant $'] If you'd like to open in another way the quickfix, set let g:ghcmod_open_quickfix_function = 'GhcModQuickFix'
function! GhcModQuickFix()
" for unite.vim and unite-quickfix
:Unite -no-empty quickfix
" for ctrlp
":CtrlPQuickfix
" for FuzzyFinder
":FufQuickfix
endfunction :GhcModCheckAsync, :GhcModLintAsync, :GhcModCheckAndLintAsyncYou can run check and/or lint asynchronously. This would be useful when you'd like to run check and/or lint automatically (especially on :GhcModExpandYou can see the expansion of splices by This feature was introduced since ghc-mod 1.10.10. GhcModSplitFunCaseSplit the function case by examining a type's constructors. f :: [a] -> a
f x = _body When you type f :: [a] -> a
f [] = _body
f (x:xs) = _body GhcModSigCodegenInsert initial code from the given signature. func :: [a] -> Maybe b -> (a -> b) -> (a,b) ghcmod-vim will insert initial code using typed holes. func x y z f = _func_body Instance declarations are also supported. newtype D = D (Int,String)
class C a where
cInt :: a -> Int
cString :: a -> String
instance C D where ghcmod-vim will insert: cInt x = _cInt_body
cString x = _cString_body CustomizeSee wiki page Customize. LicenseBSD3 License, the same license as ghc-mod. Copyright (c) 2012-2013, eagletmt |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论