From 9eccd5b577256d0d07bf3a3d628521b55a5a349f Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sat, 6 Feb 2021 10:31:23 -0600 Subject: emacs: add zig support --- emacs/.emacs.d/init.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'emacs/.emacs.d/init.el') diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 646840f..b7bd392 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -148,6 +148,13 @@ ;; --- LANGUAGE SERVERS --- (use-package lsp-mode :hook (typescript-mode . lsp-deferred) + :config + (add-to-list 'lsp-language-id-configuration '(zig-mode . "zig")) + (lsp-register-client + (make-lsp-client + :new-connection (lsp-stdio-connection "/opt/zls/zls") + :major-modes '(zig-mode) + :server-id 'zls)) :commands (lsp lsp-deferred)) (use-package lsp-ui @@ -203,6 +210,7 @@ ;; Using tabs in lisp just leads to mixing tabs and spaces, which is yucky (add-hook 'lisp-mode-hook 'disable-tabs) (add-hook 'emacs-lisp-mode-hook 'disable-tabs) +(add-hook 'zig-mode-hook 'disable-tabs) ;; --- GENERAL PREFERENCES --- (setq-default -- cgit v1.2.3