Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide documentation around what a client should support #181

Open
entropitor opened this issue Jan 17, 2021 · 5 comments
Open

Provide documentation around what a client should support #181

entropitor opened this issue Jan 17, 2021 · 5 comments

Comments

@entropitor
Copy link
Contributor

This code says something about "to be implemented by the client" https://github.com/theia-ide/typescript-language-server/blob/3a8ea0f04bde047e2f60b9f68ef7816e3a41aa10/server/src/commands.ts#L14 but I cannot find any documentation as to how to implement this.

E.g. what's the flow if you want to support refactorings in non VS-Code environments?

I'm trying to implement this in VIM but I find it hard to figure out how it's supposed to work.

@DonnieWest
Copy link
Collaborator

DonnieWest commented Jan 18, 2021

Documentation on our end is going to be pretty laborious since every client has their own way of defining these custom commands. If you're trying to implement this for VIM though, here's something you can use for reference:

eclipse jdt lsp implements a ton of custom commands and there's an equivalent Neovim project https://github.com/mfussenegger/nvim-jdtls for all of those custom commands

It might be worth documenting what custom commands we have, but I think how to define those on various clients is probably not worth it

@entropitor
Copy link
Contributor Author

I know how to define the custom commands in neovim but the interaction is not super clear. What commands is TLS providing, what commands need to be implemented by the client? What is the meaning of them (for server commands) and what should they do (for client commands), what arguments should be/are provided to them, ...

Also what arguments are possible to configure, ...

Basically the LSP spec leaves a lot open to the LSP server itself, which is good, but ideally those things would be documented as well so writing the actual LSP client is easy

@rchl
Copy link
Member

rchl commented Nov 13, 2021

The APPLY_COMPLETION_CODE_ACTION command is handled by the server since https://github.com/typescript-language-server/typescript-language-server/releases/tag/v0.6.5 so closing.

@rchl rchl closed this as completed Nov 13, 2021
@rchl
Copy link
Member

rchl commented Nov 13, 2021

Though there is still SELECT_REFACTORING so will keep open until that is documented.

@rchl rchl reopened this Nov 13, 2021
@rchl
Copy link
Member

rchl commented Nov 13, 2021

Though there is currently no code in tsserver that would trigger that code path. There is no refactors returned with inlineable === false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants