Skip to content

Cannot add custom formatter for any of the languages listed in INCOMPATIBLE_MAGIC_LANGUAGES #298

@flaviomartins

Description

@flaviomartins

Checklist prior to opening an issue

  • I have followed fully the installation steps laid out in the documentation site.
  • I have restarted jupyterlab.
  • I have read the FAQ section in the documentation site.

Describe the bug
Cannot add custom formatter for any of the languages listed in INCOMPATIBLE_MAGIC_LANGUAGES

Additional context
I was trying to implement a custom formatter using sqlfluff for %sql cells but it looks like some languages are disallowed in this project.

I am thinking, maybe turning INCOMPATIBLE_MAGIC_LANGUAGES blacklist into COMPATIBLE_MAGIC_LANGUAGES whitelist and make the mechanism for whitelisting additional magic_languages just having a default formatter configured for it in the preferences?

Expected behaviour
If a default_formatter is configured for "sql" in the user preferences then the corresponding formatter would be called regardless

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions