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

Feature Request: Support for language server protocol #127

Open
swaner opened this issue Nov 2, 2018 · 5 comments
Open

Feature Request: Support for language server protocol #127

swaner opened this issue Nov 2, 2018 · 5 comments

Comments

@swaner
Copy link

swaner commented Nov 2, 2018

This is just a feature request/question of how much work it would take to support the language server protocol.

Description from https://microsoft.github.io/language-server-protocol:

The idea behind the Language Server Protocol (LSP) is to standardize the protocol for how such servers and development tools communicate. This way, a single Language Server can be re-used in multiple development tools, which in turn can support multiple languages with minimal effort.

VS Code supports language server protocol. Since there is no good php extension today for VS Code, and if it's possible to modify SublimePHPCompanion it would make an excellent choice.
Since my python skills are close to none I cannot help with development but am wondering if this would be even possible with this library?

@lumnn
Copy link

lumnn commented Nov 20, 2018

Thanks to this plugin: https://packagecontrol.io/packages/LSP, SublimeText could benefit from supporting the protocol as well

@erichard
Copy link
Owner

erichard commented Dec 4, 2018

As @lumnn says, such a plugin already exists for SublimeText, so I don't see the point of including LSP in PHP Companion.

@erichard erichard closed this as completed Dec 4, 2018
@lumnn
Copy link

lumnn commented Dec 4, 2018

@erichard I think you misunderstood me. My point is that if the SublimePHPCompanion is a LSP compatible tool, then can be used by more editors including Sublime.
Thanks to a plugin I've posted in my last comment it may share a same user interface as other intelligence plugins, as the plugin above is only a UI for LSP in Sublime.

On the other hand I understand it probably means a lot of work.

@erichard
Copy link
Owner

erichard commented Dec 4, 2018

@lumnn You are right, I totally misunderstood you 😄

So has I understand, LSP is all about standardizing autocompletion, go to definition, or documentation on hover. PHP Companion does nothing of these things. I see it as a smart snippet plugin, it write code in your file when you hit some specific key. I will dig deeper in the LSP spec to see if I missed something.

In the meantine can you develop what you have in mind about a LSP integration ?

@erichard erichard reopened this Dec 4, 2018
@lumnn
Copy link

lumnn commented Dec 4, 2018

@erichard I believe the codeAction requests could be used for few functions in this plugin.
See: https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction

I believe almost all commands could be developed as LSP code action (except goto_definition_scope which looks like definition request https://microsoft.github.io/language-server-protocol/specification#textDocument_definition)

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

No branches or pull requests

3 participants