Configure treesitter for swift
This commit is contained in:
parent
30b35a167a
commit
e840029b4d
2 changed files with 12 additions and 0 deletions
|
|
@ -575,6 +575,11 @@
|
||||||
swift-mode:basic-offset 2
|
swift-mode:basic-offset 2
|
||||||
swift-mode:repl-executable "xcrun swift repl"))
|
swift-mode:repl-executable "xcrun swift repl"))
|
||||||
|
|
||||||
|
(use-package swift-ts-mode
|
||||||
|
:hook (swift-mode . subword-mode)
|
||||||
|
:config
|
||||||
|
(setq swift-ts-mode 2))
|
||||||
|
|
||||||
(use-package system-packages)
|
(use-package system-packages)
|
||||||
|
|
||||||
(use-package tab-bar
|
(use-package tab-bar
|
||||||
|
|
@ -595,6 +600,13 @@
|
||||||
:custom
|
:custom
|
||||||
(treesit-auto-install 'prompt)
|
(treesit-auto-install 'prompt)
|
||||||
:config
|
:config
|
||||||
|
(add-to-list 'treesit-auto-recipe-list
|
||||||
|
(make-treesit-auto-recipe
|
||||||
|
:lang 'swift
|
||||||
|
:ts-mode 'swift-ts-mode
|
||||||
|
:remap '(swift-mode)
|
||||||
|
:ext "\\.swift\\'"))
|
||||||
|
(setq treesit-auto-langs '(swift))
|
||||||
(treesit-auto-add-to-auto-mode-alist 'all)
|
(treesit-auto-add-to-auto-mode-alist 'all)
|
||||||
(global-treesit-auto-mode))
|
(global-treesit-auto-mode))
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue