Closed joncol closed 2 years ago
What's the major-mode
for elm?
What's the
major-mode
for elm?
It's this one: https://melpa.org/#/elm-mode
Can't reproduce the issue with elm v0.21.0 from stable.melpa.org. evil-nerd-commentter
only calls builtin API without any extra setup on comment syntax. Looks it's elm-mode
problem.
OK, I ran with a completely clean setup, only evil
, evil-nerd-commenter
, and elm-mode
, and then the problem did not occur for me either. Let me try and figure out the root of the problem, and I'll close this with a comment.
OK, very strange: when I add the following to my setup, I get the problem described in this issue:
(use-package ox-hugo
:after ox)
ox-hugo
is a package used to be able to export to Hugo static blogs fromorg-mode
. That's some spooky action at a distance from the looks of it. I don't know if you want me to close this issue, or if you want to dig deeper?
@joncol ox-hugo
does not affect your major mode and related things like commenting/uncommenting in any way (and especially not outside an org-mode
buffer!). It simply provides you with an Org exporter backend. I'd be really surprised if ox-hugo
is actually what's causing this.
OK, very strange: when I add the following to my setup, I get the problem described in this issue:
(use-package ox-hugo :after ox)
ox-hugo
is a package used to be able to export to Hugo static blogs fromorg-mode
. That's some spooky action at a distance from the looks of it. I don't know if you want me to close this issue, or if you want to dig deeper?
You can use emacs27 and elm-mode from stable.melpa.org.
Raise a issue to elm-mode team and give them details (Emacs version, elm-mode version, steps to reproduce).
@joncol
ox-hugo
does not affect your major mode and related things like commenting/uncommenting in any way (and especially not outside anorg-mode
buffer!). It simply provides you with an Org exporter backend. I'd be really surprised ifox-hugo
is actually what's causing this.
Hi (and thanks for making ox-hugo
!), yes it seems very weird. I have a pretty messy org-mode
setup, so it could be something else that's interacting in a bad way with the commenting functionality. But for now, my problem is solved by disabling ox-hugo. Which is annoying, but these days I do more elm commenting than blogging anyways so... If I find the time, I could try and narrow it down further to create a minimal example that demonstrates the failure.
Sure.
The comment syntax is controlled by a few flags in newcomment.el
, likecomment-start
, comment-start-skip
, comment-end
, comment-end-skip
, comment-add
....
elm-mode
developers might need this information for debugging.
Hmm, think I found the actual source of the problem now:
;; do not treat "-" as a word separator
(modify-syntax-entry ?- "w")
I think this is what causes the problems. Do you think it's possible @redguardtoo ?
sytnax table is usually set up by major mode. It's better ask the major mode author to fix the issue for you.
Hi! Thanks for the package!
When using this with Elm code I run into the problem that uncommenting doesn't work, unless the
--
characters (that are used for comments in this language) are immediately at the beginning of a line. For instance, if commenting out something that is indented (4 spaces), the result will be something like:When then trying to uncomment you instead get a double comment:
Any help with resolving this would be greatly appreciated!