jeff-hykin / better-shell-syntax

💾 📦 ♻️ An improvement to the shell syntax for VS Code
MIT License
52 stars 4 forks source link

Why does better-shellscript-syntax contain syntax for Perl, C, C++ and Obj-C? #20

Closed CodingMarkus closed 1 year ago

CodingMarkus commented 2 years ago

When installing an extension named better-shellscript-syntax, I don't expect it to affect any syntax highlighting other than the one of shell scripts.

And when I look into the VSIX file, which I don't expect to be 3.5 MB in size, I don't expect to find the following highlighted files inside

Screen Shot 2022-01-14 at 11 52 27

I know that this is because

This extension is part of a family of extensions for providing better syntax.

but I didn't install the syntax mega pack or any of these other extensions being part of the family, I only installed shellscript syntax and it should contain nothing and affect nothing but files related to shell script syntax. I think that is a reasonable expectation and would cut down the size of the extension below 500 kB.

If I want to have the other syntax improvements as well, I can install their packages or one of the mega packages.

jeff-hykin commented 2 years ago

It wasn't an intentional thing. I'm open to PR's removing them.

All of the grammars use a library we wrote for C++. At the time It was not published as it was in alpha/beta. There was also a lot of tooling and filepaths that were difficult to change, so I just forked the C++ one and added Perl because I was really annoyed with the existing syntax and just wanted a quick fix.

Since that time, the parsing library has been published, and I've created a clean standalone template for new languages. I've used that new template for Better Prolog Syntax, Better C Syntax, etc but haven't yet cleaned up the Perl, Shell, and Docker syntaxes.

jeff-hykin commented 1 year ago

Codebase got reorganized with v1.2.1, and those leftover files are no longer included