jose-elias-alvarez / typescript.nvim

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

Can't tell what this plugin offers #43

Closed dbalatero closed 1 year ago

dbalatero commented 2 years ago

Hi! I landed here from https://github.com/rockerBOO/awesome-neovim.

However, when I got to the README, I couldn't tell what this plugin offers vs. lspconfig.tsserver.setup()

Possible to update the README with more context?

jose-elias-alvarez commented 2 years ago

The README says:

A minimal typescript-language-server integration plugin to set up the language server via nvim-lspconfig and add commands for convenience.

The Features section then lists exactly what those commands are. I'm not sure what I can do to make things clearer, but I'm open to a PR if you feel that it's confusing.

dbalatero commented 2 years ago

I think when I look at those commands I am surprised that they are not built in to tsserver at this time.

I think the implicit thing that your plugin sells, is "These are really cool features that are currently missing from tsserver. You should install this plugin if you want access to these extended features that make life easier."

If you explicitly call that out in the README, I think it will prevent having to read between the lines of "oh, I can't get this with my normal tsserver setup"

jose-elias-alvarez commented 2 years ago

Well, they are built into tsserver (and accessible via typescript-language-server). Since these are off-spec features, this is essentially a glue plugin that makes it easier to access a broader set of tsserver functionality from Neovim. It's theoretically possible for a user to, say, copy-paste the code for a single action into their config and use it that way (though the fact that we generate Lua code from TypeScript complicates things).

The whole tsserver situation is messy, so if the takeaway from the README is "install this plugin to get these features" I am happy with that, but again, if you think we could clarify things, feel free to open a PR.

jose-elias-alvarez commented 1 year ago

Closing this, but feel free to open a PR to improve documentation if you feel that there's a gap.