8uff3r / vue-ts-mode

Emacs major mode for Vue based on Tree-sitter
GNU General Public License v3.0
11 stars 1 forks source link

File mode specification error: (error Vue-ts Mode doesn’t support Hideshow Minor Mode) #7

Open liuyinz opened 5 months ago

liuyinz commented 5 months ago

Thanks for your work !

But when I use this mode, it turns out it do not support hs-minor-mode which needs variable comment-start and comment-end.

e.g. in yaml-ts-mode, it defines these two vars above :

(define-derived-mode yaml-ts-mode text-mode "YAML"
  "Major mode for editing YAML, powered by tree-sitter."
  :group 'yaml
  :syntax-table yaml-ts-mode--syntax-table

  (when (treesit-ready-p 'yaml)
    (treesit-parser-create 'yaml)

    ;; Comments.
    (setq-local comment-start "# ")
    (setq-local comment-end "")

    ;; Indentation.
    (setq-local indent-tabs-mode nil)

    ;; Font-lock.
    (setq-local treesit-font-lock-settings yaml-ts-mode--font-lock-settings)
    (setq-local treesit-font-lock-feature-list
                '((comment)
                  (string type)
                  (constant escape-sequence number property)
                  (bracket delimiter error misc-punctuation)))

    (setq-local fill-paragraph-function #'yaml-ts-mode--fill-paragraph)

    (treesit-major-mode-setup)))
8uff3r commented 5 months ago

I don't know if it's currently possible to add this cause Vue has multiple comment-strings, one for the Githubissues.

  • Githubissues is a development platform for aggregating issues.