-
Notifications
You must be signed in to change notification settings - Fork 56
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
Cannot add custom formatter for any of the languages listed in INCOMPATIBLE_MAGIC_LANGUAGES #298
Comments
FWIW I am in middle to a big refactor for the project (mostly due to the evolution of jupyterlab's plugin tooling), I can look into how to integrate sqlfluff nicely here after that. Without the the refactor, the development envrionment for this plugin is just nightmare-ish to use, so that is currently trumping all tasks. |
Hello 👋 I am back with some updates. I have completed my refactor and have some time to work on this project. I assume you are working on sqlfluff base on this link on adding custom formatter? A stop gap solution would be copy and paste I am just a bit hesitant about turning blacklist into whitelist, as I don't fully comprehend how that helps/fits in in the grand scheme of things. With that said, I would love to add |
Hi Ryan, I haven't hacked anything yet. I decided to go forward without this for this year's edition (of the db course). PS: I used jupyter-lsp and sql-language-server instead but I think having the Format button would be much better to reduce variability in students code :-) |
Hi @flaviomartins - could you perhaps attach a notebook from your course here please? Such that I can confirm it works for your usecase from the get go :) |
Hi @ryantam626, ok, I think this notebook could be our MWE |
sweet! thanks, i will see what i can do, but my bandwidth is more limited these days so i will be a bit slow. |
Checklist prior to opening an issue
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
The text was updated successfully, but these errors were encountered: