"Go operators for tree-sitter font-locking.")
(defun go-ts-mode--iota-query-supported-p ()
- "Returns t if the iota query is supported by the current version of
-the tree-sitter-go grammar."
+ "Return t if the iota query is supported by the tree-sitter-go grammar."
(ignore-errors
(or (treesit-query-string "" '((iota) @font-lock-constant-face) 'go) t)))
(treesit-search-subtree node "type_alias" nil nil 1)))
(defun go-ts-mode--other-type-node-p (node)
- "Return t if NODE is a type, other than interface, struct or alias."
+ "Return t if NODE is a type other than interface, struct, or alias."
(and
(string-equal "type_declaration" (treesit-node-type node))
(not (go-ts-mode--interface-node-p node))
"Tree-sitter indent rules for `go-mod-ts-mode'.")
(defun go-mod-ts-mode--in-directive-p ()
- "Return non-nil if inside a directive.
+ "Return non-nil if point is inside a directive.
When entering an empty directive or adding a new entry to one, no node
will be present meaning none of the indentation rules will match,
because there is no parent to match against. This function determines