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

[FEATURE REQUEST] Support `typescript-language-server` source code actions #100

Closed jose-elias-alvarez closed 2 years ago

jose-elias-alvarez commented 2 years ago

Issues

Feature description

typescript-language-server recently added support for source code actions, which as I understand it are intended for running on save. The documentation describes the following actions:

source.addMissingImports.ts - adds imports for used but not imported symbols source.fixAll.ts - despite the name, fixes a couple of specific issues: unreachable code, await in non-async functions, incorrectly implemented interface source.removeUnused.ts - removes declared but unused variables source.organizeImports.ts - organizes and removes unused imports

It'd be great to support these, though I have no idea how to run these in Neovim (or whether Neovim supports them in the first place).

Help

Yes

Implementation help

A better idea of what makes these actions different from standard code actions.