Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous cleanup #620

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cec9490
Use new config.ts for some config work (#42)
mark-wiemer Oct 5, 2024
5a64a7d
Add config utilities and unit tests (#43)
mark-wiemer Oct 5, 2024
57f790f
Add prettier and sort-package-json (#44)
mark-wiemer Oct 5, 2024
cde715a
Update config references (#45)
mark-wiemer Oct 5, 2024
dff9145
Update build action (#46)
mark-wiemer Oct 5, 2024
78abe12
Use getCfg and setCfg for everything except FormatOptions (#47)
mark-wiemer Oct 6, 2024
8340d3c
Add utilities for formatter options (#48)
mark-wiemer Oct 6, 2024
99fe868
Cleanup tests, clean before building (#49)
mark-wiemer Oct 6, 2024
4209bd6
Add env.ts for global values (#50)
mark-wiemer Oct 6, 2024
e1ce3da
Use env.ts for remaining commands (#52)
mark-wiemer Oct 6, 2024
17991c5
Add serverResetInterpreterPath
mark-wiemer Oct 6, 2024
157162d
Rename ahkpath_cur to interpreterPath in server
mark-wiemer Oct 6, 2024
f9c3e6a
Document common#loadAHK2
mark-wiemer Oct 6, 2024
3ee768a
Cleanup enum_ahkfiles
mark-wiemer Oct 7, 2024
01249cb
Change LibIncludeType values to be strings
mark-wiemer Oct 7, 2024
1165742
Change CallWithoutParentheses to enum
mark-wiemer Oct 7, 2024
7014b5c
Change set_ahkpath to setInterpreterPath
mark-wiemer Oct 7, 2024
10b1ae5
Improve typing of getCfg
mark-wiemer Oct 7, 2024
e03b14c
Cleanup completionProvider.ts
mark-wiemer Oct 7, 2024
7aa5369
Make global config private for safety
mark-wiemer Oct 7, 2024
8ad6f94
Change opts to options in formattingProvider
mark-wiemer Oct 7, 2024
9e75c7e
Misc cleanup in lexer
mark-wiemer Oct 7, 2024
bb6844a
Rename workfolder to workDir
mark-wiemer Oct 7, 2024
370b6e3
Change `doc` to `lexer` for clarity
mark-wiemer Oct 7, 2024
08f2644
Cleanup indentString name
mark-wiemer Oct 7, 2024
eee4c8f
Cleanup if-else in server.ts
mark-wiemer Oct 7, 2024
c882ee3
Fixup callwithoutparentheses unit tests
mark-wiemer Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prettier defaults to LF and most files are already saved that way
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

github: thqby
custom:
- https://www.paypal.me/thqby
- https://www.paypal.me/thqby
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Build

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
branches: ["main"]
branches: ['main', 'upstream-main']
workflow_dispatch:
merge_group:

Expand All @@ -27,6 +27,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: 'npm'
- run: npm install
- run: npm run vscode:prepublish
- run: npm run validate
24 changes: 24 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
client/src/browserClientMain.ts
client/src/extension.ts
client/src/test/utils.ts
server/src/ahkProvider.ts
server/src/browserServerMain.ts
server/src/codeActionProvider.ts
server/src/colorProvider.ts
server/src/commandProvider.ts
server/src/common.ts
server/src/completionProvider.ts
server/src/constants.ts
server/src/definitionProvider.ts
server/src/formattingProvider.ts
server/src/hoverProvider.ts
server/src/lexer.ts
server/src/localize.ts
server/src/PEFile.ts
server/src/referencesProvider.ts
server/src/renameProvider.ts
server/src/scriptrunner.ts
server/src/semanticTokensProvider.ts
server/src/server.ts
server/src/signatureProvider.ts
server/src/symbolProvider.ts
19 changes: 10 additions & 9 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ import { defineConfig } from '@vscode/test-cli';
import { execSync } from 'child_process';

let timeout, vscode_path;
if (process.execPath.toLowerCase().endsWith('code.exe'))
timeout = 0;
if (process.execPath.toLowerCase().endsWith('code.exe')) timeout = 0;
else {
try {
const m = execSync('chcp 65001 && reg query HKCR\\vscode\\shell\\open\\command', { encoding: 'utf8' })
.match(/REG_SZ\s+("([^"]+)"|\S+)/);
const m = execSync(
'chcp 65001 && reg query HKCR\\vscode\\shell\\open\\command',
{ encoding: 'utf8' },
).match(/REG_SZ\s+("([^"]+)"|\S+)/);
vscode_path = m[2] || m[1];
} catch { }
} catch {}
}

export default defineConfig({
files: 'client/dist/test/**/*.test.js',
mocha: {
failZero: true,
timeout
timeout,
},
useInstallation: vscode_path && {
fromPath: vscode_path
}
});
fromPath: vscode_path,
},
});
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"connor4312.esbuild-problem-matchers",
"dbaeumer.vscode-eslint"
]
}
}
20 changes: 6 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"preLaunchTask": "npm: watch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/client/dist/**/*.js"
]
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/client/dist/**/*.js"]
},
{
"type": "node",
Expand All @@ -27,6 +23,7 @@
]
},
{
// Results go to Debug Console (Ctrl+Shift+Y)
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
Expand All @@ -36,9 +33,7 @@
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/client/dist/test/**/*.js"
],
"outFiles": ["${workspaceFolder}/client/dist/test/**/*.js"],
"testConfiguration": "${workspaceFolder}/.vscode-test.mjs"
},
{
Expand All @@ -61,10 +56,7 @@
"compounds": [
{
"name": "Client + Server",
"configurations": [
"Launch Client",
"Attach to Server"
]
"configurations": ["Launch Client", "Attach to Server"]
}
]
}
}
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"git.ignoreLimitWarning": true,
"AutoHotkey2.InterpreterPath": "c:\\Program Files\\AutoHotkey\\v2\\AutoHotkey64.exe"
}
"AutoHotkey2.InterpreterPath": "c:\\Program Files\\AutoHotkey\\v2\\AutoHotkey64.exe",
"typescript.tsdk": "node_modules\\typescript\\lib",
"editor.formatOnSave": true
}
4 changes: 3 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
"script": "watch",
"group": "build",
"isBackground": true,
// Requires connor4312.esbuild-problem-matchers extension
"problemMatcher": "$esbuild-watch"
},
{
"type": "npm",
"script": "watch-web",
"group": "build",
"isBackground": true,
// Requires connor4312.esbuild-problem-matchers extension
"problemMatcher": "$esbuild-watch"
}
]
}
}
Loading
Loading