summaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init.el
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2021-02-06 10:31:23 -0600
committerBobby Bingham <koorogi@koorogi.info>2021-02-06 10:40:54 -0600
commit9eccd5b577256d0d07bf3a3d628521b55a5a349f (patch)
tree4d08ed397e374b353a05bf72184bdeac88ece3e2 /emacs/.emacs.d/init.el
parentca7367b52a6827003d1ec973441034ccf33c7970 (diff)
emacs: add zig support
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r--emacs/.emacs.d/init.el8
1 files changed, 8 insertions, 0 deletions
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