How do I access the `tsserver` organize imports feature from Neovim's lsp client?

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • lsp-zero.nvim

    A starting point to setup some lsp related features in neovim.

  • I'm using Neovim 0.9 and lsp-zero to edit Typescript files. tsserver has an organize imports feature. How do I map that back through LSP to a user-defined key? Basically, I'd like to add a new keybinding as shown in the lsp-zero "create keybindings" docs -- but I don't really care exactly how it works if I can just get it to work somehow.

  • typescript.nvim

    Discontinued A Lua plugin, written in TypeScript, to write TypeScript (Lua optional).

  • You'll need to use typescript.nvim to configure tsserver. Then you can bind the command TypescriptOrganizeImports to a keyboard shortcut. You can find a configuration example in lsp-zero's documentation

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts