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

Custom language support #44

Open
arnav56745 opened this issue Aug 15, 2023 · 4 comments
Open

Custom language support #44

arnav56745 opened this issue Aug 15, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed syntax highlighting related to syntax highlighting

Comments

@arnav56745
Copy link

Hi, its me again.
** 3 Issues in one repo! **
Anyway, I want custom language support for editor
Like

class MyLexer:
      keywords = ["echo", "rmdir", "if"]
e = Editor(root, lexer=MyLexer)
e.pack()
@tomlin7 tomlin7 added enhancement New feature or request help wanted Extra attention is needed syntax highlighting related to syntax highlighting labels Aug 15, 2023
@arnav56745
Copy link
Author

@billyeatcookies Anything you want to say

@tomlin7
Copy link
Owner

tomlin7 commented Aug 25, 2023

@arnav56745 sorry for the delay (uni)

since cupcake uses pygments this will be easy to setup!
https://pygments.org/docs/lexerdevelopment/#regexlexer
https://pygments.org/docs/lexerdevelopment/#using-a-lexer

@tomlin7
Copy link
Owner

tomlin7 commented Aug 25, 2023

i will implement a cleaner api for this!

@tomlin7 tomlin7 self-assigned this Aug 25, 2023
@arnav56745
Copy link
Author

great! keep it on
i also want an active pr

@tomlin7 tomlin7 added this to the Update cupcake core milestone Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed syntax highlighting related to syntax highlighting
Projects
None yet
Development

No branches or pull requests

2 participants