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:
Henrik Lissner 2023-02-21 00:46:07 -05:00
parent d24e197964
commit 883a3fa3e6
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 11 additions and 8 deletions

View file

@ -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)