From 9dfacd2c7bca67123f8762cae70d2b88701ac9a9 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Tue, 10 Dec 2019 15:38:30 +0530 Subject: [PATCH] nvim: init.vim: Add Purescript support --- nvim/init.vim | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/nvim/init.vim b/nvim/init.vim index 85849df..b97bb80 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -79,6 +79,9 @@ Plug 'vim-erlang/vim-erlang-tags', { 'for': 'erlang' } Plug 'vim-erlang/vim-erlang-runtime', { 'for': 'erlang' } Plug 'vim-erlang/vim-erlang-omnicomplete', { 'for': 'erlang' } Plug 'vim-erlang/vim-erlang-compiler', { 'for': 'erlang' } +" Purescript +Plug 'purescript-contrib/purescript-vim' +Plug 'frigoeu/psc-ide-vim' " Miscellaneous Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' @@ -94,7 +97,6 @@ Plug 'lifecrisis/vim-difforig' Plug 'dag/vim-fish' Plug 'pbrisbin/vim-syntax-shakespeare' Plug 'lifepillar/pgsql.vim' -Plug 'purescript-contrib/purescript-vim' Plug 'mbbill/undotree' Plug 'milkypostman/vim-togglelist' Plug 'jpalardy/vim-slime' @@ -360,6 +362,21 @@ augroup haskell_maps au FileType haskell nmap hi :exe ':HoogleInfo ' . expand('') augroup END +augroup psc_ide_maps + au! + au FileType purescript nmap pt :call Ptype(PgetKeyword(), v:true) + au FileType purescript nmap pT :call PaddTypeAnnotation(matchstr(getline(line(".")), '^\s*\zs\k\+\ze')) + au FileType purescript nmap ps :call PapplySuggestion() + au FileType purescript nmap pa :call PaddTypeAnnotation() + au FileType purescript nmap pi :call PimportIdentifier(PgetKeyword()) + au FileType purescript nmap pr :call Pload() + au FileType purescript nmap pp :call Ppursuit(PgetKeyword()) + au FileType purescript nmap pq :call PaddImportQualifications() + au FileType purescript nmap pQ :call PremoveImportQualifications() + au FileType purescript nmap pg :call PgoToDefinition(PgetKeyword()) + au FileType purescript nmap pc :call PcaseSplit +augroup END + augroup c_maps au! au FileType c nmap ct :NeomakeSh ctags -R . @@ -453,6 +470,7 @@ augroup indentation_defaults autocmd BufRead,BufNewFile */gst-*/*.[ch] set et sw=2 autocmd BufRead,BufNewFile */gstreamer-*/*.[ch] set et sw=2 autocmd BufRead,BufNewFile */pulseaudio/*.[ch] set et sw=4 tw=128 + autocmd BufRead,BufNewFile *.purs set et sw=2 sts=2 si augroup END augroup spell_check