Open zenMaya opened 2 years ago
I haven't been able to get it to work either, although it doesn't switch modes like you described (maybe you set it up differently)
I added to my config:
(use-package svelte-mode)
(use-package eglot
:after yasnippet
:config
(add-to-list 'eglot-server-programs '(svelte-mode . ("svelteserver" "--stdio")))
:hook (prog-mode . eglot-ensure)
)
But I don't get any syntax highlighting for TS src blocks:
HTML seems to work fine, CSS has syntax highlighting but gives some unknown rule underlines
yeah, I'm experiencing this and it is really annoying :(
Hi, there. Thanks for your feedback.
Please note typescript-mode
needs to be installed to highlight ts block.
I'm not familiar with eglot and haven't got time to check it yet. So please let me know if installing typescript-mode
fixes the issue, or if it doesn't work with eglot.
svelteserver seems to use ts/js/scss rules to check svelte blocks. As the below screenshot shows, it detects errors of different blocks at the same time It may integrate those servers or rules, but I don't think there are different servers switching.
I tried below config to enable eglot on svelte files.
npm i -g svelte-language-server
;; Add to init.el
(add-hook 'svelte-mode-hook 'eglot-ensure)
;; If needed, add the server configuration
(use-package eglot
:config
(add-to-list 'eglot-server-programs
'(svelte-mode . ("svelteserver" "--stdio"))))
Hi, there. Thanks for your feedback.
Please note
typescript-mode
needs to be installed to highlight ts block.I'm not familiar with eglot and haven't got time to check it yet. So please let me know if installing
typescript-mode
fixes the issue, or if it doesn't work with eglot.
For me this was the problem
I thought it would've used the tree sitter typescript mode but it did not
I have typescript-ts-mode required in my configuration and despite that the block won't be highlighted. Maybe svelte-mode miss the compatibility with typescript-ts-mode?
El lunes 04 de noviembre del 2024, Kamron Bhavnagri escribió:
Hi, there. Thanks for your feedback.
Please note typescript-mode needs to be installed to highlight ts block.
I'm not familiar with eglot and haven't got time to check it yet. So please let me know if installing typescript-mode fixes the issue, or if it doesn't work with eglot.
For me this was the problem
I thought it would've used the tree sitter typescript mode but it did not
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
-- Jorge Araya
Contacto: Telegram: t.me/shackra · Signal: Shackra.28
I see. It seems not easy to use the new tree sitter typescript-ts-mode
in the regular svelte-mode
.
We probably need a new svelte-ts-mode
to totally make use of tree sitter
For reference
Depending on the current cursor position, eglot assumes that it is in either svelte-mode, javascript-mode or css-mode
Would there be a possibility, that svelte mode would report to eglot always as svelte mode? So it doesn't try to run the wrong server on the file.