summaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-06-27 10:07:29 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2021-06-27 10:07:29 +0200
commit4f5388350be1052f610b830c8fce8fbc17370ec6 (patch)
tree425cb8ee70c123233055a61d56d73e2eb97536db /autoload
parent4899585281beab51e5dff1d9ae4d3159244a8275 (diff)
downloadvim-polyglot-4f5388350be1052f610b830c8fce8fbc17370ec6.tar.gz
vim-polyglot-4f5388350be1052f610b830c8fce8fbc17370ec6.zip
Update
Diffstat (limited to 'autoload')
-rw-r--r--autoload/clojurecomplete.vim2
-rw-r--r--autoload/elixir/indent.vim6
-rw-r--r--autoload/go/config.vim10
-rw-r--r--autoload/org.vim2
-rw-r--r--autoload/polyglot/ft.vim11
-rw-r--r--autoload/polyglot/sleuth.vim2
-rw-r--r--autoload/zig/fmt.vim13
7 files changed, 36 insertions, 10 deletions
diff --git a/autoload/clojurecomplete.vim b/autoload/clojurecomplete.vim
index d8f69a22..ea2de428 100644
--- a/autoload/clojurecomplete.vim
+++ b/autoload/clojurecomplete.vim
@@ -4,7 +4,7 @@ endif
" Vim completion script
" Language: Clojure
-" Maintainer: Alex Vear <av@axvr.io>
+" Maintainer: Alex Vear <alex@vear.uk>
" Former Maintainers: Sung Pae <self@sungpae.com>
" URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license)
diff --git a/autoload/elixir/indent.vim b/autoload/elixir/indent.vim
index 412d2cf5..c9adcd0a 100644
--- a/autoload/elixir/indent.vim
+++ b/autoload/elixir/indent.vim
@@ -108,7 +108,7 @@ endfunction
" Returns 0 or 1 based on whether or not the given line number and column
" number pair is a string or comment
function! s:is_string_or_comment(line, col)
- return s:syntax_name(a:line, a:col) =~ '\%(String\|Comment\)'
+ return s:syntax_name(a:line, a:col) =~ '\%(String\|Comment\|CharList\)'
endfunction
function! s:syntax_name(line, col)
@@ -149,7 +149,7 @@ function! s:find_last_pos(lnum, text, match)
let peek_match = match(peek, a:match)
if peek_match == ss_match + 1
let syng = synIDattr(synID(a:lnum, c + ss_match, 1), 'name')
- if syng !~ '\%(String\|Comment\)'
+ if syng !~ '\%(String\|Comment\|CharList\)'
return c + ss_match
end
end
@@ -169,7 +169,7 @@ function! elixir#indent#handle_top_of_file(context)
endfunction
function! elixir#indent#handle_starts_with_string_continuation(context)
- if s:syntax_name(a:context.lnum, a:context.first_nb_char_idx) =~ '\(String\|Comment\)$'
+ if s:syntax_name(a:context.lnum, a:context.first_nb_char_idx) =~ '\(String\|Comment\|CharList\)$'
return -2
else
return -1
diff --git a/autoload/go/config.vim b/autoload/go/config.vim
index d20ead8b..f7389cdc 100644
--- a/autoload/go/config.vim
+++ b/autoload/go/config.vim
@@ -275,7 +275,7 @@ endfunction
function! go#config#MetalinterAutosaveEnabled() abort
let l:default = []
if get(g:, 'go_metalinter_command', s:default_metalinter) == 'golangci-lint'
- let l:default = ['govet', 'golint']
+ let l:default = ['govet', 'revive']
endif
return get(g:, 'go_metalinter_autosave_enabled', l:default)
@@ -284,14 +284,14 @@ endfunction
function! go#config#MetalinterEnabled() abort
let l:default = []
if get(g:, 'go_metalinter_command', s:default_metalinter) == 'golangci-lint'
- let l:default = ['vet', 'golint', 'errcheck']
+ let l:default = ['vet', 'revive', 'errcheck']
endif
return get(g:, 'go_metalinter_enabled', l:default)
endfunction
function! go#config#GolintBin() abort
- return get(g:, "go_golint_bin", "golint")
+ return get(g:, "go_golint_bin", "revive")
endfunction
function! go#config#ErrcheckBin() abort
@@ -615,6 +615,10 @@ function! go#config#DebugMappings() abort
return extend(l:user, l:default, 'keep')
endfunction
+function! go#config#DocBalloon() abort
+ return get(g:, 'go_doc_balloon', 0)
+endfunction
+
" Set the default value. A value of "1" is a shortcut for this, for
" compatibility reasons.
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1
diff --git a/autoload/org.vim b/autoload/org.vim
index de8282c2..6e4918f0 100644
--- a/autoload/org.vim
+++ b/autoload/org.vim
@@ -4,7 +4,7 @@ endif
" Helper functions for org.vim
"
-" Maintainer: Alex Vear <av@axvr.io>
+" Maintainer: Alex Vear <alex@vear.uk>
" License: Vim (see `:help license`)
" Location: autoload/org.vim
" Website: https://github.com/axvr/org.vim
diff --git a/autoload/polyglot/ft.vim b/autoload/polyglot/ft.vim
index f872bf9c..2e4c1f69 100644
--- a/autoload/polyglot/ft.vim
+++ b/autoload/polyglot/ft.vim
@@ -172,6 +172,17 @@ func polyglot#ft#FTent()
setf dtd
endfunc
+func polyglot#ft#ExCheck()
+ let lines = getline(1, min([line("$"), 100]))
+ if exists('g:filetype_euphoria')
+ exe 'setf ' . g:filetype_euphoria
+ elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1
+ setf euphoria3
+ else
+ setf elixir
+ endif
+endfunc
+
func polyglot#ft#EuphoriaCheck()
if exists('g:filetype_euphoria')
exe 'setf ' . g:filetype_euphoria
diff --git a/autoload/polyglot/sleuth.vim b/autoload/polyglot/sleuth.vim
index 0785dfbf..d308561c 100644
--- a/autoload/polyglot/sleuth.vim
+++ b/autoload/polyglot/sleuth.vim
@@ -257,7 +257,7 @@ let s:globs = {
\ 'jam': '*.jpl,*.jpr,Prl*.*,JAM*.*',
\ 'java': '*.java,*.jav',
\ 'javacc': '*.jj,*.jjt',
- \ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,*.javascript,Jakefile',
+ \ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile',
\ 'javascriptreact': '*.jsx',
\ 'jess': '*.clp',
\ 'jgraph': '*.jgr',
diff --git a/autoload/zig/fmt.vim b/autoload/zig/fmt.vim
index 7d7872f9..e2e3059a 100644
--- a/autoload/zig/fmt.vim
+++ b/autoload/zig/fmt.vim
@@ -17,7 +17,7 @@ function! zig#fmt#Format() abort
return
endif
- let cmdline = 'zig fmt --stdin'
+ let cmdline = 'zig fmt --stdin --ast-check'
let current_buf = bufnr('')
" The formatted code is output on stdout, the errors go on stderr.
@@ -26,8 +26,19 @@ function! zig#fmt#Format() abort
else
silent let out = split(system(cmdline, current_buf))
endif
+ if len(out) == 1
+ if out[0] == "error: unrecognized parameter: '--ast-check'"
+ let cmdline = 'zig fmt --stdin'
+ if exists('*systemlist')
+ silent let out = systemlist(cmdline, current_buf)
+ else
+ silent let out = split(system(cmdline, current_buf))
+ endif
+ endif
+ endif
let err = v:shell_error
+
if err == 0
" remove undo point caused via BufWritePre.
try | silent undojoin | catch | endtry