-
Notifications
You must be signed in to change notification settings - Fork 32
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
web-mode support doesn't work well for heterogeneous indent types #66
Comments
This is a challenge indeed! I think the fundamental problem here is that I don't know how much sense it would make to try to add this functionality to such a general-purpose mode as |
I had been setting them in a major mode hook, but the trouble is that Doom Emacs runs the indent detection after those hooks, leading to a confusing situation where my settings got blown away. I had to track down what was changing it by grepping for the message "Note: ... adjusted to 2" which appeared in the messages buffer. Wish that instead of "Note:" it began with "dtrt-indent:" btw :) |
You can turn off |
I suspect that won't work in Doom -- in case it helps anyone, the Doom solution was (add-to-list 'doom-detect-indentation-excluded-modes 'web-mode)
(add-to-list 'doom-detect-indentation-excluded-modes 'typescript-tsx-mode) |
I have a codebase that uses different values for different
web-mode
indentation variables within.tsx
files. For example:Here's some code written this way:
When I run
dtrt-indent-diagnosis
, it says "Guessed offset 2 with 100% confidence" and sets all my variables to 2. No doubt because it expects them all to be the same; see here.Unfortunately this is probably hard to fix because it requires a more detailed understanding of JSX/TSX files.
The text was updated successfully, but these errors were encountered: