configurations for lsp and eglot for wesl/wgsl
This commit is contained in:
parent
680b07e3b4
commit
9ec4c8a3bf
20
init.org
20
init.org
|
@ -1864,12 +1864,18 @@ Make lsp use plists instead of hash-tables:
|
||||||
|
|
||||||
** Graphics
|
** Graphics
|
||||||
|
|
||||||
*** WGSL/WESL
|
*** WGSL/WESL with lsp-mode
|
||||||
|
|
||||||
|
**** Install =wgsl-mode=:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package wgsl-mode
|
(use-package wgsl-mode
|
||||||
:straight t
|
:straight t
|
||||||
:ensure lsp-mode
|
|
||||||
:mode "\\.wesl\\'"
|
:mode "\\.wesl\\'"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
**** COMMENT Configure for =lsp-mode=:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
:ensure lsp-mode
|
||||||
:hook (wgsl-mode . lsp-deferred)
|
:hook (wgsl-mode . lsp-deferred)
|
||||||
:init
|
:init
|
||||||
(add-to-list 'lsp-language-id-configuration '(wgsl-mode . "wgsl"))
|
(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")
|
:new-connection (lsp-stdio-connection "wgsl-analyzer")
|
||||||
:activation-fn (lsp-activate-on "wgsl")
|
:activation-fn (lsp-activate-on "wgsl")
|
||||||
:server-id 'wgsl-analyzer))
|
: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
|
#+end_src
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue