Skip to content

Commit

Permalink
update disable zig-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
chens committed Nov 26, 2024
1 parent 1efdae0 commit cc7b471
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion init.el
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
(require 'init-ledger)
(require 'init-lua)
(require 'init-uiua)
(require 'init-zig)
;; (require 'init-zig)
(require 'init-terminals)


Expand Down
14 changes: 8 additions & 6 deletions lisp/init-zig.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
;;; 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))
(use-package zig-ts-mode
:if (and (fboundp 'treesit-ready-p) (treesit-ready-p 'zig))
:mode ("\\.\\(zig\\|zon\\)\\'" . zig-ts-mode)
:config
(progn
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs '(zig-ts-mode . ("zls")))))
(require-package 'zig-mode))
(add-to-list 'eglot-server-programs '(zig-ts-mode . ("zls"))))))

(use-package zig-mode)


(provide 'init-zig)
Expand Down

0 comments on commit cc7b471

Please sign in to comment.