linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Outstanding Grammar Issues

Open vmg opened this issue 6 years ago • 39 comments

The following is a detailed list of all the outstanding issues in the grammars that GitHub.com uses for syntax highlighting the code in our website.

These issues are detected by our grammars compiler (https://github.com/github/linguist/pull/3915) and are probably causing minor rendering bugs in the website.

Help is very much welcome! If you're seeing bugs or rendering issues in your source code in GitHub, please start by taking a look at this list to make sure we're not detecting any issues in your language's grammar.

Feel free to ask any questions about any given issue and what would be the appropriate way to fix it. I'll keep the issue up-to-date as I work through grammar fixes myself.

cc @github/linguist @pchaigno @Alhadis


Last updated: 13 Mar 2024

  • [ ] repository vendor/grammars/MATLAB-Language-grammar (from https://github.com/mathworks/MATLAB-Language-grammar) (8 errors)

    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(\)|(?<!\.{3}.*)\n)": lookbehind assertion is not fixed length (at offset 15))
    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(\}|(?<!\.{3}.*)\n)": lookbehind assertion is not fixed length (at offset 15))
    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(?=;|(?<!(?:\.{3}.*))\n|%)": lookbehind assertion is not fixed length (at offset 20))
    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(\))?[^\S\n]*(?=;|(?<!(?:\.{3}.*...": lookbehind assertion is not fixed length (at offset 33))
    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(\)|(?<!\.{3}.*)\n)": lookbehind assertion is not fixed length (at offset 15))
    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(\)|(?<!\.{3}.*)\n)": lookbehind assertion is not fixed length (at offset 15))
    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(?<=\))|(?>(?<!\.{3}.*)\n)": lookbehind assertion is not fixed length (at offset 22))
    • Invalid regex in grammar: source.matlab (in Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage) contains a malformed regex (regex "(\)|(?<!\.{3}.*)\n)": lookbehind assertion is not fixed length (at offset 15))
  • [ ] repository vendor/grammars/TypeScript-TmLanguage (from https://github.com/Microsoft/TypeScript-TmLanguage) (2 errors)

    • Invalid regex in grammar: source.ts (in TypeScript.tmLanguage) contains a malformed regex (regex "(?!(?<![_$[:alnum:]])(?:(?<=\.\....": lookbehind assertion is not fixed length (at offset 731))
    • Invalid regex in grammar: source.tsx (in TypeScriptReact.tmLanguage) contains a malformed regex (regex "(?!(?<![_$[:alnum:]])(?:(?<=\.\....": lookbehind assertion is not fixed length (at offset 731))
  • [ ] repository vendor/grammars/abl-tmlanguage (from https://github.com/chriscamicas/abl-tmlanguage) (2 errors)

    • Invalid regex in grammar: source.abl (in abl.tmLanguage.json) contains a malformed regex (regex "(?i)(?<=^|\s*)(today|now)(?!\w|-...": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.abl (in abl.tmLanguage.json) contains a malformed regex (regex "(?i)(?<=\s+|^)(for|preselect)[\s...": lookbehind assertion is not fixed length (at offset 11))
  • [ ] repository vendor/grammars/c.tmbundle (from https://github.com/textmate/c.tmbundle) (4 errors)

    • Invalid regex in grammar: source.c.platform (in Syntaxes/Platform.tmLanguage) contains a malformed regex (regex "\b(?:A(?:APNot(?:CreatedErr|Foun...": definition too long (282084 bytes))
    • Invalid regex in grammar: source.c.platform (in Syntaxes/Platform.tmLanguage) contains a malformed regex (regex "\b(?:A(?:E(?:A(?:ddressDesc|rray...": definition too long (52248 bytes))
    • Invalid regex in grammar: source.c.platform (in Syntaxes/Platform.tmLanguage) contains a malformed regex (regex "\b(?:CATransform3DIdentity|KERNE...": definition too long (33340 bytes))
    • Invalid regex in grammar: source.c.platform (in Syntaxes/Platform.tmLanguage) contains a malformed regex (regex "(\s*)(\b(?:A(?:E(?:Build(?:Apple...": definition too long (58589 bytes))
  • [ ] repository vendor/grammars/csharp-tmLanguage (from https://github.com/dotnet/csharp-tmLanguage) (4 errors)

    • Invalid regex in grammar: source.cs (in grammars/csharp.tmLanguage) contains a malformed regex (regex "(?<!\.\s*)\b(await)\b": lookbehind assertion is not fixed length (at offset 9))
    • Invalid regex in grammar: source.cs (in grammars/csharp.tmLanguage) contains a malformed regex (regex "\G(?=(?~\*/)$)": unrecognized character after (? or (?- (at offset 7))
    • Invalid regex in grammar: source.cs (in grammars/csharp.tmLanguage) contains a malformed regex (regex "^(\s*+)(\*(?!/))?(?=(?~\*/)$)": unrecognized character after (? or (?- (at offset 22))
    • Invalid regex in grammar: source.cs (in grammars/csharp.tmLanguage) contains a malformed regex (regex "(?<!\.\s*)\b(await)\b": lookbehind assertion is not fixed length (at offset 9))
  • [ ] repository vendor/grammars/gap-tmbundle (from https://github.com/dhowden/gap-tmbundle) (3 errors)

    • Invalid regex in grammar: source.gap (in Syntaxes/GAP.tmLanguage) contains a malformed regex (regex "\b(16Bits_AssocWord|16Bits_Depth...": definition too long (65523 bytes))
    • Invalid regex in grammar: source.gap (in Syntaxes/GAP.tmLanguage) contains a malformed regex (regex "\b(IndicesChiefNormalSteps|Indic...": definition too long (65529 bytes))
    • Invalid regex in grammar: source.gap (in Syntaxes/GAP.tmLanguage) contains a malformed regex (regex "\b(SMTX_GoodElementGModule|SMTX_...": definition too long (42470 bytes))
  • [ ] repository vendor/grammars/godot-vscode-plugin (from https://github.com/godotengine/godot-vscode-plugin) (1 errors)

    • Invalid regex in grammar: source.gdscript (in syntaxes/GDScript.tmLanguage.json) contains a malformed regex (regex "(?<!/\s*)(\$|%|\$%)([a-zA-Z_]\w*...": lookbehind assertion is not fixed length (at offset 8))
  • [ ] repository vendor/grammars/lua.tmbundle (from https://github.com/LuaLS/lua.tmbundle.git) (22 errors)

    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@class": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@enum": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@type": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@alias": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)(@operator)\s*(\b[...": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@cast": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@param": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@return": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@field": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@generic": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@vararg": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@overload": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@deprecated": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@meta": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@private": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@protected": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@package": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@version": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@see": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@diagnostic": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@module": lookbehind assertion is not fixed length (at offset 13))
    • Invalid regex in grammar: source.lua (in Syntaxes/Lua.plist) contains a malformed regex (regex "(?<=---[ \t]*)@(async|nodiscard)": lookbehind assertion is not fixed length (at offset 13))
  • [ ] repository vendor/grammars/mathematica-tmbundle (from https://github.com/shadanan/mathematica-tmbundle) (1 errors)

    • Invalid regex in grammar: source.mathematica (in Syntaxes/Mathematica.tmLanguage) contains a malformed regex (regex "(\b|(?<=_))(Abort|AbortKernels|A...": definition too long (54020 bytes))
  • [ ] repository vendor/grammars/nu-grammar (from https://github.com/hustcer/nu-grammar.git) (1 errors)

    • Invalid regex in grammar: source.nushell (in grammars/tmLanguage.json) contains a malformed regex (regex "(?<=]\s*)(:)\s+(\[)": lookbehind assertion is not fixed length (at offset 8))
  • [ ] repository vendor/grammars/objective-c.tmbundle (from https://github.com/textmate/objective-c.tmbundle) (2 errors)

    • Invalid regex in grammar: source.objc.platform (in Syntaxes/Platform.tmLanguage) contains a malformed regex (regex "\b(?:AB(?:AddRecordsError|Multip...": definition too long (32854 bytes))
    • Invalid regex in grammar: source.objc.platform (in Syntaxes/Platform.tmLanguage) contains a malformed regex (regex "\b(?:A(?:M(?:Action(?:A(?:pplica...": definition too long (44404 bytes))
  • [ ] repository vendor/grammars/sublime-autoit (from https://github.com/AutoIt/SublimeAutoItScript) (2 errors)

    • Invalid regex in grammar: source.autoit (in AutoIt.tmLanguage) contains a malformed regex (regex "\b(?i:_array1dtohistogram|_array...": definition too long (39591 bytes))
    • Invalid regex in grammar: source.autoit (in AutoIt.tmLanguage) contains a malformed regex (regex "\b(?i:_guictrltoolbar_getbuttoni...": definition too long (39600 bytes))
  • [ ] repository vendor/grammars/turtle.tmbundle (from https://github.com/peta/turtle.tmbundle) (5 errors)

    • Invalid regex in grammar: source.turtle (in Syntaxes/Turtle.tmLanguage) contains a malformed regex (regex "(?x) (?<PNAME_NS> (?: (?: [\...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 68))
    • Invalid regex in grammar: source.turtle (in Syntaxes/Turtle.tmLanguage) contains a malformed regex (regex "(?x)( (?: [\p{L}\p{M}] | [:0...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 121))
    • Invalid regex in grammar: source.turtle (in Syntaxes/Turtle.tmLanguage) contains a malformed regex (regex "\[[\u20\u9\uD\uA]*\]": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 4))
    • Invalid regex in grammar: source.turtle (in Syntaxes/Turtle.tmLanguage) contains a malformed regex (regex "(?x)((?<=\s|^|_)(?:[\p{L}\p{M}] ...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 57))
    • Invalid regex in grammar: source.turtle (in Syntaxes/Turtle.tmLanguage) contains a malformed regex (regex "(?x) (?<PN_CHARS_U>[\p{L}\p{M...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 73))
  • [ ] repository vendor/grammars/vscode-jest (from https://github.com/jest-community/vscode-jest) (1 errors)

    • Grammar conversion failed. File syntaxes/ExtSettingsSchema.json failed to parse: Undeclared scope in grammar: syntaxes/ExtSettingsSchema.json has no scope name
  • [ ] repository vendor/grammars/vscode-move-syntax (from https://github.com/damirka/vscode-move-syntax.git) (3 errors)

    • Invalid regex in grammar: mdx.LANGUAGE.codeblock (in syntaxes/move-mdx-injection.json) contains a malformed regex (regex "(^|\G)(\s*)(\{3,}|~{3,})\s*(?i:`...": missing ) (at offset 42))
    • Invalid regex in grammar: source.move (in syntaxes/move.tmLanguage.json) contains a malformed regex (regex "(?<=(module|spec))": lookbehind assertion is not fixed length (at offset 17))
    • Invalid regex in grammar: source.move (in syntaxes/move.tmLanguage.json) contains a malformed regex (regex "(?<=(module|spec))": lookbehind assertion is not fixed length (at offset 17))
  • [ ] repository vendor/grammars/vscode-vba (from https://github.com/serkonda7/vscode-vba.git) (1 errors)

    • Invalid regex in grammar: source.vba (in syntaxes/vba.yaml-tmlanguage) contains a malformed regex (regex "(?i:\b(?:(?<=(Call|Function|Sub)...": lookbehind assertion is not fixed length (at offset 33))
  • [ ] repository vendor/grammars/vscode-yara (from https://github.com/infosec-intern/vscode-yara.git) (1 errors)

    • Invalid regex in grammar: source.yara (in yara/syntaxes/yara.tmLanguage.json) contains a malformed regex (regex "(?<=(^|[\)]|\b(?:them)\b))(?:\s*...": lookbehind assertion is not fixed length (at offset 25))

Other

  • vendor/grammars/Sublime-QML - skozlovf/Sublime-QML - the project has been restructured and rewritten and only provides a Sublime 3 compatible grammar which is not supported. This grammar will need to be replaced and will no longer be updated.

vmg avatar Nov 30 '17 11:11 vmg

Thanks for the useful and actionable list @vmg. One question...

repository vendor/grammars/language-babel (from https://github.com/gandm/language-babel) (14 errors)

Is this the actual upstream grammar as it stands now or the old pinned copy we're shipping with Linguist at the moment?

I'm assuming the latter, but thought I'd check to be sure.

lildude avatar Nov 30 '17 11:11 lildude

I'm assuming the latter, but thought I'd check to be sure.

Correct! I fucked up my submodules. Sorry about that, I'll update the list with the proper URL.

vmg avatar Nov 30 '17 14:11 vmg

Hey, sorry about the (really) slow response. My MacBook died last week, which means I've been painfully limited in what I'm able to do on GitHub (I'm using my work's computer for the time being, when time permits).

The issues reported by my grammars are easily fixed; but the LilyPond grammar should be fixed with a PR to the upstream repository. Basically, the scope.AtLilyPond should be replaced with just scope.lilypond so it's consistent with other LilyPond grammars (and I can therefore replace the offending rule in text.roff with a single inclusion: {include: "source.lilypond"}.

Alhadis avatar Dec 05 '17 00:12 Alhadis

What's the maximum token length permitted by the new compiler? I was about to start fixing the issues with Emacs Lisp's grammar, but realised I don't have the actual limit to go by.

Admittedly, I'm not really fond about the size limit, because the "fix" here is to simply break the pattern down into multiple rules that're bunched together under the same name. It feels terribly hacky, and the fact that the rules in question were compiled from an external source means that updating the list in future might be made more complicated...

Alhadis avatar Jan 01 '18 05:01 Alhadis

@Alhadis: Sorry, you caught me on Holidays. The maximum size is enforced by PCRE, not by our parser, and it's 64kb for a single regexp. I'm aware it's a bummer, but it's the way PCRE was designed.

vmg avatar Jan 08 '18 09:01 vmg

That's understandable. How is whitespace treated inside expressions which use "expanded" notation...?

m/
	abc
	(?:
		xyz
	)
	(?=\w+)
/x;

Because there are two different ways to represent that in CSON. One is with an ordinary quoted-string, which includes embedded newlines as part of the pattern...

pattern: "(?x)
	abc
	(?:
		xyz
	)
	(?=\\w+)
"

... and the other is to use triple-quoted strings ("heredocs"):

pattern: """(?x)
	abc
	(?:
		xyz
	)
	(?=\\w+)
"""

The latter will strip as much indentation as it can, leaving some (but not all) horizontal whitespace after the CSON-to-JSON conversion:

(?x)
	abc
	(?:
	        xyz
	)
	(?=\\w+)

Now this won't make any difference to the regex engine, but it will to my subdivision efforts... :grinning:

Alhadis avatar Jan 08 '18 11:01 Alhadis

@Alhadis I'm honestly not sure of how exactly does PCRE implement this -- you should be able to test it out by simply downloading libpcre and trying to compile in the regexps. Our parser has no custom behavior here.

vmg avatar Jan 08 '18 17:01 vmg

Okay, that's the last of my grammars fixed. 😉

Alhadis avatar Jan 10 '18 20:01 Alhadis

@Alhadis You closed this by mistake, right? :smile_cat:

pchaigno avatar Jan 10 '18 20:01 pchaigno

Yeah, sorry. I didn't even notice I'd pressed the wrong button to comment. My mistake. 😓

Alhadis avatar Jan 11 '18 02:01 Alhadis

@Alhadis :bow::bow::bow:

vmg avatar Jan 11 '18 08:01 vmg

I've updated the sublime-mask output in the OP as the latest grammar compiler now prefer the "compiled" .tmLanguage file over the YAML file and sublime-mask has only updated the YAML file. I have pinged the author in https://github.com/tenbits/sublime-mask/pull/1 asking them to update the mask.tmLanguage file too.

lildude avatar Jan 29 '18 14:01 lildude

repository vendor/grammars/oz-tmbundle (from https://github.com/eregon/oz-tmbundle) (1 errors) Grammar conversion failed. File Originals/Oz.tmLanguage failed to parse: XML syntax error on line 23: expected element name after <

@vmg Do you have more information on that error? I don't see anything weird in the XML format...

pchaigno avatar Feb 12 '18 12:02 pchaigno

I don't see anything weird in the XML format...

It's mixing tabs and spaces for indentation, but other than that, I can't see anything wrong either... :confused:

Alhadis avatar Feb 12 '18 14:02 Alhadis

The issue is that it's loading Syntaxes/Oz.tmLanguage and Originals/Oz.tmLanguage. The grammar in Originals is not even valid XML, but has the same extension, so we attempt to load both.

This is fixable in the compiler (most likely fix: ensure that the .tmLanguage file is in a Syntaxes folder -- although that could break other grammars). I can't get to that this week, but if anybody wants to pick it up it should be a pretty straightforward fix. The Go codebase is pretty simple! 😄

vmg avatar Feb 12 '18 14:02 vmg

Ok. Thanks for the explanation @vmg! Won't have time either this week, but I'll try to look into it later. I need to better understand the Go code anyway.

pchaigno avatar Feb 12 '18 14:02 pchaigno

IMHO, the Missing include in grammar: errors should be downgraded to warnings; or, at the very least, passed through a whitelist of manual approvals (similar to how we're whitelisting certain license hashes).

It's currently impossible for a grammar package to support both GitHub and their respective editors if two grammars disagree on their scopeName . For example, I can't publish this or even view its Lex highlighting locally correctly because Atom's C++ grammar uses source.cpp as its scopeName, whereas Linguist's C++ grammar uses source.c++ instead.

The logical solution would be to include both:

patterns: [
	{include: "source.c++"}
	{include: "source.cpp"}
]

... which the compiler will flag as an error.

Alhadis avatar Aug 14 '19 09:08 Alhadis

vendor/grammars/Lean.tmbundle is no longer part of the repo so can be removed from this list.

eric-wieser avatar Jun 01 '21 18:06 eric-wieser

The overall list needs updating, but Lean isn't in the clear. IIRC the new grammar has even more issues than the old one currently listed 😉

I'll update the list tomorrow.

lildude avatar Jun 01 '21 18:06 lildude

I've updated the OP with the current, as of 2 Jun 2021, grammar issues.

lildude avatar Jun 02 '21 09:06 lildude

syntaxes/lean-markdown.json is copied from a vs-code markdown grammar, and modified to exit the markdown scope early, to support things like /- a comment with unpaired `markdown syntax -/ without ` consuming the -/ and the rest of the document.

It produces the errors you see here presumably because the dependencies of the vscode markdown grammar are also missing. I don't think there's much we can do beyond maintaining an entirely separate grammar for github.

eric-wieser avatar Jun 02 '21 09:06 eric-wieser

@lildude Could we downgrade "Missing include in grammar:… the scope cannot be found" errors to build-time warnings, please? The scenario @eric-wieser described is far from an isolated case, or even an unlikely one. Many grammars will attempt to include community grammars if they're available, and not all of them will be recognised by Linguist. It's different to include: #someRule or include: recognised-grammar-scope#misspelt-rule, which are obviously errors that need to be brought to upstream's attention.

Moreover, I'd ditch the Unknown keys in grammar errors too, because every grammar format we support uses general-purpose data formats that may support additional case-specific data unrelated to syntax highlighting. Several times I've wanted to attach inline metadata to my grammars, but held off knowing it'd cause issues with Linguist. As in, harmless stuff like this:

block:
	name:  "meta.block"
	begin: "(\\w+)\\s*({)"
	end:   "}"
	beginCaptures:
		1:
			name: "entity.name.block"
		2:
			name: "punctuation.definition.block.begin"
			fold: ">1"
			indent: "increase"
	endCaptures:
		0:
			name: "punctuation.definition.block.end"
			fold: "<1"
			indent: "decrease"

Alhadis avatar Jun 02 '21 10:06 Alhadis

Could we downgrade "Missing include in grammar:… the scope cannot be found" errors to build-time warnings, please?

It's on my massive todo list 😁. I've even got a branch locally that I've started this but haven't got it into a workable state yet as I've not had the time.

Moreover, I'd ditch the Unknown keys in grammar errors too, because every grammar format we support uses general-purpose data formats that may support additional case-specific data unrelated to syntax highlighting.

I've considered this, but I'm not sure if this could accidentally let problems through without anyone noticing. I'd need to do more research.

lildude avatar Jun 02 '21 16:06 lildude

The MATLAB "Unknown keys in grammar" error is resolved in mathworks/MATLAB-Language-grammar#38 😄 along with many other improvements

ghost avatar Jul 02 '21 23:07 ghost

@lildude when you get the time, please ✅ the MATLAB tasks 😄

ghost avatar Jul 07 '21 15:07 ghost

I'm not sure where to post this so I'm just gonna post it here. I came across a TypeScript rendering/syntax highlighting issue the other day here on GitHub. I sent in a support ticket and they redirected me to this repo.

The issue can be viewed here. Thanks

tmillr avatar Sep 19 '22 05:09 tmillr

@tmillr grammar problems should be reported with the upstream maintainers. In the case of TypeScript it is this repo. As this is a tree-sitter grammar, Linguist has no control over the updates so it's possible this issue has been fixed but not yet pulled into GitHub.

lildude avatar Sep 19 '22 10:09 lildude

@lildude The Godot Engine grammars should have been fixed in https://github.com/godotengine/godot-vscode-plugin/pull/416.

I attempted to validate the fixes using the grammar compiler instructions you gave us, but I don't know how to actually run linguist to make 100% sure that they're working now.

DaelonSuzuka avatar Nov 29 '22 23:11 DaelonSuzuka

I don't know how to actually run linguist to make 100% sure that they're working now.

Running Linguist wouldn't help you as it doesn't actually do the highlighting. This is done by an internal service so you can only go based on what the validator says, or not.

lildude avatar Nov 30 '22 10:11 lildude

The Python grammar referenced by this repo (MagicStack/MagicPython@7d0f2b22a5ad8fccbd7341bc7b7a715169283044) includes support for the new Python match/case keywords but I'm not seeing them highlighted (see here). Is this just caused by the latest Linguist not being deployed to the Github backend servers (why would it take three months to do that??), or is there some other bug?

dragoncoder047 avatar Jan 31 '23 16:01 dragoncoder047