Add QML syntax support

This commit is contained in:
outfoxxed 2023-11-17 04:15:53 -08:00
parent 3b55af550b
commit fc0655dc04
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -323,6 +323,13 @@
:mode "\\.nix\\'" :mode "\\.nix\\'"
:hook (nix-mode . disable-tabs)) :hook (nix-mode . disable-tabs))
;; QML Support
(setq qml-ts-mode-indent-offset 2)
(use-package qml-ts-mode
:config
(add-hook 'qml-ts-mode-hook
(lambda () (setq-local electric-indent-chars '(?\n ?\( ?\) ?{ ?} ?\[ ?\] ?\; ?,)))))
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-ts-mode)) (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-ts-mode))
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode)) (add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-ts-mode)) (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-ts-mode))