summaryrefslogtreecommitdiffstats
path: root/runtime/syntax
AgeCommit message (Collapse)Author
4 daysruntime(mysql): update syntax scriptHEADmasterYinzuo Jiang
Problem: - `syn region ...`s in syntax/mysql.vim match function names inaccurately. - no syntax rules for mysql window function. - coarse highlight definition in syntax/mysql.vim. Solution: - add `\<` before the function name for accuracy. - add syntax rules for mysql window function. - enhance the highlight definition. closes: #15311 Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
4 daysruntime(yaml): Fix flow mapping key detectionitchyny
fixes: #15196 closes: #15313 Signed-off-by: itchyny <itchyny@cybozu.co.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
4 daysruntime(yaml): Remove orphaned YAML syntax dump filesitchyny
closes: #15312 Signed-off-by: itchyny <itchyny@cybozu.co.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
4 daysruntime(kconfig): Update syntax script and remove syn syncChristian Brabandt
fixes: #15306 Signed-off-by: Christian Brabandt <cb@256bit.org>
6 daysruntime(vim): Update base-syntax, improve :map highlightingDoug Kearns
Match :map ( RHS properly. Only match ! after :map, :noremap, :unmap and :mapclear. closes: #15297 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
7 daysruntime(sdc): update syntax to SDC-standard 2.1daniel-s-w
Looking into the current standard for Synopsis Design Constraints (SDC) from their [Technology Access Program](https://www.synopsys.com/community/interoperability-programs/tap-in.html), one can see that the current state of the sdc-syntax file is very outdated as well as short in coverage of keywords. This commit pursues to add all the missing keywords from the current standard (Rev. 2.1). closes: #15281 Signed-off-by: daniel-s-w <59746710+daniel-s-w@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
7 daysruntime(vim): Cleanup :match and :loadkeymap syntax test filesDoug Kearns
Remove extraneous trailing whitespace from legacy script :loadkeymap test file. Remove :match *_99.dump test file. These are no longer generated. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
7 daysruntime(vim): Update base-syntax, match types in Vim9 variable declarationsDoug Kearns
Match types in Vim9 variable declarations. Match Vim9 boolean and null literals. These are not matched in all contexts yet. related: #15277 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
8 daysruntime(tsv): include simple syntax pluginChristian Brabandt
fixes: #15271 Signed-off-by: Christian Brabandt <cb@256bit.org>
8 dayspatch 9.1.0593: filetype: Asymptote files are not recognizedv9.1.0593AvidSeeker
Problem: filetype: Asymptote files are not recognized Solution: detect '*.asy' files as asy filetype, include ftplugin and syntax plugin (AvidSeeker). Reference: https://asymptote.sourceforge.io/ closes: #15252 Signed-off-by: AvidSeeker <avidseeker7@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
8 dayspatch 9.1.0592: runtime: filetype: Mediawiki files are not recognizedv9.1.0592AvidSeeker
Problem: filetype: Mediawiki files are not recognized Solution: detect "*.mw" and "*.wiki" as mediawiki filetype, include basic syntax and filetype plugins. (AvidSeeker) closes: #15266 Signed-off-by: AvidSeeker <avidseeker7@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
9 daysruntime(typst): Add typst runtime filesGregory Anders
closes: #15234 Signed-off-by: Gregory Anders <greg@gpanders.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
10 dayspatch 9.1.0586: ocaml runtime files are outdatedv9.1.0586Yinzuo Jiang
Problem: ocaml runtime files are outdated Solution: sync those files with the upstream repo, detect a few more ocaml files (Yinzuo Jiang) closes: #15260 Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
12 dayspatch 9.1.0572: cannot specify tab page closing behaviourv9.1.0572LemonBoy
Problem: cannot specify tab page closing behaviour (Gianluca Pacchiella) Solution: Add the 'tabclose' option (LemonBoy). fixes: #5967 closes: #15204 Signed-off-by: LemonBoy <thatlemon@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
13 daysruntime(logindefs): update syntax with new keywordsEisuke Kawashima
* add keywords * enforce octal format for permissions closes: #15222 Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
13 dayspatch 9.1.0568: Cannot expand paths from 'cdpath' settingv9.1.0568LemonBoy
Problem: Cannot expand paths from 'cdpath' setting (Daniel Hahler) Solution: Implement 'cdpath' completion, add the new 'dir_in_path' completion type (LemonBoy) fixes #374 closes: #15205 Signed-off-by: LemonBoy <thatlemon@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
13 dayspatch 9.1.0564: id() can be fasterv9.1.0564Ernie Rael
Problem: id() can be made faster Solution: don't use printf(), use clever shift of pointer (Ernie Rael) closes: #15207 Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
13 daysruntime(fstab): Add missing keywords to fstab syntaxChristian Brabandt
Added overlay, tracefs and fixed the "none" keyword in the fstab syntax definition. closes: #15217 Signed-off-by: Radu Dineiu <radu.dineiu@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09patch 9.1.0550: filetype: antlr4 files are not recognizedv9.1.0550Yinzuo Jiang
Problem: filetype: antlr4 files are not recognized Solution: Detect '*.g4' as antlr4 filetype, include a simple antlr4 syntax and filetype plugin (Yinzuo Jiang) closes: #15191 Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09runtime(tmux): Update syntax scriptEric Pruitt
closes: #15195 related: #15188 Co-authored-by: Contsantine Bulany <61948252+lostl1ght@users.noreply.github.com> Signed-off-by: Eric Pruitt <eric.pruitt@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07runtime(kivy): update kivy syntax, include ftpluginRiley Bruins
Kivy uses "#:" for preprocessing commands (like "#:import ...") which were overridden by the comment syntax. This has been changed, and a commentstring has been added. closes: #15163 Signed-off-by: Riley Bruins <ribru17@hotmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07runtime(syntax-tests): Stop generating redundant "*_99.dump" filesAliaksei Budavei
- Remove the code handling their generation. - Remove the code written for the shell filetype to clear up the buffer screen before such a file can be generated. - Remove all but "yaml.yaml_99.dump" of such generated files (since there is no published "input/yaml.yaml.yaml", let its maintainer regenerate screen dump files and remove redundant ones). The new algorithm turns a "*_99.dump" file obsolete because all lines written in such a file will already be present in lower-numbered "*.dump" files. Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07runtime(vim): Update base-syntax, improve :match command highlightingDoug Kearns
Match group and pattern arguments to :match commands. closes: #15096 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06runtime(syntax-tests): Abort and report failed cursor progressAliaksei Budavei
Track the cursor forward progress through a syntax test file so that any degenerate input can be checked and reported. closes: #15150 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06runtime(syntax-tests): Introduce self tests for screen dumpingAliaksei Budavei
Write a batch of test files with made-up syntax to serve for additional linewise checks to be manually performed whenever the algorithm for screen dump file generation is modified. Define a shell variable VIM_SYNTAX_SELF_TESTING to run these tests: cd runtime/syntax/ VIM_SYNTAX_SELF_TESTING=1 make clean test related: #15150 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06runtime(syntax-tests): Clear and redraw the ruler line with the shell infoAliaksei Budavei
The current contents of sh_01_99.dump and sh_09_99.dump begin with ":redraw" in the ruler line whereas both the comment and the need for the redraw command execution imply blanks " ". related: #15150 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06runtime(syntax-tests): Allow for folded and wrapped lines in syntax test filesAliaksei Budavei
The current implementation falls short for syntax test files on two accounts: 1. With folded lines -- some lines before folded lines are unnecessarily repeated in generated dump files because closed folded lines are always treated as opened for the cursor to move _in_ instead of to move _over_ them. 2. With wrapped lines (longer than 75 columns) -- some lines are omitted in generated dump files because calculations for the cursor progress and its movement commands only refer to file lines and not their layout within a 20x75 buffer (less &cmdheight). As an alternative, we abandon deterministic (and inaccurate at times) calculations for the cursor progress and, instead, advance the cursor by as much as before for a single dump file, but now rely on marking the last visible line and additional movement to position lines at desired offsets, carefully preserving compatibility for the &scrolloff and &ruler values inherited from defaults.vim. The parent Vim process will keep track of progress through a syntax test file made by its child process ("terminal") by reading the rightmost end of the ruler line from the terminal buffer, looking for " All " or " Bot " for its cue to finish dump file generation. With these changes applied, the lossless line length limit will be raised from 75 to 1425 (for a 19x75 view) columns. Also, prefer "lastline" to "truncate" for &display; hiding the content of any last _long_ line in a view goes against the purpose of syntax file testing -- all lines should be recorded. related: #15150 fixes: #14245 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04patch 9.1.0527: inconsistent parameter in Makefiles for Vim executablev9.1.0527RestorerZ
Problem: inconsistent parameter in Makefiles for Vim executable Solution: consistently use $VIMPROG across all Makefiles (RestorerZ) closes: #15099 Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04runtime(dockerfile): enable spellchecking of comments in syntax scriptKafva
closes: #15147 Signed-off-by: Kafva <36083692+Kafva@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23runtime(java): Compose "g:java_highlight_signature" and ↵Aliaksei Budavei
"g:java_highlight_functions" With the variables defined, distinctly highlight parts of a method declaration header: its name and parameter list parens, from its type parameters, return type, and formal parameters; and distinctly highlight parts of a lambda expression: its parameter list parens and the arrow, from its formal parameters and identifiers. closes: #15083 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-22runtime(vim): Update base-syntax, fix function tail commentsDoug Kearns
Match Vim9-script comments after :def and :enddef and legacy-script comments after :func and :endfunc, in any definition context. Highlight incorrect comment types after these commands as errors. fixes: #15062 closes: #15072 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-21runtime(scheme): update runtime filesEvan Hanson
Add TODO highlighting, disable text-wrapping, add "define-library" to lispwords on CHICKEN. Update MAINTAINERS. closes: #15063 Signed-off-by: Evan Hanson <evhan@foldling.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20runtime(java): Optionally highlight parameterised typesAliaksei Budavei
In the presence of parameterised types whose names begin with a capital letter and end with a less-than sign "<" that introduces a type argument or a list of comma-separated type arguments, followed by a greater-than sign ">", a variable "g:java_highlight_generics" can be defined to have some components of such types uniformly coloured (by picking highlight groups for javaGenericsC{1,2}, javaWildcardBound). For example, ------------------------------------------------------------ java.io.InputStream stream = java.io.InputStream.nullInputStream(); java.util.function.Function<String, java.util.function.BiFunction<String, String, String>> updater = property -> (oldValue, newValue) -> oldValue; java.util.logging.LogManager.getLogManager() .updateConfiguration(stream, updater); ------------------------------------------------------------ Note that the diamond form and explicit type arguments do not qualify for this kind of recognition. For example, ------------------------------------------------------------ new java.util.HashSet<>().<String>toArray(new String[0]); ------------------------------------------------------------ References: https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5 https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.9 https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.12.2.1 closes: #15050 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19runtime(java): Remove the group exclusion list from @javaTopAliaksei Budavei
Instances of anonymous classes can be passed as method arguments and should be subject to line folding as well. closes: #15048 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18runtime(csv): include a simple csv filetype and syntax pluginMaxim Kim
fixes: #15038 Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17runtime(doc): Fix typos in several documentsh-east
closes: #15034 Signed-off-by: h-east <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16runtime(html): bump length of character references in syntax script (#15022)Mohamed Akram
This allows handling longer references such as `&CounterClockwiseContourIntegral;`. Signed-off-by: Mohamed Akram <mohd.akram@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16runtime(kdl): fix KdlIndent and kdlComment in indent script (#15019)Yinzuo Jiang
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16runtime(java): Fold multi-line comments with the syntax kind of &fdm (#15016)Aliaksei Budavei
Also: - Restore the capability to mark as an error braces nested in parens with g:javaInParen. - Try not to fold top-level-type bodies. (Defining multiple package-private top level types in a single source file is not recommended as it can impose order among compilation units; so it is assumed that only one such top level type is usually defined.) - Compose ‘method header’ highlighting and block braces folding. - Do not highlight block braces whenever ‘method header’ highlighting is requested. This bundling of ‘method headers’ and block braces for highlighting can be traced back to Vim v5.0; however, no comment or documentation entry conveys any justification. For example, it is hard to discover the connection between block braces for "while", "if", etc., statements and method body block braces. The former behaviour can be attained in, e.g. ~/.vim/after/syntax/java.vim: ------------------------------------------------------------ if exists("g:java_highlight_functions") syn clear javaBlock javaInParen syn match javaBlockOther "[{}]" syn region javaBlock transparent matchgroup=javaBlockStart \ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold hi def link javaBlockStart javaFuncDef hi def link javaBlockOther javaBlockStart if exists("g:java_mark_braces_in_parens_as_errors") syn match javaInParen contained "[{}]" endif endif ------------------------------------------------------------ Note: Read ‘a method header omitting a _throws_ clause’ for every ‘method header’ appellation used above. Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15runtime(vim): Update base-syntax, match shebang lines (#15011)dkearns
Match shebang lines in Vim9 and legacy script. Mark these as an error if they appear anywhere other than the first line of a legacy-script file. In Vim9 script these match as normal line comments rather than an error. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14runtime(html): Restore HTML syntax file testsDoug Kearns
Rendered element content results in test failures on macOS and FreeBSD. The included content for these elements was incidental to the primary intent of the test to check element tag highlighting so set g:html_no_rendering to disable content rendering. FreeBSD fails for even an empty <strike> element. See #13591 and #14215. closes: #13595 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14runtime(vim): Update base-syntax, match :sleep argDoug Kearns
Match :sleep arg properly including a lone "m" with a leading count. closes: #15003 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13runtime(vim): Update base-syntax, match :catch and :throw args (#14989)dkearns
Match :catch /{pattern}/ and :throw {expr1}. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13runtime(java): Include element values in non-marker annotations (#14979)Aliaksei Budavei
Make a formal definition for normal and single-element kinds of annotations that otherwise require for their containment to repeat each time all syntax groups that describe element values. Reference: https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.7 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12runtime(vim): Update g:vimsyn_comment_strings dump file testsDoug Kearns
Leading whitespace is no longer matched as part of the line comment as of #13936. closes: #14971 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11runtime(vim): Update base-syntax, configurable comment string highlighting ↵dkearns
(#14931) Allow highlighting of strings within comments to be disabled by setting g:vimsyn_comment_strings to false. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11runtime(vim): Update base-syntax, match multiline continued comments (#13936)dkearns
Match multiline (continued) line comments. Continued tail comments are not supported yet. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11runtime(vim): Remove orphaned screen dump files (#14965)dkearns
These are no longer generated by the current test input files. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10runtime(kdl): include syntax, indent and ftplugin filesinzuo Jiang
closes: #14956 Co-authored-by: Aram Drevekenin <aram@poor.dev> Signed-off-by: inzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10runtime(deb822sources): add missing Enabled field in syntax scriptKentaro Hayashi
closes: #14898 It lacks the support of Enabled: boolean option field [1]: e.g. Types: deb Uris: https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ Components: main Suites: vscodium Architectures: amd64 i386 arm64 armhf Enabled: yes Signed-By: /var/lib/extrepo/keys/vscodium.asc This patch was also forwarded to upstream. [2] [1] https://manpages.debian.org/unstable/apt/sources.list.5.en.html#DEB822-STYLE_FORMAT [2] https://salsa.debian.org/vim-team/vim-debian/-/merge_requests/16 Signed-off-by: Kentaro Hayashi <kenhys@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>