jose-elias-alvarez / nvim-lsp-ts-utils

Utilities to improve the TypeScript development experience for Neovim's built-in LSP client.
The Unlicense
438 stars 18 forks source link

[BUG] The command :TSLspOrganize does not import a missing import statement. #117

Closed stephaneeybert closed 2 years ago

stephaneeybert commented 2 years ago

FAQ

Issues

Neovim Version

v0.6.1

Steps to reproduce

Make sure an import statement is missing. Delete an existing import statement. Wait for the LSP to load and underline the then undeclared variables. Type in command :TSLspOrganize

The two other commands :TSLspImportAll and :TSLspImportCurrent work perfectly fine.

Expected behavior

The command :TSLspOrganize should import a missing import statement.

Actual behavior

The command :TSLspOrganize does not import a missing import statement.

Debug log

As a neovim noob I could not see how to enable the trouble shooting debug option, nor where could I find some :message in some output. What is this output ? How to view it ?

Help

No

Implementation help

No response

stephaneeybert commented 2 years ago

The typescript language server that I installed is tsserver

jose-elias-alvarez commented 2 years ago

The purpose of :TSLspOrganize is to organize existing import statements. To add new ones, you'll want to use one of the other commands (those commands also organize imports, but that's a side effect of how they work in the first place).