diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-06-27 10:07:29 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-06-27 10:07:29 +0200 |
commit | 4f5388350be1052f610b830c8fce8fbc17370ec6 (patch) | |
tree | 425cb8ee70c123233055a61d56d73e2eb97536db | |
parent | 4899585281beab51e5dff1d9ae4d3159244a8275 (diff) | |
download | vim-polyglot-4f5388350be1052f610b830c8fce8fbc17370ec6.tar.gz vim-polyglot-4f5388350be1052f610b830c8fce8fbc17370ec6.zip |
Update
-rw-r--r-- | autoload/clojurecomplete.vim | 2 | ||||
-rw-r--r-- | autoload/elixir/indent.vim | 6 | ||||
-rw-r--r-- | autoload/go/config.vim | 10 | ||||
-rw-r--r-- | autoload/org.vim | 2 | ||||
-rw-r--r-- | autoload/polyglot/ft.vim | 11 | ||||
-rw-r--r-- | autoload/polyglot/sleuth.vim | 2 | ||||
-rw-r--r-- | autoload/zig/fmt.vim | 13 | ||||
-rw-r--r-- | extras/filetype.vim | 19 | ||||
-rw-r--r-- | ftplugin/clojure.vim | 2 | ||||
-rw-r--r-- | ftplugin/org.vim | 4 | ||||
-rw-r--r-- | ftplugin/outline.vim | 2 | ||||
-rw-r--r-- | ftplugin/zig.vim | 4 | ||||
-rw-r--r-- | indent/clojure.vim | 2 | ||||
-rw-r--r-- | indent/zig.vim | 4 | ||||
-rw-r--r-- | syntax/clojure.vim | 2 | ||||
-rw-r--r-- | syntax/elixir.vim | 6 | ||||
-rw-r--r-- | syntax/julia.vim | 4 | ||||
-rw-r--r-- | syntax/org.vim | 4 | ||||
-rw-r--r-- | syntax/outline.vim | 4 | ||||
-rw-r--r-- | syntax/ruby.vim | 8 | ||||
-rw-r--r-- | syntax/zig.vim | 9 |
21 files changed, 77 insertions, 43 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 diff --git a/extras/filetype.vim b/extras/filetype.vim index e6ab472f..4bee61e2 100644 --- a/extras/filetype.vim +++ b/extras/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2021 Apr 17 +" Last Change: 2021 Jun 13 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -393,7 +393,7 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf " Configure scripts au BufNewFile,BufRead configure.in,configure.ac setf config -" CUDA Cumpute Unified Device Architecture +" CUDA Compute Unified Device Architecture au BufNewFile,BufRead *.cu,*.cuh setf cuda " Dockerfile; Podman uses the same syntax with name Containerfile @@ -408,8 +408,15 @@ au BufNewFile,BufRead *enlightenment/*.cfg setf c " Eterm au BufNewFile,BufRead *Eterm/*.cfg setf eterm +" Elixir or Euphoria +au BufNewFile,BufRead *.ex call polyglot#ft#ExCheck() + +" Elixir +au BufRead,BufNewFile mix.lock,*.exs setf elixir +au BufRead,BufNewFile *.eex,*.leex setf eelixir + " Euphoria 3 or 4 -au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call polyglot#ft#EuphoriaCheck() +au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call polyglot#ft#EuphoriaCheck() if has("fname_case") au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call polyglot#ft#EuphoriaCheck() endif @@ -855,6 +862,12 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json +" JSON Patch (RFC 6902) +au BufNewFile,BufRead *.json-patch setf json + +" Jupyter Notebook is also json +au BufNewFile,BufRead *.ipynb setf json + " Kixtart au BufNewFile,BufRead *.kix setf kix diff --git a/ftplugin/clojure.vim b/ftplugin/clojure.vim index 8919fd00..2c2882e3 100644 --- a/ftplugin/clojure.vim +++ b/ftplugin/clojure.vim @@ -4,7 +4,7 @@ endif " Vim filetype plugin file " Language: Clojure -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " Former Maintainers: Sung Pae <self@sungpae.com> " Meikel Brandmeyer <mb@kotka.de> " URL: https://github.com/clojure-vim/clojure.vim diff --git a/ftplugin/org.vim b/ftplugin/org.vim index 12711088..b88fbc95 100644 --- a/ftplugin/org.vim +++ b/ftplugin/org.vim @@ -4,11 +4,11 @@ endif " Vim filetype plugin for GNU Emacs' Org mode " -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " License: Vim (see `:help license`) " Location: ftplugin/org.vim " Website: https://github.com/axvr/org.vim -" Last Change: 2020-01-04 +" Last Change: 2020-02-15 " " Reference Specification: Org mode manual " GNU Info: `$ info Org` diff --git a/ftplugin/outline.vim b/ftplugin/outline.vim index 4f0bbd65..996ba4c0 100644 --- a/ftplugin/outline.vim +++ b/ftplugin/outline.vim @@ -4,7 +4,7 @@ endif " Vim filetype plugin for GNU Emacs' Outline mode " -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " License: Vim (see `:help license`) " Location: ftplugin/outline.vim " Website: https://github.com/axvr/org.vim diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index ee5ce79e..cb2f3e84 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -47,10 +47,8 @@ if exists("*json_decode") && executable('zig') unlet! s:env endif -let &l:formatprg = 'zig fmt --stdin' - let b:undo_ftplugin = - \ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa< fp<' + \ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<' let &cpo = s:cpo_orig unlet s:cpo_orig diff --git a/indent/clojure.vim b/indent/clojure.vim index ac4544bb..7f79c9a2 100644 --- a/indent/clojure.vim +++ b/indent/clojure.vim @@ -4,7 +4,7 @@ endif " Vim indent file " Language: Clojure -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " Former Maintainers: Sung Pae <self@sungpae.com> " Meikel Brandmeyer <mb@kotka.de> " URL: https://github.com/clojure-vim/clojure.vim diff --git a/indent/zig.vim b/indent/zig.vim index f4e2cda7..fc9f5d6d 100644 --- a/indent/zig.vim +++ b/indent/zig.vim @@ -49,10 +49,10 @@ function! GetZigIndent(lnum) let prevLineNum = prevnonblank(a:lnum-1) let prevLine = getline(prevLineNum) - " for lines that look line + " for lines that look like " }, " }; - " try treat them the same as a } + " try treating them the same as a } if prevLine =~ '\v^\s*},$' if currentLine =~ '\v^\s*};$' || currentLine =~ '\v^\s*}$' return indent(prevLineNum) - 4 diff --git a/syntax/clojure.vim b/syntax/clojure.vim index 244d08be..cdf8346d 100644 --- a/syntax/clojure.vim +++ b/syntax/clojure.vim @@ -4,7 +4,7 @@ endif " Vim indent file " Language: Clojure -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " Former Maintainers: Sung Pae <self@sungpae.com> " Meikel Brandmeyer <mb@kotka.de> " Toralf Wittner <toralf.wittner@gmail.com> diff --git a/syntax/elixir.vim b/syntax/elixir.vim index 2c9dd2e5..5928805b 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -80,7 +80,7 @@ syn region elixirStruct matchgroup=elixirStructDelimiter start="%\(\w\+{\)\@=" e syn region elixirMap matchgroup=elixirMapDelimiter start="%{" end="}" contains=ALLBUT,@elixirNotTop fold -syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained +syn region elixirCharList matchgroup=elixirCharListDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained syn region elixirString matchgroup=elixirStringDelimiter start=+\z('''\)+ end=+^\s*\z1+ contains=@Spell,@elixirStringContained syn region elixirString matchgroup=elixirStringDelimiter start=+\z("""\)+ end=+^\s*\z1+ contains=@Spell,@elixirStringContained @@ -92,7 +92,7 @@ syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\| syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold -syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment +syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment,elixirCharList,elixirCharListDelimiter syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE @@ -234,10 +234,12 @@ hi def link elixirRegexCharClass elixirSpecial hi def link elixirRegexQuantifier elixirSpecial hi def link elixirSpecial Special hi def link elixirString String +hi def link elixirCharList String hi def link elixirSigil String hi def link elixirDocStringDelimiter elixirStringDelimiter hi def link elixirDocSigilDelimiter elixirSigilDelimiter hi def link elixirStringDelimiter Delimiter +hi def link elixirCharListDelimiter Delimiter hi def link elixirRegexDelimiter Delimiter hi def link elixirInterpolationDelimiter Delimiter hi def link elixirSigilDelimiter Delimiter diff --git a/syntax/julia.vim b/syntax/julia.vim index a04f246d..53dea077 100644 --- a/syntax/julia.vim +++ b/syntax/julia.vim @@ -124,8 +124,8 @@ syntax match juliaColon display ":" " A dot can introduce a sort of 'environment' such that words after it are not " recognized as keywords. This has low precedence so that it can be overridden " by operators -syntax match juliaDotted transparent "\.\s*[^.]" contains=@juliaExprsNodot -syntax match juliaDottedT contained transparent "\.\s*[^.]" contains=@juliaExprsNodot,juliaType +syntax match juliaDotted transparent "\.\s*[^])}.]" contains=@juliaExprsNodot +syntax match juliaDottedT contained transparent "\.\s*[^])}.]" contains=@juliaExprsNodot,juliaType syntax match juliaErrorPar display "[])}]" syntax match juliaErrorEnd display "\<end\>" diff --git a/syntax/org.vim b/syntax/org.vim index de879a6f..8bcb2fa4 100644 --- a/syntax/org.vim +++ b/syntax/org.vim @@ -4,11 +4,11 @@ endif " Vim syntax file for GNU Emacs' Org mode " -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " License: Vim (see `:help license`) " Location: syntax/org.vim " Website: https://github.com/axvr/org.vim -" Last Change: 2020-01-05 +" Last Change: 2021-03-11 " " Reference Specification: Org mode manual " GNU Info: `$ info Org` diff --git a/syntax/outline.vim b/syntax/outline.vim index 749bc840..13a4d7ea 100644 --- a/syntax/outline.vim +++ b/syntax/outline.vim @@ -4,11 +4,11 @@ endif " Vim syntax file for GNU Emacs' Outline mode " -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " License: Vim (see `:help license`) " Location: syntax/outline.vim " Website: https://github.com/axvr/org.vim -" Last Change: 2019-09-28 +" Last Change: 2020-08-24 " " Reference Specification: GNU Emacs Manual, section 'Outline Mode' " GNU Info: `$ info Emacs Outline Mode` diff --git a/syntax/ruby.vim b/syntax/ruby.vim index 4b962fa1..ce28d380 100644 --- a/syntax/ruby.vim +++ b/syntax/ruby.vim @@ -137,10 +137,10 @@ syn match rubyCurlyBraceEscape "\\[{}]" contained display syn match rubyAngleBracketEscape "\\[<>]" contained display syn match rubySquareBracketEscape "\\[[\]]" contained display -syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained -syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained -syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained -syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained +syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" end=")" transparent contained +syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" end="}" transparent contained +syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" end=">" transparent contained +syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" end="\]" transparent contained syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesisEscape,rubyCurlyBraceEscape,rubyAngleBracketEscape,rubySquareBracketEscape syn cluster rubyNestedBrackets contains=rubyNested.\+ diff --git a/syntax/zig.vim b/syntax/zig.vim index 057a0ed3..67dad597 100644 --- a/syntax/zig.vim +++ b/syntax/zig.vim @@ -94,8 +94,7 @@ let s:zig_syntax_keywords = { \ , "callconv" \ , "noalias"] \ , 'zigBuiltinFn': ["align" - \ , "@add" - \ , "@WithOverflow" + \ , "@addWithOverflow" \ , "@as" \ , "@atomicLoad" \ , "@atomicStore" @@ -107,7 +106,6 @@ let s:zig_syntax_keywords = { \ , "@cImport" \ , "@cInclude" \ , "@cUndef" - \ , "@canImplicitCast" \ , "@clz" \ , "@cmpxchgWeak" \ , "@cmpxchgStrong" @@ -142,6 +140,7 @@ let s:zig_syntax_keywords = { \ , "@src" \ , "@bitOffsetOf" \ , "@byteOffsetOf" + \ , "@offsetOf" \ , "@OpaqueType" \ , "@panic" \ , "@ptrCast" @@ -155,8 +154,6 @@ let s:zig_syntax_keywords = { \ , "@setRuntimeSafety" \ , "@setEvalBranchQuota" \ , "@setFloatMode" - \ , "@setGlobalLinkage" - \ , "@setGlobalSection" \ , "@shlExact" \ , "@This" \ , "@hasDecl" @@ -179,8 +176,6 @@ let s:zig_syntax_keywords = { \ , "@typeName" \ , "@TypeOf" \ , "@atomicRmw" - \ , "@bytesToSlice" - \ , "@sliceToBytes" \ , "@intToError" \ , "@errorToInt" \ , "@intToEnum" |