Skip to content

Indentation of multiple lines in a directive is too large in a blade file #1318

Open
@Tacumi

Description

@Tacumi

When buffer indenting(C-c C-TAB), I got too big indent inside props directive.

@props (
						 ['attr_name',
						  'errors',
						  'safe' => false,
						 ])

Actual: web-mode inserted 51 spaces before [.
Expected: It should be inserted 2, 4 or specific-indentation spaces.


web-mode version: be2d59c8

version output

GNU Emacs 29.4 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2024-08-03

web-mode-debug output

--- WEB-MODE DEBUG BEG ---
versions: emacs(29.4) web-mode("17.3.21")
vars: engine(nil) minor(nil) content-type("") file("*Messages*")
system: window(ns) config("aarch64-apple-darwin21.6.0")
colors: fg(nil) bg(nil) 
minor modes: (indent-tabs-mode buffer-read-only show-paren-mode global-eldoc-mode leaf-key-override-global-mode shell-dirtrack-mode magit-auto-revert-mode global-git-commit-mode treemacs-fringe-indicator-mode treemacs-git-mode treemacs-follow-mode treemacs-filewatch-mode)
vars:
web-mode-enable-current-column-highlight=nil 
web-mode-enable-current-element-highlight=nil 
indent-tabs-mode=t 
--- WEB-MODE DEBUG END ---

init.el

;; <leaf-install-code>
(eval-and-compile
  (customize-set-variable
   'package-archives '(("org" . "https://orgmode.org/elpa/")
                       ("melpa" . "https://melpa.org/packages/")
                       ("gnu" . "https://elpa.gnu.org/packages/")))
  (package-initialize)
  (unless (package-installed-p 'leaf)
    (package-refresh-contents)
    (package-install 'leaf))

  (leaf leaf-keywords
    :ensure t
    :init
    ;; optional packages if you want to use :hydra, :el-get, :blackout,,,
    (leaf hydra :ensure t)
    (leaf el-get :ensure t)
    (leaf blackout :ensure t)

    :config
    ;; initialize leaf-keywords.el
    (leaf-keywords-init)))
;; </leaf-install-code>

;; Now you can use leaf!
(leaf leaf-tree :ensure t)
(leaf leaf-convert :ensure t)
(leaf transient-dwim
  :ensure t
  :bind (("M-=" . transient-dwim-dispatch)))

(leaf web-mode
  :ensure t
  :mode
  ("\\.astro\\'" "\\.mjs\\'" "\\.cjs\\'")
  :custom
  (web-mode-markup-indent-offset . 2)
  (web-mode-css-indent-offset . 2)
  (web-mode-code-indent-offset . 2)
  (web-mode-enable-autopairing . t))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions