jose-elias-alvarez / typescript.nvim

A Lua plugin, written in TypeScript, to write TypeScript (Lua optional).
The Unlicense
497 stars 33 forks source link

Import on completion missing? #18

Closed abenz1267 closed 2 years ago

abenz1267 commented 2 years ago

Hi,

is the Import on completion functionallity missing? Or did i miss something? I remember it being present with nvim-ts-utils.

Regards

jose-elias-alvarez commented 2 years ago

I haven't ported the functionality for a few reasons:

  1. I wasn't thrilled with the implementation, which relied on timers to avoid duplicate CompleteDone events
  2. The code wasn't specific to typescript-language-server, so I think it would be better to implement support upstream. There is an open PR that seems to have stalled, but I think this is the right approach.
  3. It's supported by completion plugins like nvim-cmp and coq.nvim, which do a much better job of handling it.

If you're happy with how the implementation in nvim-lsp-ts-utils works, feel free to keep using it or copy-paste it into your config (it's pretty short).