Skip to content

Commit

Permalink
Vibe coded Simfony extension for vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Feb 27, 2025
1 parent 3fab910 commit 0552d47
Show file tree
Hide file tree
Showing 10 changed files with 549 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target
target
*.vsix
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ build:
test:
mcpp -P src/tests.simf -o target/tests.out.simf
simfony run target/tests.out.simf

ext:
cd simfony-ext && vsce package
4 changes: 4 additions & 0 deletions simfony-ext/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
21 changes: 21 additions & 0 deletions simfony-ext/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 StarkWare Industries Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
105 changes: 105 additions & 0 deletions simfony-ext/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Simfony Language Support

VSCode extension providing syntax highlighting and autocompletion for the Simfony programming language.

## Features

- Syntax highlighting for .simf files
- Basic language configuration (brackets, comments)
- Support for C-style preprocessor directives (#include, #define, etc.)
- (Coming soon) Autocompletion for standard library

## Installation

### Local Installation

1. Clone this repository
2. Navigate to the extension directory:
```bash
cd simfony-ext
```
3. Install dependencies:
```bash
npm install
```
4. Package the extension:
```bash
npm install -g @vscode/vsce
vsce package
```
This will create a `.vsix` file in the current directory.

5. Install the extension in VSCode:
- Launch VS Code
- Go to the Extensions view (Ctrl+Shift+X)
- Click on the "..." menu in the top-right of the Extensions view
- Select "Install from VSIX..."
- Navigate to and select the `.vsix` file you created

### Alternative Installation Method

You can also install the extension directly from the source code:

1. Copy the `simfony-ext` folder to your VSCode extensions directory:
- Windows: `%USERPROFILE%\.vscode\extensions`
- macOS/Linux: `~/.vscode/extensions`

2. Restart VSCode

## Development

1. Clone this repository
2. Run `npm install`
3. Open the project in VS Code
4. Press F5 to start debugging (this will launch a new VSCode window with the extension loaded)
5. Make changes to the extension
6. Reload the debugging window to see your changes (Ctrl+R or Cmd+R)

### Reloading the Extension During Development

When making changes to the extension, you can reload it without uninstalling and reinstalling:

1. **Using the Command Palette**:
- Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS)
- Type "Developer: Reload Window" and select it

2. **Using keyboard shortcut**:
- Press `Ctrl+R` (or `Cmd+R` on macOS)

3. **For extensions installed from folder**:
- Make your changes to the extension files
- Run the "Developer: Reload Window" command as described above
- VSCode will reload with the updated extension

4. **For more substantial changes**:
- If you've made significant changes to the extension's structure or manifest
- You may need to restart VSCode completely (close and reopen)
- In some cases, you might need to run the command "Developer: Restart Extension Host"

## Building from Source

To build the extension from source:

1. Install Node.js (v14 or later recommended)
2. Clone this repository
3. Navigate to the extension directory:
```bash
cd simfony-ext
```
4. Install dependencies:
```bash
npm install
```
5. Package the extension:
```bash
npm install -g @vscode/vsce
vsce package
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

[MIT](LICENSE)
22 changes: 22 additions & 0 deletions simfony-ext/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"comments": {
"lineComment": "//"
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"" }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""]
]
}
16 changes: 16 additions & 0 deletions simfony-ext/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions simfony-ext/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "simfony-language",
"displayName": "Simfony Language Support",
"description": "Syntax highlighting and autocompletion for Simfony language",
"version": "0.0.1",
"publisher": "starkware",
"repository": {
"type": "git",
"url": "https://github.com/keep-starknet-strange/stark-symphony"
},
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Programming Languages"
],
"contributes": {
"languages": [{
"id": "simfony",
"aliases": ["Simfony", "simfony"],
"extensions": [".simf"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "simfony",
"scopeName": "source.simfony",
"path": "./syntaxes/simfony.tmLanguage.json"
}]
},
"license": "MIT"
}
Loading

0 comments on commit 0552d47

Please sign in to comment.