-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[language-support] Add support for ObjectPascal
#1426
Comments
Hi! Thanks for reporting. If we were to add It appears that @CoenraadS already had to deal with language name mappings for its extension in the past (https://github.com/CoenraadS/BracketPair/issues/99, https://github.com/CoenraadS/BracketPair/issues/128, https://github.com/CoenraadS/BracketPair/issues/131...). Maybe this issue should be fixed the same way here. Thoughts, @CoenraadS? |
Is there a better way? I would like to be able to pass an alias to the loadLanguages function and have it choose the correct parameters, so I don't have to do so myself. This code was actually from before loadLanguages was available, so maybe it can already handle aliases, but I didn't check very hard. |
@Golmote: The language are |
@CoenraadS I think @pakLebah You seem to know your stuff, so i'll trust you on this ^^. We could then add only |
@Golmote: Thank you. I've been a professional Pascal programmer for more than fifteen years, mostly with Delphi and Free Pascal. Well… it was before I retired a few years ago. Now I'm doing programming just for fun and hobby So, yes… I know this Pascal stuffs well enough. 😊 |
@Golmote Great! I was just talking about the PrismJS aliases also, not vscode specific ones or languages hacks I did just because existing languages are good enough to get the bracket information. |
@Golmote You've added ObjectPascal as an alias for Pascal. Is there any other action item here? |
@mAAdhaTTah Yes, we need to make |
We can. |
* gh-pages: (33 commits) Add double-class specificity hack (#1435) Moved tutorial link to the end of the list Make line-numbers styles more specific Fix mixed content warning Create CNAME Delete CNAME Update documentation for node & webpack usage Handle optional dependencies in `loadLanguages()` (#1417) Add `objectpascal` as an alias to `pascal` (see #1426) Add support for XQuery. Fix #1405 (#1411) Website: Fix Download page not handling multiple dependencies when from Redownload URL JSX: Add support for fragments short syntax. Fix #1421 Support for Template Toolkit 2 (#1418) ASP.NET should require C# Run gulp Move guard into conditional and check for language Don't process language if block language not set JSX: Allow for two levels of nesting inside JSX tags. Fix #1408 Add missing reference to issue in specific test. Powershell: Allow for one level of nesting in expressions inside strings. Fix #1407 ... # Conflicts: # components/prism-kotlin.js
Maybe add an alias for 'Delphi' also? |
@shaunroselt As @pakLebah pointed out: Delphi is merely the name of a compiler for a Pascal/ObjectPascal dialect and therefore shouldn't be classified as its own language. |
I know PrismJS already supports Pascal language. However, modern Pascal language –that's being used by Delphi, Free Pascal, Oxygene, etc– tend to call itself as Object Pascal, instead of just simple Pascal. Because the latter is mostly known as and associated to the old school Wirth's Pascal of the 70's.
So, I propose either PrismJS renames its
Pascal
language intoObjectPascal
, or create a duplicate ofPascal
language and name it asObjectPascal
.Why the name is important? Because I'm using VS Code to write Object Pascal programs with OmniPascal extension. I'm also using Bracket Pair Colorizer extension. The problem is… OmniPascal extension only supports
ObjectPascal
language, while Bracket Pair extension only supportPascal
language. Bracket Pair extension is using PrismJS as its language definition tool, so I have to ask PrismJS if I want Bracket Pair extension to support a new language.Yes, I know it's a bit complicated relationship that I have to live on if I want to write Object Pascal programs using those extensions. Hopefully you'll understand.
Thank you. 😊
The text was updated successfully, but these errors were encountered: