fix(csharp): tree-sitter syntax highlight & indent
* modules/tools/tree-sitter/packages.el (tree-sitter-indent): added this package so other modules can opt into using it. Close: #6829 Co-authored-by: dradetsky <dradetsky@users.noreply.github.com>
This commit is contained in:
parent
d24e197964
commit
883a3fa3e6
2 changed files with 11 additions and 8 deletions
|
@ -35,9 +35,6 @@
|
|||
(when (modulep! +lsp)
|
||||
(add-hook 'csharp-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook 'csharp-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
||||
(defadvice! +csharp-disable-clear-string-fences-a (fn &rest args)
|
||||
"This turns off `c-clear-string-fences' for `csharp-mode'. When
|
||||
on for `csharp-mode' font lock breaks after an interpolated string
|
||||
|
@ -47,6 +44,14 @@ or terminating simple string."
|
|||
(apply fn args))))
|
||||
|
||||
|
||||
(use-package! csharp-tree-sitter
|
||||
:when (modulep! +tree-sitter)
|
||||
:defer t
|
||||
:init
|
||||
(add-hook 'csharp-mode-local-vars-hook #'tree-sitter! 'append)
|
||||
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-tree-sitter-mode)))
|
||||
|
||||
|
||||
;; Unity shaders
|
||||
(use-package! shader-mode
|
||||
:when (modulep! +unity)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue