Skip to content

Commit 3d97499

Browse files
committed
i forgor
1 parent 4672ac3 commit 3d97499

File tree

14 files changed

+552
-26
lines changed

14 files changed

+552
-26
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ target/
88
package-lock.json
99
changelog.txt
1010
dataInput.txt
11-
dataOutput.json
11+
dataOutput.json
12+
changelog

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Funkin Script AutoComplete
2-
Simple AutoCompleter for [Psych Engine](https://github.com/ShadowMario/FNF-PsychEngine) Lua scripts.<br>
2+
Friday Night Funkin' Script AutoCompleter for [Friday Night Funkin](https://ninja-muffin24.itch.io/funkin) and [Psych Engine](https://github.com/ShadowMario/FNF-PsychEngine)!<br>
33

4-
# Features
4+
# Features
5+
## Haxe Scripted Classes
6+
- Functional Haxe completion!
7+
- *PLANNED!* ~~Completion for Friday Night Funkin v0.3.0 Modding API~~
8+
## Lua
59
- Function/Event/Variable auto completing
610
- Warnings for deprecated functions
711
- Hovers with documentation
@@ -19,8 +23,12 @@ Simple AutoCompleter for [Psych Engine](https://github.com/ShadowMario/FNF-Psych
1923
6. Optionally you can change the targetted engine in **File/Preferences/Settings/Extensions/Funkin Script AutoComplete/Lua Engine**
2024

2125
# Quick Documentation
26+
## Script Types
27+
* *.hxc - V-Slice (FNF v0.3.0) Scripts, they should always begin with a upper case
28+
* *.lua - Any other Lua based FNF Engine, like Psych Engine
29+
2230
## Code Comments
23-
- Enable this extension in a file: `---@funkinScript` (only if `funkinscriptautocomplete.enableOnlyOnCertainScripts` setting is on)
31+
- Enable this extension in a file: `---@funkinScript` (only if `funkinvscode.enableOnlyOnCertainScripts` setting is on)
2432
- Set FNF engine for this file: `---@funkinEngine={psych|pengine|etc.}`
2533
- Disable deprecated warnings for specific function on this file: `---@diagnostic disable: {funcs}`
2634
- Disable deprecated warnings for specific function on next line: `---@diagnostic disable-next-line: {funcs}`

art/icon.psd

122 KB
Binary file not shown.

art/thumbnail/thumbnail.png

33.6 KB
Loading

art/thumbnail/thumbnail.psd

131 KB
Binary file not shown.

art/thumbnail/thumbnail_github.png

27.2 KB
Loading

art/thumbnail/thumbnail_github.psd

141 KB
Binary file not shown.

data/funkin_latest.ver

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.3.2

images/icon.png

-1.01 KB
Loading

package.json

Lines changed: 69 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "funkin-script-autocompleter",
33
"displayName": "Funkin Script AutoCompleter",
44
"description": "AutoCompleter for Friday Night Funkin` scripts",
5-
"version": "1.4.2",
5+
"version": "2.0.0",
66
"icon": "images/icon.png",
77
"publisher": "Snirozu",
88
"private": true,
@@ -33,20 +33,20 @@
3333
"devDependencies": {
3434
"@types/node": "^16.11.7",
3535
"@types/vscode": "^1.32.0",
36-
"@vscode/vsce": "2.23.0",
3736
"@typescript-eslint/eslint-plugin": "^5.30.0",
3837
"@typescript-eslint/parser": "^5.30.0",
38+
"@vscode/vsce": "2.23.0",
3939
"eslint": "^8.13.0",
4040
"typescript": "^4.7.2"
4141
},
4242
"contributes": {
4343
"configuration": {
4444
"title": "Funkin Script AutoComplete",
4545
"properties": {
46-
"funkinscriptautocomplete.luaEngine": {
46+
"funkinvscode.luaEngine": {
4747
"type": "string",
4848
"default": "psych_latest",
49-
"description": "Which Friday Night Funkin' Engine Lua Script API will this extension autocomplete.\nRequires Restart/Reload to take effect.",
49+
"description": "Which Friday Night Funkin' Engine Lua Script API will this extension autocomplete\nRequires VSCode Restart to take effect!",
5050
"enum": [
5151
"psych_latest",
5252
"psych_0.7",
@@ -58,21 +58,80 @@
5858
"Psych Engine (v0.6)"
5959
]
6060
},
61-
"funkinscriptautocomplete.enableOnlyOnCertainScripts": {
61+
"funkinvscode.enableOnlyOnCertainScripts": {
62+
"type": "boolean",
63+
"default": false,
64+
"description": "If checked, this extension will only work if a Lua script contains '---@funkinScript' comment"
65+
},
66+
"funkinvscode.eventDocumentationGeneration": {
6267
"type": "boolean",
6368
"default": false,
64-
"description": "If checked, this extension will only work if a script contains '---@funkinScript' comment"
69+
"description": "If checked, after entering a event function, placeholder arguments are inserted on top of the function"
6570
},
66-
"funkinscriptautocomplete.functionArgsGeneration": {
71+
"funkinvscode.functionArgumentsGeneration": {
6772
"type": "boolean",
68-
"default": true,
69-
"description": "If unchecked, after entering a function placeholder arguments aren't prefixed to events"
73+
"default": false,
74+
"description": "If checked, after entering a call function, default values of arguments are inserted inside of the function"
75+
},
76+
"funkinvscode.hscriptFileExtension": {
77+
"type": "string",
78+
"default": "hxc",
79+
"description": "The associating file extension for Friday Night Funkin' scripts"
80+
},
81+
"funkinvscode.haxelibs": {
82+
"type": "array",
83+
"default": [
84+
"funkin https://github.com/FunkinCrew/Funkin main source/",
85+
"funkin.vis https://github.com/FunkinCrew/funkVis",
86+
"flixel",
87+
"flixel-addons",
88+
"flixel-text-input",
89+
"flixel-ui",
90+
"flxanimate",
91+
"format",
92+
"hamcrest",
93+
"haxeui-core",
94+
"haxeui-flixel",
95+
"hscript https://github.com/HaxeFoundation/hscript",
96+
"hxCodec",
97+
"json2object",
98+
"lime",
99+
"openfl",
100+
"polymod",
101+
"thx.semver",
102+
"FlxPartialSound https://github.com/FunkinCrew/FlxPartialSound.git"
103+
],
104+
"description": "The Haxelibs you want to use\nRequires VSCode Restart to take effect!"
70105
}
71106
}
72-
}
107+
},
108+
"languages": [
109+
{
110+
"id": "haxe",
111+
"extensions": [
112+
"hxc"
113+
]
114+
}
115+
],
116+
"commands": [
117+
{
118+
"command": "funkinvscode.updatelibs",
119+
"title": "Update Haxelibs for Funkin Scripts"
120+
},
121+
{
122+
"command": "funkinvscode.updatelibsnofunkin",
123+
"title": "Update Haxelibs for Funkin Scripts (Excluding Funkin Lib)"
124+
},
125+
{
126+
"command": "funkinvscode.updatefunkin",
127+
"title": "Update Funkin API library"
128+
}
129+
]
73130
},
74131
"dependencies": {
75132
"@types/needle": "^3.2.0",
133+
"fast-xml-parser": "^4.4.1",
134+
"funkin-script-autocompleter": "file:",
76135
"needle": "^3.2.0"
77136
}
78137
}

src/engineData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { dataPath } from './extension';
88
const cachedJsons: Map<string, any> = new Map<string, any>();
99
const cachedFiles: Map<string, string> = new Map<string, string>();
1010

11-
async function getData(file:string):Promise<string | any> {
11+
export async function getData(file:string):Promise<string | any> {
1212
file = file.trim();
1313

1414
if (file.endsWith(".ver")) {
@@ -143,5 +143,5 @@ function getLuaEngine(document?:vscode.TextDocument | undefined):string | undefi
143143
return line.trim().split("=")[1];
144144
}
145145
}
146-
return vscode.workspace.getConfiguration().get("funkinscriptautocomplete.luaEngine");
146+
return vscode.workspace.getConfiguration().get("funkinvscode.luaEngine");
147147
}

0 commit comments

Comments
 (0)