Skip to content
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

[python] Integrate MagicPython into VS Code #2867

Closed
MadSpindel opened this issue Feb 9, 2016 · 7 comments
Closed

[python] Integrate MagicPython into VS Code #2867

MadSpindel opened this issue Feb 9, 2016 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality languages-basic Basic language support issues
Milestone

Comments

@MadSpindel
Copy link

MagicPython is so much better than the default Python syntax highlighter in VS Code. In my opinion, MagicPython should be the default Python syntax highlighter.

@alexdima
Copy link
Member

fyi @aeschli

@alexdima alexdima added the feature-request Request for new features or functionality label Feb 10, 2016
@aeschli aeschli changed the title Integrate MagicPython into VS Code [python] Integrate MagicPython into VS Code Feb 10, 2016
@aeschli aeschli added the languages-basic Basic language support issues label Feb 10, 2016
@aeschli aeschli added this to the Backlog milestone Feb 10, 2016
@aeschli aeschli assigned angrieco and aeschli and unassigned angrieco Feb 10, 2016
@nchammas
Copy link

+1

Apparently, GitHub uses MagicPython as part of Linguist.

@aeschli aeschli assigned DonJayamanne and unassigned aeschli Jul 14, 2016
aeschli added a commit that referenced this issue Aug 22, 2016
@1st1
Copy link

1st1 commented Aug 22, 2016

@aeschli Hi Martin,

I'm looking at f496772 -- I think we should give the schemas (tmLanguage) different names, i.e.:

"name": "MagicPython",

should really be

"name": "Python",

(same for regexp syntax).

Otherwise I'm afraid of potential compatibility issues with using MagicPython extension.

@DonJayamanne
Copy link
Contributor

@1st1 , thanks for identifying that issue. Hopefully the new PR fixes that.

@aeschli
Copy link
Contributor

aeschli commented Aug 23, 2016

@1st1 VSCode doesn't use the name in the tmLanguageFile. We instead use the first 'alias' in the language contribution: https://github.com/Microsoft/vscode/blob/master/extensions/python/package.json#L9.
Replacing a grammar is independent of its name. Any extension can replace the built-in grammar by making a grammar definition for the same language id, and by adding a extension dependency to the built-in grammar:

"contributes": {
    "grammars": [{
        "language": "python",
        "scopeName": "source.python",
        "path": "./syntaxes/MyNewPython.tmLanguage.json"
    }],
},
"extensionDependencies": [ "vscode.python" ]

@aeschli
Copy link
Contributor

aeschli commented Aug 23, 2016

As the name is not used, we can of course still change it, but I recommend to keep it as is so that people can see where the grammar comes from.

@DonJayamanne
Copy link
Contributor

Closing, as nothing further to be done anymore.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality languages-basic Basic language support issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants