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

Keyword syntax hightlighting on ImportTool methods #1

Open
hkailahi opened this issue Mar 20, 2020 · 0 comments
Open

Keyword syntax hightlighting on ImportTool methods #1

hkailahi opened this issue Mar 20, 2020 · 0 comments

Comments

@hkailahi
Copy link
Owner

hkailahi commented Mar 20, 2020

Current syntax highlighting:

import somelib
import otherlib
from blah import thing1, thing2

from bd.import_tool import ImportTool
ImportTool(locals_dict=locals())\
.from_( "foo" ).import_( "a" )\
.from_( "bar" ).import_( ["x", "y"] )\
.from_( "baz" ).import_( "f" )\
.from_( "baz" ).import_( "e" ).as_("🔥🔥🔥")\
               .import_( "g" ).as_("e")\
.import_( "qux").as_( "yeezy" )\
.import_( "new.dis.who.🍌" )

To better get the point of this library across, provide the same syntax highlighting for from_, import_, as_, and any ImportTool.{*} as corresponding python keywords (from, import, as, ...).

Check out Linguist (Github syntax highlight configurations). Maybe as simple as setting linguist-language in .gitattributes to our own forked variation of MagicPython???

# Example of a `.gitattributes` file which reclassifies `.py` files as `pYtHoN`:
*.py linguist-language=pYtHoN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant