Skip to content

Commit 54e2f1a

Browse files
committed
temp readme commit
1 parent e9cc927 commit 54e2f1a

File tree

1 file changed

+143
-5
lines changed

1 file changed

+143
-5
lines changed

README.md

Lines changed: 143 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,48 @@
1-
This is the sublime portion of
1+
# LSP-pyvoice
2+
3+
This is the sublime portion of [pyvoice](https://github.com/PythonVoiceCodingPlugin/pyvoice)
4+
5+
6+
<div>
7+
<img src="https://github.com/PythonVoiceCodingPlugin/assets/blob/main/pyvoice_logo.png" align="right" height=320 width=320/>
8+
</div>
9+
210
<!-- MarkdownTOC autolink="true" -->
311

12+
- [Features](#features)
413
- [Installation](#installation)
14+
- [Pre-requisites](#pre-requisites)
515
- [Install the plugin](#install-the-plugin)
616
- [Install the grammar](#install-the-grammar)
717
- [Settings](#settings)
18+
- [Default settings](#default-settings)
19+
- [Editing settings globally](#editing-settings-globally)
20+
- [Editing settings per project](#editing-settings-per-project)
821
- [Enabling or Disabling the plugin](#enabling-or-disabling-the-plugin)
922
- [Commands](#commands)
23+
- [Viewing Logs](#viewing-logs)
24+
- [Event Listener logs](#event-listener-logs)
25+
- [LSP traffic](#lsp-traffic)
26+
- [Server logs](#server-logs)
27+
- [Licensing And Acknowledgements](#licensing-and-acknowledgements)
1028

1129
<!-- /MarkdownTOC -->
1230

13-
https://github.com/PythonVoiceCodingPlugin/pyvoice
31+
# Features
32+
33+
It is implemented as an [LSP](https://packagecontrol.io/packages/LSP) package and provides the following functionality
34+
35+
- it automatically manages installing and updating the [pyvoice](https://github.com/PythonVoiceCodingPlugin/pyvoice) for you in its own seperate virtual environment
36+
37+
- it provides the customizations to the sublime LSP client, needed for receiving speech hints, etc from the language server
38+
39+
- it manages the communication with the programming by voice framework
1440

1541
# Installation
1642

17-
## Install the plugin
43+
## Pre-requisites
44+
45+
- Make sure you have some version of [Python](https://www.python.org/downloads/) >= 3.8 installed on your system. This is needed for installing and running the pyvoice executable
1846

1947
- Make sure you have [Package Control](https://packagecontrol.io/installation) installed in Sublime Text.
2048

@@ -23,12 +51,14 @@ https://github.com/PythonVoiceCodingPlugin/pyvoice
2351
- run `Package Control: Install Package`
2452
- search for `LSP` and install it
2553

26-
- Finally, install this package via Package Control using a custom repository
54+
## Install the plugin
55+
56+
Finally, install this package via Package Control using a custom repository
2757
- Open the command palette `ctrl+shift+p` or `cmd+shift+p`
2858
- run `Package Control: Add Repository`
2959
- paste the url of this repository: `https://github.com/PythonVoiceCodingPlugin/LSP-pyvoice`
3060

31-
- Restart Sublime Text and navigate to any python file, you should see these in the sidebar
61+
Restart Sublime Text and navigate to any python file, you should see these in the sidebar
3262

3363
## Install the grammar
3464

@@ -38,12 +68,105 @@ https://github.com/PythonVoiceCodingPlugin/pyvoice
3868

3969
# Settings
4070

71+
The project builts on top of the standard [LSP client configuration](https://lsp.sublimetext.io/client_configuration/)
72+
73+
## Default settings
74+
75+
```json
76+
{
77+
"command": [
78+
"$server_path"
79+
],
80+
"python_binary": null,
81+
"env": {},
82+
"settings": {
83+
// The base path where your python project is located.
84+
// Like all paths in this settings file it can be either
85+
// absolute or relative to the path of the sublime project.
86+
"project.path": ".",
87+
88+
// The path to the root of the virtual environemnt
89+
// again either absolute or relative to the sublime project path.
90+
"project.environmentPath": ".venv",
91+
92+
// A list of paths to override the sys path if needed.
93+
// WARNING: This will COMPLETELY override the sys.path.
94+
// Leave this null,to generate sys.path from the environment.
95+
"project.sysPath": null,
96+
97+
// Adds these paths at the end of the sys path.
98+
"project.addedSysPath": [],
99+
100+
// If enabled (default), adds paths from local directories.
101+
// Otherwise, you will have to rely on your packages being properly configured on the sys.path.
102+
"project.smartSysPath": true,
103+
104+
},
105+
106+
"selector": "source.python",
107+
// ST3
108+
"languages": [
109+
{
110+
"languageId": "python",
111+
"scopes": [
112+
"source.python"
113+
],
114+
"syntaxes": [
115+
"Packages/Python/Python.sublime-syntax"
116+
],
117+
}
118+
],
119+
}
120+
```
121+
122+
The main settings are
123+
124+
- `command` : the command to launch the language server. Change this if you do not want to use the pyvoice executable that gets automatically installed
125+
126+
- `python_binary` : the python binary to use for launching the language server. If not set, it defaults to
127+
the python binary that is in the system PATH
128+
129+
- `env` : the environment variables to use when launching the language server. If not set, it defaults to the current environment variables
130+
131+
- `settings` : the settings to pass to the language server.
132+
- `venvPath` which is the path to the virtual environment for your project. If not set, it defaults to `.venv`
133+
- `ext`
134+
135+
136+
137+
## Editing settings globally
138+
41139
To edit the global settings click in the menu
42140

43141
`Preferences > Package Settings > LSP > Servers > LSP-pyvoice`
44142

45143
Or from the command palette `ctrl+shift+p` or `cmd+shift+p` run `Preferences: LSP-pyvoice Settings`
46144

145+
## Editing settings per project
146+
147+
To edit the settings for a specific project, click in the menu
148+
149+
`Project > Edit Project`
150+
151+
and add the following settings
152+
153+
```json
154+
{
155+
"settings":
156+
{
157+
"LSP":
158+
{
159+
"LSP-pyvoice":
160+
{
161+
// your customizations go in here
162+
},
163+
},
164+
165+
},
166+
}
167+
```
168+
169+
47170
# Enabling or Disabling the plugin
48171

49172
The plugin is enabled by default. To disable it, open the command palette `ctrl+shift+p` or `cmd+shift+p` and run `LSP: Disable Language Server Globally`. Then choose `LSP-pyvoice` from the list of language servers. To enable it again, run `LSP: Enable Language Server Globally`.
@@ -62,3 +185,18 @@ The following commands are available in the command palette `ctrl+shift+p` or `c
62185

63186
- `Preferences: LSP-pyvoice Settings`
64187
- `LSP-pyvoice: Get Spoken` it allows you to manually trigger fetching spoken information from the server
188+
189+
190+
# Viewing Logs
191+
192+
## Event Listener logs
193+
## LSP traffic
194+
## Server logs
195+
196+
197+
198+
# Licensing And Acknowledgements
199+
200+
201+
[LSP-pylsp](https://github.com/sublimelsp/LSP-pylsp)
202+
[SublimeTalon](https://github.com/trishume/SublimeTalon/blob/master/sublime_talon.py)

0 commit comments

Comments
 (0)