diff --git a/README.md b/README.md index 7b1447d..b1da656 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,13 @@ Idris 2 mode for vim This is an [Idris2][] mode for vim which features interactive editing, syntax highlighting, indentation and optional syntax checking via [Syntastic][]. If you need a REPL I recommend using [Vimshell][]. -It is mostly cloned from the original [idris-mode][]. +It is mostly cloned from the original [idris-mode][]. Unlike the Idris 1 +mode, there is no need to have an Idris REPL running - it invokes Idris 2 +directly. + +If there is a `.ipkg` file in any of the parent directories, the mode will +use that as the root of the source tree, and process any options declared +in it (for example, to load packages). Not all of the commands work yet. Note that the keyboard shortcuts have been updated since Idris 1 to be consistent with the Atom mode (e.g. @@ -50,8 +56,6 @@ commands are supported. `a` Create an initial clause for a type declaration. -`b` Same as \d but for an initial typeclass method impl. - `c` case split `mc` make case diff --git a/ftplugin/idris2.vim b/ftplugin/idris2.vim index 9458996..972ce82 100644 --- a/ftplugin/idris2.vim +++ b/ftplugin/idris2.vim @@ -34,7 +34,7 @@ endfunction function! s:IdrisCommand(...) let idriscmd = shellescape(join(a:000)) " echo("idris2 " . expand ('%:t') . " --client " . idriscmd) - return system("idris2 " . expand ('%:t') . " --client " . idriscmd) + return system("idris2 --find-ipkg " . expand ('%:t') . " --client " . idriscmd) endfunction function! IdrisDocFold(lineNum) @@ -95,7 +95,7 @@ endfunction function! IdrisReload(q) w let file = expand("%:p") - let tc = system("idris2 " . expand ('%:t') . " --client ''") + let tc = system("idris2 --find-ipkg " . expand ('%:t') . " --client ''") if (! (tc is "")) call IWrite(tc) else @@ -318,12 +318,12 @@ menu Idris.Reload r menu Idris.Show\ Type t menu Idris.Evaluate e menu Idris.-SEP0- : -menu Idris.Add\ Clause d +menu Idris.Add\ Clause a menu Idris.Generate\ Definition g menu Idris.Add\ with w menu Idris.Case\ Split c menu Idris.Add\ missing\ cases m -menu Idris.Proof\ Search o +menu Idris.Proof\ Search s menu Idris.Proof\ Search\ with\ hints p au BufHidden idris-response call IdrisHideResponseWin()