summaryrefslogtreecommitdiffstats
path: root/after
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-12-21 14:41:23 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2021-12-21 14:41:23 +0100
commit87a26c5bf169bafbee837e2323f24cfb07e35250 (patch)
tree326eb21bb10c3d3633b83263d21c85c98f92a67e /after
parent918610d427503c5c7b380eae4a954bd8cb427db5 (diff)
downloadvim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.tar.gz
vim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.zip
Update
Diffstat (limited to 'after')
-rw-r--r--after/compiler/tex.vim2
-rw-r--r--after/ftplugin/requirements.vim2
-rw-r--r--after/ftplugin/tex.vim2
-rw-r--r--after/indent/tex.vim2
-rw-r--r--after/syntax/rescript/graphql.vim42
-rw-r--r--after/syntax/zsh.vim126
6 files changed, 47 insertions, 129 deletions
diff --git a/after/compiler/tex.vim b/after/compiler/tex.vim
index d6038c2b..575c6684 100644
--- a/after/compiler/tex.vim
+++ b/after/compiler/tex.vim
@@ -22,7 +22,7 @@ endif
if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') ||
\(!filereadable('Makefile') && !filereadable('makefile'))
" If buffer-local variable 'tex_flavor' exists, it defines TeX flavor,
- " otherwize the same for global variable with same name, else it will be
+ " otherwise the same for global variable with same name, else it will be
" LaTeX
if exists("b:tex_flavor")
let current_compiler = b:tex_flavor
diff --git a/after/ftplugin/requirements.vim b/after/ftplugin/requirements.vim
index 6c3e1d24..5097952c 100644
--- a/after/ftplugin/requirements.vim
+++ b/after/ftplugin/requirements.vim
@@ -37,4 +37,6 @@ if executable('pip-compile')
setlocal makeprg=pip-compile\ %
endif
endif
+
+setlocal commentstring=#\ %s
" vim: et sw=4 ts=4 sts=4:
diff --git a/after/ftplugin/tex.vim b/after/ftplugin/tex.vim
index e2898321..31542d04 100644
--- a/after/ftplugin/tex.vim
+++ b/after/ftplugin/tex.vim
@@ -32,7 +32,7 @@ let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font'
" Tell Vim how to recognize LaTeX \include{foo} and plain \input bar :
let &l:include .= '\|\\include{'
-" On some file systems, "{" and "}" are inluded in 'isfname'. In case the
+" On some file systems, "{" and "}" are included in 'isfname'. In case the
" TeX file has \include{fname} (LaTeX only), strip everything except "fname".
let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')"
diff --git a/after/indent/tex.vim b/after/indent/tex.vim
index cbb4f01b..79eb7609 100644
--- a/after/indent/tex.vim
+++ b/after/indent/tex.vim
@@ -292,7 +292,7 @@ function! GetTeXIndent() " {{{
let ind = ind - shiftwidth()
let stay = 0
endif
- " lines following to '\item' are intented once again:
+ " lines following to '\item' are indented once again:
if line =~ g:tex_items
let ind = ind + shiftwidth()
let stay = 0
diff --git a/after/syntax/rescript/graphql.vim b/after/syntax/rescript/graphql.vim
new file mode 100644
index 00000000..f7891338
--- /dev/null
+++ b/after/syntax/rescript/graphql.vim
@@ -0,0 +1,42 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/rescript/graphql.vim')
+ finish
+endif
+
+" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
+"
+" Permission is hereby granted, free of charge, to any person obtaining a copy
+" of this software and associated documentation files (the "Software"), to
+" deal in the Software without restriction, including without limitation the
+" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+" sell copies of the Software, and to permit persons to whom the Software is
+" furnished to do so, subject to the following conditions:
+"
+" The above copyright notice and this permission notice shall be included in
+" all copies or substantial portions of the Software.
+"
+" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+" IN THE SOFTWARE.
+"
+" Language: GraphQL
+" Maintainer: Jon Parise <jon@indelible.org>
+
+if exists('b:current_syntax')
+ let s:current_syntax = b:current_syntax
+ unlet b:current_syntax
+endif
+
+let b:graphql_nested_syntax = 1
+syn include @GraphQLSyntax syntax/graphql.vim
+unlet b:graphql_nested_syntax
+
+if exists('s:current_syntax')
+ let b:current_syntax = s:current_syntax
+endif
+
+syntax region graphqlExtensionPoint start=+%graphql(+ end=+)+ contains=graphqlExtensionPointS
+syntax region graphqlExtensionPointS matchgroup=String start=+`+ end=+`+ contains=@GraphQLSyntax contained
diff --git a/after/syntax/zsh.vim b/after/syntax/zsh.vim
deleted file mode 100644
index cf4f9246..00000000
--- a/after/syntax/zsh.vim
+++ /dev/null
@@ -1,126 +0,0 @@
-if polyglot#init#is_disabled(expand('<sfile>:p'), 'zinit', 'after/syntax/zsh.vim')
- finish
-endif
-
-" Copyright (c) 2019 Sebastian Gniazdowski
-"
-" Syntax highlighting for Zinit commands in any file of type `zsh'.
-" It adds definitions for the Zinit syntax to the ones from the
-" existing zsh.vim definitions-file.
-
-" Main Zinit command.
-" Should be the only TOP rule for the whole syntax.
-syntax match ZinitCommand /\<zinit\>\s/me=e-1
- \ skipwhite
- \ nextgroup=ZinitSubCommands,ZinitPluginSubCommands,ZinitSnippetSubCommands
- \ contains=ZinitSubCommands,ZinitPluginSubCommands,ZinitSnippetSubCommands
-
-" TODO: add options for e.g. light
-syntax match ZinitSubCommands /\s\<\%(ice\|compinit\|env-whitelist\|cdreplay\|cdclear\|update\)\>\s/ms=s+1,me=e-1
- \ contained
-
-syntax match ZinitPluginSubCommands /\s\<\%(light\|load\)\>\s/ms=s+1,me=e-1
- \ skipwhite nextgroup=ZinitPlugin1,ZinitPlugin2,ZinitPlugin3
- \ contains=ZinitPlugin1,ZinitPlugin2,ZinitPlugin3
-
-syntax match ZinitSnippetSubCommands /\s\<\%(snippet\)\>\s/ms=s+1,me=e-1
- \ skipwhite
- \ nextgroup=ZinitSnippetShorthands1,ZinitSnippetShorthands2
- \ contains=ZinitSnippetShorthands1,ZinitSnippetShorthands2
-
-" "user/plugin"
-syntax match ZinitPlugin1 /\s["]\%([!-_]*\%(\/[!-_]\+\)\+\|[!-_]\+\)["]/ms=s+1,hs=s+2,he=e-1
- \ contained
- \ nextgroup=ZinitTrailingWhiteSpace
- \ contains=ZinitTrailingWhiteSpace
-
-" 'user/plugin'
-syntax match ZinitPlugin2 /\s[']\%([!-_]*\%(\/[!-_]\+\)\+\|[!-_]\+\)[']/ms=s+1,hs=s+2,he=e-1
- \ contained
- \ nextgroup=ZinitTrailingWhiteSpace
- \ contains=ZinitTrailingWhiteSpace
-
-" user/plugin
-syntax match ZinitPlugin3 /\s\%([!-_]*\%(\/[!-_]\+\)\+\|[!-_]\+\)/ms=s+1,me=e+2
- \ contained
- \ nextgroup=ZinitTrailingWhiteSpace
- \ contains=ZinitTrailingWhiteSpace
-
-" OMZ:: or PZT::
-" TODO: 'OMZ:: or 'PZT::
-syntax match ZinitSnippetShorthands1 /\s\<\%(\%(OMZ\|PZT\)\>::\|\)/hs=s+1,he=e-2
- \ contained
- \ skipwhite
- \ nextgroup=ZinitSnippetUrl1,ZinitSnippetUrl2
- \ contains=ZinitSnippetUrl1,ZinitSnippetUrl2
-
-" "OMZ:: or "PZT::
-syntax match ZinitSnippetShorthands2 /\s["]\%(\%(OMZ\|PZT\)\>::\|\)/hs=s+2,he=e-2
- \ contained
- \ skipwhite
- \ nextgroup=ZinitSnippetUrl3,ZinitSnippetUrl4
- \ contains=ZinitSnippetUrl3,ZinitSnippetUrl4
-
-syntax match ZinitSnippetUrl3 /\<\%(http:\/\/\|https:\/\/\|ftp:\/\/\|\$HOME\|\/\)[!-_]\+\%(\/[!-_]\+\)*\/\?["]/he=e-1
- \ contained
- \ nextgroup=ZinitTrailingWhiteSpace
- \ contains=ZinitTrailingWhiteSpace
-
-" TODO: Fix ZinitTrailingWhiteSpace not matching
-syntax match ZinitSnippetUrl4 /\%(\%(OMZ\|PZT\)::\)[!-_]\+\%(\/[!-_]\+\)*\/\?["]/hs=s+5,he=e-1
- \ contained
- \ nextgroup=ZinitTrailingWhiteSpace
- \ contains=ZinitTrailingWhiteSpace
-
-" http://… or https://… or ftp://… or $HOME/… or /…
-" TODO: Fix $HOME/… and /… not matching
-syntax match ZinitSnippetUrl1 /\<\%(http:\/\/\|https:\/\/\|ftp:\/\/\|\$HOME\|\/\)[!-_]\+\%(\/[!-_]\+\)*\/\?/
- \ contained
- \ nextgroup=ZinitTrailingWhiteSpace
- \ contains=ZinitTrailingWhiteSpace
-
-" TODO: Fix ZinitTrailingWhiteSpace not matching
-syntax match ZinitSnippetUrl2 /\<\%(\%(OMZ\|PZT\)::\)[!-_]\+\%(\/[!-_]\+\)*\/\?/hs=s+5
- \ contained
- \ nextgroup=ZinitTrailingWhiteSpace
- \ contains=ZinitTrailingWhiteSpace
-
-syntax match ZinitTrailingWhiteSpace /[[:space:]]\+$/ contained
-
-" TODO: differentiate the no-value ices
-" TODO: use contained
-syntax match ZinitIceSubCommand /\sice\s/ms=s+1,me=e-1 nextgroup=ZinitIceModifiers
-syntax match ZinitIceModifiers /\s\<\%(svn\|proto\|from\|teleid\|bindmap\|cloneopts\|id-as\|depth\|if\|wait\|load\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(unload\|blockf\|on-update-of\|subscribe\|pick\|bpick\|src\|as\|ver\|silent\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(lucid\|notify\|mv\|cp\|atinit\|atclone\|atload\|atpull\|nocd\|run-atpull\|has\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(cloneonly\|make\|service\|trackbinds\|multisrc\|compile\|nocompile\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(nocompletions\|reset-prompt\|wrap-track\|reset\|aliases\|sh\|bash\|ksh\|csh\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(\\!sh\|!sh\|\\!bash\|!bash\|\\!ksh\|!ksh\|\\!csh\|!csh\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(blockf\|silent\|lucid\|trackbinds\|cloneonly\|nocd\|run-atpull\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(\|sh\|\!sh\|bash\|\!bash\|ksh\|\!ksh\|csh\|\!csh\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(nocompletions\|svn\|aliases\|trigger-load\)\>/ms=s+1
-syntax match ZinitIceModifiers /\s\<\%(light-mode\|is-snippet\|countdown\|ps-on-unload\|ps-on-update\)\>/ms=s+1
-
-" Include also ices added by the existing annexes
-syntax match ZinitIceModifiers /\s\<\%(test\|zman\|submod\|dl\|patch\|fbin\|sbin\|fsrc\|ferc\|fmod\|gem\|node\|rustup\|cargo\)\>/ms=s+1
-
-" Additional Zsh and Zinit functions
-syntax match ZshAndZinitFunctions /\<\%(compdef\|compinit\|zpcdreplay\|zpcdclear\|zpcompinit\|zpcompdef\)\>/
-
-" Link
-highlight def link ZshAndZinitFunctions Keyword
-highlight def link ZinitCommand Statement
-highlight def link ZinitSubCommands Title
-highlight def link ZinitPluginSubCommands Title
-highlight def link ZinitSnippetSubCommands Title
-highlight def link ZinitIceModifiers Type
-highlight def link ZinitSnippetShorthands1 Keyword
-highlight def link ZinitSnippetShorthands2 Keyword
-highlight def link ZinitPlugin1 Macro
-highlight def link ZinitPlugin2 Macro
-highlight def link ZinitPlugin3 Macro
-highlight def link ZinitSnippetUrl1 Macro
-highlight def link ZinitSnippetUrl2 Macro
-highlight def link ZinitSnippetUrl3 Macro
-highlight def link ZinitSnippetUrl4 Macro
-highlight def link ZinitTrailingWhiteSpace Error