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

Migrate language definitions to code_languages.py #1585

Open
nriley opened this issue Nov 2, 2024 · 0 comments
Open

Migrate language definitions to code_languages.py #1585

nriley opened this issue Nov 2, 2024 · 0 comments

Comments

@nriley
Copy link
Collaborator

nriley commented Nov 2, 2024

From #1528 (comment):

In the community session today we talked further on this topic. We think we should probably have a new python file code_languages.py where we have the language definitions. This python file can then be used by the language modes and the snippets.

We want to have these language definitions typed and something like this could probably work:

string_or_list = str | list[str]
lang = tuple[str, string_or_list] | tuple[str, string_or_list, string_or_list]

languages: list[lang] = [
    ("python", ["python"]),
    ("java", "java"),
    ("javascript", ["javascript"], ["something something"]),
]
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