Skip to content

Commit

Permalink
Add basic setting to turn off language server (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-wiemer committed Nov 5, 2024
1 parent 3028a64 commit 41e87d1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 6.5.0 - unreleased

- Add setting: AHK++.general > enableV2LanguageServer ([#493](https://github.com/mark-wiemer-org/ahkpp/issues/493))
- Turning this off will disable functionality provided by thqby's extension
- Some tooltips and warnings may not appear in AHK v2 scripts
<!-- todo can no longer run or debug scripts lol that's a problem -->
- `true` by default, not a breaking change

## 6.4.0 - 2024-11-02 🗳️

### New features
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@
"AHK++.general": {
"type": "object",
"properties": {
"enableV2LanguageServer": {
"type": "boolean",
"default": true,
"description": "%ahk++.config.general.enableV2LanguageServer%"
},
"showOutput": {
"type": "string",
"enum": [
Expand All @@ -260,6 +265,7 @@
}
},
"default": {
"enableV2LanguageServer": true,
"showOutput": "always"
},
"additionalProperties": {
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"ahk++.command.stop": "Stop AHK Script",
"ahk++.command.updateVersionInfo": "Update File Version Info",
"ahk++.config.exclude": "[Glob patterns](<https://en.wikipedia.org/wiki/Glob_(programming)>) for excluding files and folders from completion suggestions. Applies even when files are opened.",
"ahk++.config.general.enableV2LanguageServer": "Enable the AHK v2 language server for advanced language support. AHK v2 scripts can still be ran and debugged regardless of this setting. Changes take effect after restart.",
"ahk++.config.general.showOutput": "Automatically show output view when running a script. View can always be toggled with F1 > 'View: Toggle Output' (`Ctrl+Shift+U`)",
"ahk++.config.general.showOutput.always": "Always open the output view when running a script",
"ahk++.config.general.showOutput.never": "Never automatically show the output view",
Expand Down
1 change: 1 addition & 0 deletions package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"ahk++.command.setV2Interpreter": "选择AutoHotkey2解释器",
"ahk++.command.stop": "停止运行中的脚本",
"ahk++.command.updateVersionInfo": "更新文件版本信息",
"ahk++.config.general.enableV2LanguageServer": "Enable the AHK v2 language server for advanced language support. AHK v2 scripts can still be ran and debugged regardless of this setting. Changes take effect after restart.",
"ahk++.config.general.showOutput": "运行脚本时自动显示输出视图。可通过 F1 > '视图.切换输出' (`Ctrl+Shift+U`)随时切换视图: Toggle Output' (`Ctrl+Shift+U`)",
"ahk++.config.general.showOutput.always": "运行脚本时始终打开输出视图",
"ahk++.config.general.showOutput.never": "从不自动显示输出视图",
Expand Down
1 change: 1 addition & 0 deletions src/common/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export enum ConfigKey {
compileBaseFileV2 = 'v2.file.compileBaseFile',
compileIcon = 'compiler.compileIcon',
compilerPath = 'compiler.compilerPath',
enableV2LanguageServer = 'general.enableV2LanguageServer',
exclude = 'exclude',
general = 'general',
generalV2 = 'v2.general',
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function activate(context: vscode.ExtensionContext) {
);
});

activateV2(context);
if (Global.getConfig(ConfigKey.enableV2LanguageServer)) activateV2(context);
}

class InlineDebugAdapterFactory
Expand Down

0 comments on commit 41e87d1

Please sign in to comment.