Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion go-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -2894,6 +2894,10 @@ If BUFFER, return the number of characters in that buffer instead."
'("go" "toolchain" "use" "replace")
"All keywords for go.work files. Used for font locking.")

(defvar go-dot-work-font-lock-keywords
`((,(concat "^\\s-*\\(" (regexp-opt go-dot-work-mode-keywords t) "\\)\\s-") 1 font-lock-keyword-face))
"Keyword highlighting specification for `go-dot-work-mode'.")

;;;###autoload
(define-derived-mode go-dot-work-mode fundamental-mode "Go Work"
"A major mode for editor go.work files."
Expand All @@ -2904,7 +2908,7 @@ If BUFFER, return the number of characters in that buffer instead."
(set (make-local-variable 'comment-start-skip) "\\(//+\\)\\s *")

(set (make-local-variable 'font-lock-defaults)
'(go-dot-work-mode-keywords))
'(go-dot-work-font-lock-keywords))
(set (make-local-variable 'indent-line-function) 'go-mode-indent-line)

;; Go style
Expand Down