dockerfile-mode
dockerfile-mode copied to clipboard
Messed up indentation
Talking about this commit: https://github.com/spotify/dockerfile-mode/commit/9f4381178aa03212cd3400c60c0f48ff306a0994
I'm not sure how its for others but for some reason for me whenever I press RET and type any random character it automatically indents. Had to manually edit that indentation code out of the source and its now all ok.
The biggest issue I have with this is the indentation of the comments, e.g
# This is a comment
ARG FOO=bar
I didn't check the commit yet to see if it's the intended behavior.
EDIT: Sorry it seems that it has been corrected here https://github.com/spotify/dockerfile-mode/pull/46
Still an issue.
Yes, really annoying :(
fork, edit indentation code out and use straight/quelpa etc to use your fork. this repo is dead and I dont think it will ever be fixed
I'd be happy to do a PR this this repository if @MaSven is still around to merge it. Forking and fixing for myself only is a last resort. If someone has forked it and is maintaining it, then why not change the recipe on melpa to the fork? (given that the upstream is really dead).
I made a workaround for this, not sure what the cause is but I noticed that (get-text-property (point-at-bol) 'face)
returned a list of faces for me, and the existing code seemed to expect a single face.
https://github.com/sp3ctum/spacemacs/commit/99e9875f8
update: played around a bit more with this, it seems the existing indentation logic was not compatible with an aggressive-indent-mode that I have in spacemacs. I chose to use sh-indent-line
(from shell scripts) instead since it seemed to understand how to indent multi-line commands correctly.
I think I did similar and it started to work for me
On 12/18/19 3:02 AM, Mika Vilpas wrote:
I made a workaround for this, not sure what the cause is but I noticed that |(get-text-property (point-at-bol) 'face)| returned a list of faces for me, and the existing code seemed to expect a single face.
sp3ctum/spacemacs@479e938 https://github.com/sp3ctum/spacemacs/commit/479e938bcf3357983ea563a4cb097be2011794bd
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spotify/dockerfile-mode/issues/47?email_source=notifications&email_token=AAAFUMGQH2RCVP4HVXHBKVLQZHKI7A5CNFSM4F7IJOEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHFITWY#issuecomment-566921691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFUMC2LI4OVY62RHVHHRTQZHKI7ANCNFSM4F7IJOEA.
As an alternative, I removed the broken feature and recompiled. To resolve, comment out https://github.com/spotify/dockerfile-mode/commit/9f4381178aa03212cd3400c60c0f48ff306a0994#r134956599 and recompile your packages ^1 with the following:
M-: (byte-recompile-directory package-user-dir nil 'force)
I presume this was fixed and should be closed? Following what OP mentions and this gif in a comment, I can't reproduce the problem. The commit that incorrectly assigned indent-line-function
had also had follow up fixes.
So everything seems okay.
@rislah can you comment on that?
I still experience this on version 20240324.1010, but only when LSP-mode is active. It may just be an lsp-mode
issue or perhaps these two modes interact with each other somehow. I do not have time to dig in but perhaps this will help someone reproduce if they choose to investigate this.
I still experience this on version 20240324.1010, but only when LSP-mode is active. It may just be an
lsp-mode
issue or perhaps these two modes interact with each other somehow. I do not have time to dig in but perhaps this will help someone reproduce if they choose to investigate this.
Step to reproduce are needed.
That said, I think it is better to report this as a separate bug as it's clearly caused by something different compared to the one here.
This one I think should be closed. Since the OP has gone radio silent, perhaps @drewcsillag…?
@Hi-Angel i think that makes sense