Skip to content

Commit

Permalink
Add init-zig.el
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Sep 25, 2024
1 parent c6916a8 commit 3e376aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
(require 'init-ledger)
(require 'init-lua)
(require 'init-uiua)
(require 'init-zig)
(require 'init-terminals)

;; Extra packages which don't require any configuration
Expand Down
15 changes: 15 additions & 0 deletions lisp/init-zig.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
;;; init-zig.el --- Support for the Zig language -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

(if (and (maybe-require-package 'zig-ts-mode)
(fboundp 'treesit-ready-p) (treesit-ready-p 'zig))
(progn
(add-to-list 'auto-mode-alist '("\\.\\(zig\\|zon\\)\\'" . zig-ts-mode))
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs '(zig-ts-mode . ("zls")))))
(require-package 'zig-mode))


(provide 'init-zig)
;;; init-zig.el ends here

0 comments on commit 3e376aa

Please sign in to comment.