Emacs tune, some updates, direnv

This commit is contained in:
Aleksandr Lebedev 2025-11-21 23:57:30 +01:00
parent 1511f0cd92
commit 244edc5ca6
7 changed files with 77 additions and 40 deletions

View file

@ -547,6 +547,12 @@ DIR must include a .project file to be considered a project."
(add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-ts-mode))
(add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-ts-mode))
(use-package zig-mode
:ensure t)
(autoload 'zig-mode "zig-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.\\(zig\\|zon\\)\\'" . zig-mode))
(use-package treesit-auto
:ensure t
:demand t
@ -592,6 +598,29 @@ DIR must include a .project file to be considered a project."
(add-hook 'c-ts-mode-hook #'eglot-ensure)
(add-hook 'c++-ts-mode-hook #'eglot-ensure))
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(zig-mode . (
;; Use `zls` if it is in your PATH
"zls"
;; There are two ways to set config options:
;; - edit your `zls.json` that applies to any editor that uses ZLS
;; - set in-editor config options with the `initializationOptions` field below.
;;
;; Further information on how to configure ZLS:
;; https://zigtools.org/zls/configure/
:initializationOptions
(;; Whether to enable build-on-save diagnostics
;;
;; Further information about build-on save:
;; https://zigtools.org/zls/guides/build-on-save/
;;enable_build_on_save t
;; omit the following line if `zig` is in your PATH
;:zig_exe_path "/path/to/zig_executable"
))))
(add-hook 'zig-mode-hook #'eglot-ensure))
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(csharp-ts-mode