This commit is contained in:
Adam Stankiewicz
2021-06-09 09:50:19 +02:00
parent 27756b129b
commit ff8c1d7674
10 changed files with 822 additions and 64 deletions

View File

@@ -3,27 +3,13 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'smt2', 'ftplugin/smt2.vim')
endif
setlocal iskeyword+=-,:,#,',$
" If no command for invoking a solver is specified in ~/.vimrc, test if either
" 'z3' or 'boolector' is accessible through $PATH (in that order)
if !exists("g:smt2_solver_command")
if executable("z3")
let g:smt2_solver_command = "z3"
elseif executable("boolector")
let g:smt2_solver_command = "boolector"
endif
endif
" If no command line switch for printing the solver's version is specified in
" ~/.vimrc, use '--version'
if !exists("g:smt2_solver_version_switch")
let g:smt2_solver_version_switch = "--version"
endif
" Mappings
nnoremap <silent> <buffer> <localleader>r :call smt2#RunSolver()<cr>
nnoremap <silent> <buffer> <localleader>R :call smt2#RunSolverAndShowResult()<cr>
nnoremap <silent> <buffer> <localleader>v :call smt2#PrintSolverVersion()<cr>
" Comment String
setlocal commentstring=;%s
" Mappings for solver functionality
nnoremap <silent> <buffer> <localleader>r :call smt2#solver#Run()<cr>
nnoremap <silent> <buffer> <localleader>R :call smt2#solver#RunAndShowResult()<cr>
nnoremap <silent> <buffer> <localleader>v :call smt2#solver#PrintVersion()<cr>
" Mappings for formatting functionality
nnoremap <silent> <buffer> <localleader>f :call smt2#formatter#FormatCurrentParagraph()<cr>
nnoremap <silent> <buffer> <localleader>F :call smt2#formatter#FormatAllParagraphs()<cr>