Skip to content

Commit

Permalink
Add UltiSnips for module completion for hs
Browse files Browse the repository at this point in the history
  • Loading branch information
pjrt committed Jul 24, 2015
1 parent 12bf852 commit 18da7cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UltiSnips/haskell.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#module
snippet module "new Module" b
module `!v GetPackageForFile()`.`!v Classname()` where
endsnippet
11 changes: 11 additions & 0 deletions ftplugin/haskell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@ nnoremap <Leader>m :w<CR>:make<CR>
set wildignore+=*/cabal-dev/*,*/dist/*,*.hi

" Search local or project for the class, trait, val or def under the cursor
nnoremap <silent><space>f /\(data\\|type\\|class) \<<C-r><C-w>\>/I<cr>
nnoremap <silent><space>gf :Unite -buffer-name=ack grep:.::(data\|type\|class)\ <C-r><C-w>\\b<cr>
function! GetPackageForFile()
let regexes = [
\ [ '/src', '/src' ],
\ [ '/test', '/test' ],
\ ]
return _GetPackageForFile(regexes)
endfunction

0 comments on commit 18da7cb

Please sign in to comment.