mirror of https://github.com/mtshiba/pylyzer
update extension version
This commit is contained in:
parent
5c36232696
commit
cf9361e97e
|
|
@ -60,6 +60,8 @@ pylyzer as a language server supports various features, such as completion and r
|
|||
|
||||

|
||||
|
||||
## [VSCode extension](https://github.com/mtshiba/pylyzer/blob/main/extension)
|
||||
|
||||
## How it works
|
||||
|
||||
pylyzer uses the type checker of [the Erg programming language](https://erg-lang.org) internally.
|
||||
|
|
|
|||
|
|
@ -15,3 +15,18 @@ or
|
|||
```console
|
||||
cargo install pylyzer
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
| - | - |
|
||||
| pylyzer.restartLanguageServer | Restart the language server |
|
||||
|
||||
## Settings
|
||||
|
||||
| Setting | Description | Default |
|
||||
| - | - | - |
|
||||
| pylyzer.diagnostics | Enable diagnostics | true |
|
||||
| pylyzer.inlayHints | Enable inlay hints (this feature is unstable) | false |
|
||||
| pylyzer.smartCompletion | Enable smart completion (see [ELS features](https://github.com/erg-lang/erg/blob/main/crates/els/doc/features.md))| true |
|
||||
| pylyzer.checkOnType | Perform checking each time any character is entered. This improves the accuracy of completion, etc., but may slow down the execution | false |
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "pylyzer",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pylyzer",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "^8.0.2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"displayName": "pylyzer",
|
||||
"description": "A fast Python static code analyzer & language server for VSCode",
|
||||
"publisher": "pylyzer",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"engines": {
|
||||
"vscode": "^1.70.0"
|
||||
},
|
||||
|
|
@ -43,6 +43,11 @@
|
|||
"type": "object",
|
||||
"title": "pylyzer",
|
||||
"properties": {
|
||||
"pylyzer.diagnostics": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"markdownDescription": "Enable diagnostics"
|
||||
},
|
||||
"pylyzer.inlayHints": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ async function startLanguageClient(context: ExtensionContext) {
|
|||
.get<string>("executablePath", "");
|
||||
return executablePath === "" ? "pylyzer" : executablePath;
|
||||
})();
|
||||
const enableDiagnostics = workspace.getConfiguration("pylyzer").get<boolean>("diagnostics", true);
|
||||
const enableInlayHints = workspace.getConfiguration("pylyzer").get<boolean>("inlayHints", false);
|
||||
const enableSemanticTokens = workspace.getConfiguration("pylyzer").get<boolean>("semanticTokens", true);
|
||||
const enableHover = workspace.getConfiguration("pylyzer").get<boolean>("hover", true);
|
||||
|
|
@ -23,9 +24,13 @@ async function startLanguageClient(context: ExtensionContext) {
|
|||
/* optional features */
|
||||
const checkOnType = workspace.getConfiguration("pylyzer").get<boolean>("checkOnType", false);
|
||||
let args = ["--server"];
|
||||
if (!(enableInlayHints && enableSemanticTokens && enableHover && smartCompletion) || checkOnType) {
|
||||
if (!(enableDiagnostics && enableSemanticTokens && enableHover && smartCompletion) || (checkOnType || enableInlayHints)) {
|
||||
args.push("--");
|
||||
}
|
||||
if (!enableDiagnostics) {
|
||||
args.push("--disable");
|
||||
args.push("diagnostic");
|
||||
}
|
||||
if (!enableInlayHints) {
|
||||
args.push("--disable");
|
||||
args.push("inlayHints");
|
||||
|
|
|
|||
Loading…
Reference in New Issue