mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
chore(language/go): move custom tree-sitter query to golang module
Instead of keeping the custom Go specific tree-sitter query in the tree-sitter module, move it the golang module.
This commit is contained in:
@@ -71,6 +71,16 @@
|
||||
(add-to-list 'projectile-globally-ignored-directories "vendor/github.com")
|
||||
(add-to-list 'projectile-globally-ignored-directories "vendor/gopkg.in"))
|
||||
|
||||
(with-eval-after-load 'tree-sitter-langs
|
||||
(tree-sitter-hl-add-patterns 'go
|
||||
[
|
||||
;; Highlight built-in functions with the built-in face, based on:
|
||||
;; https://github.com/tree-sitter/tree-sitter-go/pull/61
|
||||
(call_expression
|
||||
function: (identifier) @function.builtin
|
||||
(.match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$"))
|
||||
]))
|
||||
|
||||
:config
|
||||
(siren-define-golines-format-mode)
|
||||
|
||||
|
||||
@@ -11,15 +11,7 @@
|
||||
|
||||
(use-package tree-sitter-langs
|
||||
:hook
|
||||
(tree-sitter-after-on . tree-sitter-hl-mode)
|
||||
|
||||
:config
|
||||
(tree-sitter-hl-add-patterns 'go
|
||||
;; from: https://github.com/tree-sitter/tree-sitter-go/pull/61
|
||||
[(call_expression
|
||||
function: (identifier) @function.builtin
|
||||
(.match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$"))])
|
||||
)
|
||||
(tree-sitter-after-on . tree-sitter-hl-mode))
|
||||
|
||||
(provide 'siren-tree-sitter)
|
||||
;;; siren-tree-sitter.el ends here
|
||||
|
||||
Reference in New Issue
Block a user