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

Wrong json-mode formatter chosen when specified in dir-locals file #328

Open
daut opened this issue Oct 30, 2024 · 0 comments
Open

Wrong json-mode formatter chosen when specified in dir-locals file #328

daut opened this issue Oct 30, 2024 · 0 comments

Comments

@daut
Copy link

daut commented Oct 30, 2024

I'm trying to specify different formatters for three different modes in .dir-locals.el file. Here's how the file looks like.

((js-mode . ((apheleia-formatter . eslint)))
 (json-mode . ((apheleia-formatter . prettier-json)))
 (web-mode . ((apheleia-formatter . eslint))))

js and web mode files are correctly using eslint formatter, but json-mode incorrectly uses eslint as well. When I delete the first line from the above dir-locals file json-mode correctly has prettier-json set in the apheleia-formatter variable.

I'm suspecting this is caused by the fact that javascript-mode is json-mode's parent, but don't have an idea how to fix it. Are there any ways around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant