0

I'm using vue-mode, based on mmm-mode with Emacs 27 nightly from 10/10/2019. Since that Emacs update, I don't get any indentation support in the script section of a Vue file. Try this file with emacs -q after (use-package vue):

<template>
</template>

<script lang="ts">
import * as d3 from 'd3'
  function foo() {

  }
</script>

<style>
</style>

Go into function foo at the blank line and type TAB. No indent. :-(

And indeed if you eval (syntax-ppss (point-at-bol)) at that point, it returns (0 nil 2381 nil nil nil 0 nil nil nil nil) which means it thinks the indent should be 0, not 2.

Anyone have any idea what changed recently that could cause this? Or any ideas for how I can debug it?

4
  • 1
    Emacs.StackExchange isn't the right place to report bugs in unstable Emacs versions. Use M-x report-emacs-bug – phils Oct 14 '19 at 21:20
  • 3
    I'm voting to close this question as off-topic because it's probably about a transient bug in unstable code. – phils Oct 14 '19 at 21:28
  • Fair enough. Submitted as bug #37751. – GaryO Oct 14 '19 at 22:12
  • The problem manifests in stable emacs 26.3, too. – Uwe Koloska Mar 9 '20 at 23:44
1

The problem has been reported as #99 and already fixed in master of mmm-mode, but since there is no new release, you have to install the newest mmm-mode manually, or add the missing setting to mmm-save-local-variables -- for example with use-package:

(use-package vue-mode
  :mode "\\.vue$"
  :config
  (add-to-list 'mmm-save-local-variables '(syntax-ppss-table buffer))
  )
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.