-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add LSP-pyvoice #117
Add LSP-pyvoice #117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: WARNING
Repo link: LSP-pyvoice
Results help
Packages added:
- LSP-pyvoice
Processing package "LSP-pyvoice"
- WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
- File: plugin.py
- Line: 33, Column: 12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: WARNING
Repo link: LSP-pyvoice
Results help
Packages added:
- LSP-pyvoice
Processing package "LSP-pyvoice"
- WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
- File: plugin.py
- Line: 33, Column: 12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: WARNING
Repo link: LSP-pyvoice
Results help
Packages added:
- LSP-pyvoice
Processing package "LSP-pyvoice"
- WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
- File: plugin.py
- Line: 33, Column: 12
Do I understand it correctly that this code: will trigger the |
You shouldn't care about ST3 in the readme or default settings: https://github.com/PythonVoiceCodingPlugin/LSP-pyvoice/blob/341ef27c0fd232ff5ce55d7afe404ce340a6f59e/README.md?plain=1#L158-L169 Your package will only run in ST4+ anyway. |
What's the reason for not sending notification through LSP custom notification in https://github.com/PythonVoiceCodingPlugin/LSP-pyvoice/blob/341ef27c0fd232ff5ce55d7afe404ce340a6f59e/ipc.py#L38-L56? Is it not the LSP server you are sending the data to? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: WARNING
Repo link: LSP-pyvoice
Results help
Packages added:
- LSP-pyvoice
Processing package "LSP-pyvoice"
- WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
- File: plugin.py
- Line: 33, Column: 12
Starting from the main one
No the notifications sent via the ipc module are not meant for the language server. Instead they are meant To be sent to the user's preferred programming by voice system As i explain in their readme of the org home page, pyvoice is not a standard language server (that adds For example auto complete for a new language). Instead, it offers Specialized functionality aimed at developers using voice input in order to write code rather than a keyboard due to Repetitive Strain Injury(RSI) or other health issues. As a consequence, it goes beyond classical two tier ( client/server) LSP Architecture and adds a third layer. Essentially at any given time you have 2 plugins running
At the moment, I have support for the following voice coding systems Now back to the notifications and the ipc module, what is essentially going on is the following
I hope this clears up the situation, if you have any more questions let me know! |
Thanks for the feedback! That piece of code has been long forgotten there and I agree that we should not be running upon loading. Bad idea indeed, will remove it
Again correct! copy pasted from LSP-pylsp a long time ago, this will also go |
Updated my main branch with these modifications as well! |
It’s hard for me to understand what this even has to do with the language server protocol. Why can’t this be a plugin for ST that inserts/removes text based on voice commands? |
That's very understandable, and in all honesty I had some reservations on whether I should be submitting these package to the LSP repository or to the main channel directly. To put things in perspective, This project was originally conceived as a sister project/supplement to another (now defunct) voice coding related sublime package I had published years ago PythonVoiceCodingPlugin dealing more with things ast based navigation related.The latter was following the approach of putting all of the business logic Inside sublime text with the caveat that fellow voice coders who were using different editors were unable to use it. With pyvoice, I wanted that functionality to be available cross editor ( and to the extent possible cross voice system but that's not of interest right now) with the minimum friction possible. My Initial release, For example will include a plug-in for VS code In order to achieve that the core business logic involving analyzing your codebase etc had to be separated from sublime into its own component. While at the moment, the interactions between the two components are by design simple enough that a custom communication protocol between them would be sufficient (and in fact my earliest experiments were in that approach) switching to extending the LSP (even if a small subset thereof is currently used) was quite a quality of life improvement development and tooling wise. Furthermore, that decision resonated with my long term vision to add support for more languages and expand the featureset provided (in a language and editor agnostic manner), while also formalizing things Again, if the mainteners of this repository feel that this is not the right place for this package, I could submit it to the main channel directly instead. |
Okay. So the functionality depends on parsing some kind of AST for the specific language? Then it starts to make sense to me why you’d use a language server. It does feel like a tremendous effort to support more languages. Overall yeah I’m fine with going ahead with this (but I’m deferring to @rchl and @predragnikolic further issues) |
Yes! In fact I am building heavily on top of jedi, the same static analysis library employed by pylsp, in order to infer types of variables, what attributes they have, what attributes those attributes have, taking your whole codebase into context. In a loose sense, you could draw a fair number of parallels between the process of generatiing the afforementioned "speech hints" and how a more typical Language server would go about in order to provide standard autocompletion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: WARNING
Repo link: LSP-pyvoice
Results help
Packages added:
- LSP-pyvoice
Processing package "LSP-pyvoice"
- WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
- File: plugin.py
- Line: 33, Column: 12
This is a language client wrapper around the pyvoice-language-server pypi package
and acts as editor portion of the pyvoice for sublime text. Quoting from the organization's home page
This plugin corresponds to the second tier described above
Originally developed for private usage by myself, after more than two years, I have finally gotten the time to publish it for distribution.