From 9ec4c8a3bf6321f41e27008b3a067bb02a6d96a9 Mon Sep 17 00:00:00 2001 From: janis Date: Mon, 15 Sep 2025 22:19:55 +0200 Subject: [PATCH] configurations for lsp and eglot for wesl/wgsl --- init.org | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/init.org b/init.org index 5240231..74b44d5 100644 --- a/init.org +++ b/init.org @@ -1864,12 +1864,18 @@ Make lsp use plists instead of hash-tables: ** Graphics -*** WGSL/WESL +*** WGSL/WESL with lsp-mode + +**** Install =wgsl-mode=: #+begin_src emacs-lisp (use-package wgsl-mode :straight t - :ensure lsp-mode :mode "\\.wesl\\'" +#+end_src + +**** COMMENT Configure for =lsp-mode=: +#+begin_src emacs-lisp + :ensure lsp-mode :hook (wgsl-mode . lsp-deferred) :init (add-to-list 'lsp-language-id-configuration '(wgsl-mode . "wgsl")) @@ -1877,6 +1883,16 @@ Make lsp use plists instead of hash-tables: :new-connection (lsp-stdio-connection "wgsl-analyzer") :activation-fn (lsp-activate-on "wgsl") :server-id 'wgsl-analyzer)) +#+end_src + +**** Configure for =eglot=: +#+begin_src emacs-lisp +:hook (wgsl-mode . eglot-ensure) +:config +(add-to-list 'eglot-server-programs `(wgsl-mode . ("wgsl-analyzer"))) +#+end_src +**** end ~use-package~ block: +#+begin_src emacs-lisp ) #+end_src