You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain
Bug description
I'm using doomemacs to write my golang project, which contains some typescript (tsx) code. I've configured the before-save-hook to automatic organize go package imports, the config is
But every time when I open a tsx file after open the go files, the lsp-organize-imports always run on the typescript-tsx-mode, which makes the save process really slow, because I've already use prettierjs to format the tsx code, no need for the lsp formatting. And if I open the tsx file first without open go files, everything works fine, there's no lsp formatting for tsx code.
I've tried disable lsp-format globally with (setq +format-with-lsp nil), it's not working. Also tried remove the hook in typescript-tsx-mode with
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
I'm using doomemacs to write my golang project, which contains some typescript (tsx) code. I've configured the
before-save-hook
to automatic organize go package imports, the config isBut every time when I open a tsx file after open the go files, the
lsp-organize-imports
always run on thetypescript-tsx-mode
, which makes the save process really slow, because I've already use prettierjs to format the tsx code, no need for the lsp formatting. And if I open the tsx file first without open go files, everything works fine, there's no lsp formatting for tsx code.I've tried disable lsp-format globally with
(setq +format-with-lsp nil)
, it's not working. Also tried remove the hook intypescript-tsx-mode
withstill not working.
Is there anyway to configure
lsp-organize-imports
forgo-mode
without affecting other modes?Steps to reproduce
lsp-organize-imports
tobefore-save-hook
undergo-mode-hook
Expected behavior
The tsx file should save fast without run
lsp-organize-imports
Which Language Server did you use?
gopls
andts-ls
OS
Linux
Error callstack
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: