add \T to show type with implicits

This commit is contained in:
rhiannon morris 2021-12-28 09:56:16 +01:00
parent 964cebee49
commit f088d05a14
1 changed files with 5 additions and 4 deletions

View File

@ -118,13 +118,13 @@ function! IdrisReloadToLine(cline)
"return tc
endfunction
function! IdrisShowType()
function! IdrisShowType(imp)
w
let word = s:currentQueryObject()
let cline = line(".")
let ccol = col(".")
let ty = s:IdrisCommand(":t", word)
call IWrite(ty)
let ty = s:IdrisCommand(a:imp ? ":ti" : ":t", word)
call IWrite(ty)
endfunction
function! IdrisShowDoc()
@ -295,7 +295,8 @@ function! IdrisEval()
call IWrite(" = " . result)
endfunction
nnoremap <buffer> <silent> <LocalLeader>t :call IdrisShowType()<ENTER>
nnoremap <buffer> <silent> <LocalLeader>t :call IdrisShowType(0)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>T :call IdrisShowType(1)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>r :call IdrisReload(0)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>c :call IdrisCaseSplit()<ENTER>
nnoremap <buffer> <silent> <LocalLeader>a 0:call search(":")<ENTER>b:call IdrisAddClause(0)<ENTER>w