Skip to content

Commit f8ea846

Browse files
committed
feat: v0.1.0-alpha
1 parent c48373f commit f8ea846

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+571126
-83849
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
TODO.txt
12
out
23
node_modules
34
client/server
File renamed without changes.

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,51 @@
66
## Introduction
77
**ZeroHour-Server** is a language server written in TypeScript for Command and Conquor Generals Zero Hour INI. The server is intended to provide formatting, linting and code completion. Currently this is intended for Visual Studio Code only, however all functionallities will be server sided and can be utilized in other IDEs by creating an interface for communicating with the server over Json-RPC.
88

9+
## How to install
10+
11+
1. Open Visual Studio Code
12+
2. Open the Extensions Tab
13+
3. Search for ZeroSyntax
14+
4. Click Install
15+
5. Click Reload
16+
6. Done!
17+
18+
## Functionallities
19+
ZeroSyntax language server supports the following functionallities:
20+
- Formatting
21+
- Diagnostics
22+
- Code Completion
23+
24+
25+
### Formatting
26+
To format a ini file you can use the following command:
27+
28+
1. Access it from the Command Pallette (Ctrl+Shift+P or Cmd+Shift+P on Mac)
29+
2. Write:
30+
```plaintext
31+
> Format Document
32+
```
33+
3. Press Enter
34+
35+
#### Before
36+
TODO: Add image
37+
38+
#### After
39+
TODO: Add image
40+
41+
42+
### Diagnostics
43+
Diagnostics works out of the box. Any syntax errors will be highlighted in the editor.
44+
45+
### Code Completion
46+
The server supports context based code completion. This is done by analyzing the syntax tree and collecting possible completions based on the current context.
47+
48+
1. Write some code
49+
2. Press Ctrl+Space
50+
51+
[Completions](./images/gifs/ZeroSyntax-ServerCompletionGif.gif)
52+
53+
954
## Contributing
1055
For contributing you will need to fork the repository, create your own branch make and test any changes you feel is missing from the project and create a pull request. I will then take a look at the code changes and merge the code if everything is in order.
1156

client/package-lock.json

Lines changed: 16 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
"vscode-test": "^1.6.1"
3232
},
3333
"dependencies": {
34+
"@types/vscode": "^1.94.0",
3435
"glob": "^11.0.0",
3536
"vscode-languageclient": "^9.0.1",
36-
"vscode-languageserver-textdocument": "^1.0.12"
37+
"vscode-languageserver-protocol": "^3.17.5",
38+
"vscode-languageserver-textdocument": "^1.0.12",
39+
"vscode-languageserver-types": "^3.17.5"
3740
}
3841
}

client/src/extension.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export function activate(context: vscode.ExtensionContext) {
103103
if (languageServerRunning) {
104104
client.start();
105105
}
106+
107+
vscode.window.showWarningMessage('Zero Syntax: This is an alpha version!\nPlease report bugs to https://github.com/ViTeXFTW/ZeroSyntax-Server/issues');
106108
}
107109

108110
vscode.workspace.onDidChangeConfiguration((e) => {

client/src/test/clientActivation.test.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

client/src/test/diagnostics.test.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

client/src/test/helper.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

client/src/test/index.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)