summaryrefslogtreecommitdiffstats
path: root/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/dhall.vim2
-rw-r--r--ftplugin/julia.vim8
-rw-r--r--ftplugin/smt2.vim30
3 files changed, 13 insertions, 27 deletions
diff --git a/ftplugin/dhall.vim b/ftplugin/dhall.vim
index a484585b..9a662090 100644
--- a/ftplugin/dhall.vim
+++ b/ftplugin/dhall.vim
@@ -33,7 +33,7 @@ endif
function! DhallFormat()
let cursor = getpos('.')
exec 'normal! gg'
- exec 'silent !dhall format --inplace ' . expand('%')
+ exec 'silent !dhall format ' . expand('%')
exec 'e'
call setpos('.', cursor)
endfunction
diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim
index 785ffa2a..39126598 100644
--- a/ftplugin/julia.vim
+++ b/ftplugin/julia.vim
@@ -39,7 +39,7 @@ if exists("loaded_matchit")
" for nested-structures-skipping to work properly
" note: 'mutable struct' and 'struct' are defined separately because
" using \? puts the cursor on 'struct' instead of 'mutable' for some reason
- let b:julia_begin_keywords = '\%(\%(\.\s*\)\@<!\|\%(@\s*.\s*\)\@<=\)\<\%(function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|do\|\%(bare\)\?module\|quote\|if\|for\|while\|try\)\>'
+ let b:julia_begin_keywords = '\%(\.\s*\|@\)\@<!\<\%(function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|do\|\%(bare\)\?module\|quote\|if\|for\|while\|try\)\>'
" note: the following regex not only recognizes macros, but also local/global keywords.
" the purpose is recognizing things like `@inline myfunction()`
" or `global myfunction(...)` etc, for matchit and block movement functionality
@@ -67,7 +67,7 @@ if exists("loaded_matchit")
call cursor(l, c)
if attr == 'juliaConditional'
return b:julia_begin_keywordsm . ':\<\%(elseif\|else\)\>:' . b:julia_end_keywords
- elseif attr =~ '\<\%(juliaRepeat\|juliaRepKeyword\)\>'
+ elseif attr =~# '\<\%(juliaRepeat\|juliaRepKeyword\)\>'
return b:julia_begin_keywordsm . ':\<\%(break\|continue\)\>:' . b:julia_end_keywords
elseif attr == 'juliaBlKeyword'
return b:julia_begin_keywordsm . ':' . b:julia_end_keywords
@@ -82,8 +82,8 @@ if exists("loaded_matchit")
" we need to skip everything within comments, strings and
" the 'begin' and 'end' keywords when they are used as a range rather than as
" the delimiter of a block
- let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ '
- \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|Comment\\%([LM]\\|Delim\\)\\|\\%([bs]\\|Shell\\|Printf\\|Doc\\)\\?String\\|StringPrefixed\\|DocStringM\\(Raw\\)\\?\\|RegEx\\|SymbolS\\?\\|Macro\\|Dotted\\)\\>"'
+ let b:match_skip = 'synIDattr(synID(line("."),col("."),0),"name") =~# '
+ \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|Comment\\%([LM]\\|Delim\\)\\|\\%([bs]\\|Shell\\|Printf\\|Doc\\)\\?String\\|StringPrefixed\\|DocStringM\\(Raw\\)\\?\\|RegEx\\|SymbolS\\?\\|Dotted\\)\\>"'
let b:undo_ftplugin = b:undo_ftplugin
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"
diff --git a/ftplugin/smt2.vim b/ftplugin/smt2.vim
index d6cfa5ec..b8e8c46c 100644
--- a/ftplugin/smt2.vim
+++ b/ftplugin/smt2.vim
@@ -3,27 +3,13 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'smt2', 'ftplugin/smt2.vim')
endif
setlocal iskeyword+=-,:,#,',$
+setlocal commentstring=;%s
-" 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>
+" 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>
-" Comment String
-setlocal commentstring=;%s
+" Mappings for formatting functionality
+nnoremap <silent> <buffer> <localleader>f :call smt2#formatter#FormatCurrentParagraph()<cr>
+nnoremap <silent> <buffer> <localleader>F :call smt2#formatter#FormatAllParagraphs()<cr>