@@ -11,19 +11,19 @@ This is the sublime portion of [pyvoice](https://github.com/PythonVoiceCodingPlu
11
11
12
12
- [ Features] ( #features )
13
13
- [ 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 )
17
17
- [ 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 )
21
21
- [ Enabling or Disabling the plugin] ( #enabling-or-disabling-the-plugin )
22
22
- [ Commands] ( #commands )
23
23
- [ 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 )
27
27
- [ Licensing And Acknowledgements] ( #licensing-and-acknowledgements )
28
28
29
29
<!-- /MarkdownTOC -->
@@ -74,35 +74,40 @@ The project builts on top of the standard [LSP client configuration](https://lsp
74
74
75
75
``` json
76
76
{
77
+ // the command that actually launches the server process
78
+ // leave this as is to use the automatically installed
79
+ // pyvoice language server
77
80
"command" : [
78
81
" $server_path"
79
82
],
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
80
88
"python_binary" : null ,
89
+
90
+ // environment variables to set when running the language server
81
91
"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
92
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
106
111
"selector" : " source.python" ,
107
112
// ST3
108
113
"languages" : [
@@ -116,21 +121,96 @@ The project builts on top of the standard [LSP client configuration](https://lsp
116
121
],
117
122
}
118
123
],
119
- }
120
- ```
121
124
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" : " ." ,
123
134
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 ,
125
138
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 ,
128
143
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 ,
130
150
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
+ ```
134
214
135
215
136
216
0 commit comments