help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lsp-mode / Typescript / organize imports


From: Wolfgang Pausch
Subject: lsp-mode / Typescript / organize imports
Date: Wed, 31 Jan 2024 08:48:02 +0200
User-agent: Mozilla Thunderbird

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]