Skip to content

Commit 210251d

Browse files
committed
temporary commit with settings and docs update
1 parent 47b6b81 commit 210251d

File tree

2 files changed

+170
-57
lines changed

2 files changed

+170
-57
lines changed

LSP-pyvoice.sublime-settings

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,56 @@
11
{
2+
// the command that actually launches the server process
3+
// leave this as is to use the automatically installed
4+
// pyvoice language server
25
"command": [
36
"$server_path"
47
],
8+
9+
// the python interpreter to use for installing and running
10+
// the pyvoice language server. it should be 3.8 and above
11+
// pypy may also work. If null, the plug-in will try to
12+
// automatically pick a suitable interpreter
513
"python_binary": null,
14+
15+
// environment variables to set when running the language server
616
"env": {},
17+
18+
// set the log level for the CLIENT SIDE code of the plugin
19+
// for example these will produce logs concerning
20+
// - the interprocess communication with the programming
21+
// by voice framework
22+
// - when the plug-in chooses to synchronize spoken hints
23+
// by sending a request to the language server and
24+
// forrewarding them to the programming by voice system
25+
// etc..
26+
// it does not affect the level of the logs
27+
// that the language server produces itself like
28+
// - any errors detected during semantic analysis
29+
// - metadata about the hints that it generates
30+
// etc..
31+
"log_level":"WARNING",
32+
33+
34+
// selectors to match the files that the language server
35+
// is responsible for
36+
"selector": "source.python",
37+
// ST3
38+
"languages": [
39+
{
40+
"languageId": "python",
41+
"scopes": [
42+
"source.python"
43+
],
44+
"syntaxes": [
45+
"Packages/Python/Python.sublime-syntax"
46+
],
47+
}
48+
],
49+
50+
// a set of settings/config that will be sent to the language server
51+
// via workspace/didChangeConfiguration notification
52+
// or retrieved by the workspace/configuration server side request.
53+
// these allow you to customize how pyvoice processes each of your projects
754
"settings": {
855
// The base path where your python project is located.
956
// Like all paths in this settings file it can be either
@@ -86,19 +133,5 @@
86133

87134
// Set the logging level for the pyvoice executable.
88135
"logging.level": "INFO"
89-
},
90-
"selector": "source.python",
91-
"log_level":"WARNING",
92-
// ST3
93-
"languages": [
94-
{
95-
"languageId": "python",
96-
"scopes": [
97-
"source.python"
98-
],
99-
"syntaxes": [
100-
"Packages/Python/Python.sublime-syntax"
101-
],
102-
}
103-
],
136+
}
104137
}

README.md

Lines changed: 122 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ This is the sublime portion of [pyvoice](https://github.com/PythonVoiceCodingPlu
1111

1212
- [Features](#features)
1313
- [Installation](#installation)
14-
- [Pre-requisites](#pre-requisites)
15-
- [Install the plugin](#install-the-plugin)
16-
- [Install the grammar](#install-the-grammar)
14+
- [Pre-requisites](#pre-requisites)
15+
- [Install the plugin](#install-the-plugin)
16+
- [Install the grammar](#install-the-grammar)
1717
- [Settings](#settings)
18-
- [Default settings](#default-settings)
19-
- [Editing settings globally](#editing-settings-globally)
20-
- [Editing settings per project](#editing-settings-per-project)
18+
- [Default settings](#default-settings)
19+
- [Editing settings globally](#editing-settings-globally)
20+
- [Editing settings per project](#editing-settings-per-project)
2121
- [Enabling or Disabling the plugin](#enabling-or-disabling-the-plugin)
2222
- [Commands](#commands)
2323
- [Viewing Logs](#viewing-logs)
24-
- [Event Listener logs](#event-listener-logs)
25-
- [LSP traffic](#lsp-traffic)
26-
- [Server logs](#server-logs)
24+
- [Event Listener logs](#event-listener-logs)
25+
- [LSP traffic](#lsp-traffic)
26+
- [Server logs](#server-logs)
2727
- [Licensing And Acknowledgements](#licensing-and-acknowledgements)
2828

2929
<!-- /MarkdownTOC -->
@@ -74,35 +74,40 @@ The project builts on top of the standard [LSP client configuration](https://lsp
7474

7575
```json
7676
{
77+
// the command that actually launches the server process
78+
// leave this as is to use the automatically installed
79+
// pyvoice language server
7780
"command": [
7881
"$server_path"
7982
],
83+
84+
// the python interpreter to use for installing and running
85+
// the pyvoice language server. it should be 3.8 and above
86+
// pypy may also work. If null, the plug-in will try to
87+
// automatically pick a suitable interpreter
8088
"python_binary": null,
89+
90+
// environment variables to set when running the language server
8191
"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-
},
10592

93+
// set the log level for the CLIENT SIDE code of the plugin
94+
// for example these will produce logs concerning
95+
// - the interprocess communication with the programming
96+
// by voice framework
97+
// - when the plug-in chooses to synchronize spoken hints
98+
// by sending a request to the language server and
99+
// forrewarding them to the programming by voice system
100+
// etc..
101+
// it does not affect the level of the logs
102+
// that the language server produces itself like
103+
// - any errors detected during semantic analysis
104+
// - metadata about the hints that it generates
105+
// etc..
106+
"log_level":"WARNING",
107+
108+
109+
// selectors to match the files that the language server
110+
// is responsible for
106111
"selector": "source.python",
107112
// ST3
108113
"languages": [
@@ -116,21 +121,96 @@ The project builts on top of the standard [LSP client configuration](https://lsp
116121
],
117122
}
118123
],
119-
}
120-
```
121124

122-
The main settings are
125+
// a set of settings/config that will be sent to the language server
126+
// via workspace/didChangeConfiguration notification
127+
// or retrieved by the workspace/configuration server side request.
128+
// these allow you to customize how pyvoice processes each of your projects
129+
"settings": {
130+
// The base path where your python project is located.
131+
// Like all paths in this settings file it can be either
132+
// absolute or relative to the path of the sublime project.
133+
"project.path": ".",
123134

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
135+
// The path to the root of the virtual environment
136+
// again either absolute or relative to the sublime project path.
137+
"project.environmentPath": null,
125138

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
139+
// A list of paths to override the sys path if needed.
140+
// WARNING: This will COMPLETELY override the sys.path.
141+
// Leave this null to generate sys.path from the environment.
142+
"project.sysPath": null,
128143

129-
- `env` : the environment variables to use when launching the language server. If not set, it defaults to the current environment variables
144+
// Adds these paths at the end of the sys path.
145+
"project.addedSysPath": [],
146+
147+
// If enabled (default), adds paths from local directories.
148+
// Otherwise, you will have to rely on your packages being properly configured on the sys.path.
149+
"project.smartSysPath": true,
130150

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`
151+
// Enable or disable the generation of stdlib imports.
152+
"hints.imports.stdlib.enabled": true,
153+
154+
// Settings for customizing the generation of hints hints for
155+
// third-party modules. Pyvoice will try to automatically
156+
// discover the dependencies of your project and is going
157+
// to generate hints for their modules. In order to do so,pyvoice
158+
// will try:
159+
// - pep621 dependencies in pyproject.toml
160+
// - poetry dependencies in pyproject.toml
161+
// - options.install_requires in setup.cfg
162+
// - traditional requirements.txt
163+
// NOTE: By default hints would be generated ONLY for your top level dependencies
164+
// aka distributions that you directly depend on, not transiet dependencies.
165+
// default behavior is not satisfactory you can add/exclude
166+
// distributions from the settings below.
167+
168+
// Enable or disable the generation of third-party imports.
169+
"hints.imports.thirdParty.enabled": true,
170+
171+
// A list of third-party distributions to include modules from.
172+
"hints.imports.thirdParty.includeDists": [],
173+
174+
// A list of third-party distributions to exclude.
175+
"hints.imports.thirdParty.excludeDists": [],
176+
177+
// Enable or disable the generation of project imports.
178+
"hints.imports.project.enabled": true,
179+
180+
// Enable or disable the generation of explicit symbols.
181+
"hints.imports.explicitSymbols.enabled": true,
182+
183+
// A list of modules to generate hints hints for their defined symbols.
184+
"hints.imports.explicitSymbols.modules": ["typing"],
185+
186+
// Enable or disable the generation of hints hints for local scope.
187+
"hints.expressions.locals.enabled": true,
188+
// Hints from param names of the signatures of local scope variables.
189+
"hints.expressions.locals.signature": true,
190+
191+
// Enable or disable the generation of hints hints for non-local scope.
192+
"hints.expressions.nonlocals.enabled": true,
193+
// Hints from param names of the signatures of non-local scope variables.
194+
"hints.expressions.nonlocals.signature": true,
195+
196+
// Enable or disable the generation of hints hints for global scope.
197+
"hints.expressions.globals.enabled": true,
198+
// Hints from param names of the signatures of global scope variables.
199+
"hints.expressions.globals.signature": true,
200+
201+
// Enable or disable the generation of hints hints for built-in scope.
202+
"hints.expressions.builtins.enabled": true,
203+
// Hints from param names of the signatures of built-in scope variables.
204+
"hints.expressions.builtins.signature": true,
205+
206+
// An upper bound on the number of expressions to generate.
207+
"hints.expressions.limit": 2000,
208+
209+
// Set the logging level for the pyvoice executable.
210+
"logging.level": "INFO"
211+
}
212+
}
213+
```
134214

135215

136216

0 commit comments

Comments
 (0)