* lsp-mode / Typescript / organize imports
@ 2024-01-31 6:48 Wolfgang Pausch
2024-01-31 7:10 ` Wolfgang Pausch
2024-01-31 16:31 ` Vagn Johansen
0 siblings, 2 replies; 3+ messages in thread
From: Wolfgang Pausch @ 2024-01-31 6:48 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
(I'm not sure wether this is the best place to ask questions regarding
lsp-mode, if there is a better one please tell me...)
I am currently giving lsp-mode a try for editing my typescript-project.
I've installed it, it starts up, gives me syntax highlighting,
information about errors, and so on.
But I seem to be unable to get any kind of organizing imports. When
executing lsp-organize-imports, I get "source.organizeImports action not
available".
I found https://github.com/emacs-lsp/lsp-mode/issues/3317, and as
advised there, executed (lsp-make-interactive-code-action
organize-imports "source.organizeImports.ts-ls"). However, then I get
"source.organizeImports.ts-ls action not available".
Given the contents of *lsp-log* (see below) I would assume that ts-ls is
present. Reading the docs of lsp-mode and specifically ts-ls, I don't
see any specific hints regarding organizing imports.
Questions:
- is organizing imports supported at all for typescript based on
https://emacs-lsp.github.io/lsp-mode/page/lsp-typescript/ ?
- if yes, how can I make it running?
- do I miss something I have to install also?
Versions:
emacs 28.2
lsp-mode 20240130.417
Contents of *lsp-log*:
Command "typescript-language-server --stdio" is present on the path.
Command "deno lsp" is not present on the path.
Command "semgrep lsp" is not present on the path.
Command "typescript-language-server --stdio" is present on the path.
Command "deno lsp" is not present on the path.
Command "semgrep lsp" is not present on the path.
Found the following clients for
/home/wpausch/tisgraph-ts/src/tisgraph/sketch/base/shape/AbstractIdLessShape.ts:
(server-id ts-ls, priority -2)
The following clients were selected based on priority: (server-id ts-ls,
priority -2)
Using Typescript version (user-setting) 5.3.3 from path
"/home/wpausch/tis/tisgraph/v2/tisgraph-ts/node_modules/typescript/lib/tsserver.js"
Thank you for any hints,
Wolfgang
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lsp-mode / Typescript / organize imports
2024-01-31 6:48 lsp-mode / Typescript / organize imports Wolfgang Pausch
@ 2024-01-31 7:10 ` Wolfgang Pausch
2024-01-31 16:31 ` Vagn Johansen
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Pausch @ 2024-01-31 7:10 UTC (permalink / raw)
To: help-gnu-emacs
Am 31.01.24 um 08:48 schrieb Wolfgang Pausch:
> Hello,
>
> (I'm not sure wether this is the best place to ask questions regarding
> lsp-mode, if there is a better one please tell me...)
PS: Sorry, I just noticed that I was already at that place,
https://github.com/emacs-lsp/lsp-mode/discussions
I simply did not find any topic "Ask questions where" on
https://emacs-lsp.github.io/lsp-mode/ and overlooked the other...
I'll ask that question there now, thank you and sorry for the noise,
Wolfgang
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lsp-mode / Typescript / organize imports
2024-01-31 6:48 lsp-mode / Typescript / organize imports Wolfgang Pausch
2024-01-31 7:10 ` Wolfgang Pausch
@ 2024-01-31 16:31 ` Vagn Johansen
1 sibling, 0 replies; 3+ messages in thread
From: Vagn Johansen @ 2024-01-31 16:31 UTC (permalink / raw)
To: help-gnu-emacs
Wolfgang Pausch <wolfgang.pausch@iteg.at> writes:
> But I seem to be unable to get any kind of organizing imports. When
> executing lsp-organize-imports, I get "source.organizeImports action
> not available".
A work-around is to call shell-command with something like
eslint ... --fix
in the correct direcotry
--
Vagn Johansen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-31 16:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-31 6:48 lsp-mode / Typescript / organize imports Wolfgang Pausch
2024-01-31 7:10 ` Wolfgang Pausch
2024-01-31 16:31 ` Vagn Johansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).