Skip to content

Commit

Permalink
Added a bunch of snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaberek committed May 9, 2020
1 parent d3640f7 commit 01558ef
Show file tree
Hide file tree
Showing 5 changed files with 415 additions and 7 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ Euphoria language support and debugging for Visual Studio Code
### Declarative language features

- [x] Syntax highlighting
- [ ] Snippet completion
- [x] Snippet completion
- [x] Bracket matching
- [x] Bracket autoclosing
- [x] Bracket autosurrounding
- [x] Comment toggling
- [ ] Auto indentation
- [x] Auto indentation
- [ ] Folding

### Programmatic language features

**TODO**

- [ ] Hover information
- [ ] Auto completion
- [ ] Jump to definition
Expand All @@ -25,6 +27,12 @@ Euphoria language support and debugging for Visual Studio Code
- [ ] Refactoring
- [ ] Folding

## Releases

### 1.1.0

Added a bunch of snippets (see [snippets](snippets/README.md))

### 1.0.0

Initial release
Expand Down
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "vscode-euphoria",
"displayName": "Euphoria",
"version": "1.0.0",
"version": "1.1.0",
"publisher": "openeuphoria",
"description": "Euphoria language support and debugging for Visual Studio Code",
"author": {
"name": "Greg Haberek",
"email": "ghaberek@gmail.com"
},
"categories": [
"Programming Languages"
"Programming Languages",
"Snippets"
],
"icon": "images/icon.png",
"engines": {
Expand All @@ -28,13 +29,19 @@
"languages": [{
"id": "euphoria",
"aliases": ["Euphoria", "euphoria"],
"extensions": [".e","*.eu","*.ew",".ex","*.exu","*.exw"],
"extensions": [".e",".eu",".ew",".ex",".exu","*.exw"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "euphoria",
"scopeName": "source.euphoria",
"path": "./syntaxes/euphoria.tmLanguage.json"
}]
}],
"snippets": [
{
"language": "euphoria",
"path": "./snippets/snippets.json"
}
]
}
}
69 changes: 69 additions & 0 deletions snippets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# vscode-euphoria

## Snippets

Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional statements. [Snippets in Visual Studio Code](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets) support _substring matching_ so you can type `pf` for `public-function`, etc. Most snippets have predefined breakpoints that can be navigated using the `Tab` key. For example, typing `if[Tab]` will give a complete `if` statement with the cursor between `if` and `then`, and then pressing `Tab` again will move the cursor to the body of the `if` statement.

### Branching statements

- `if`
- `else`
- `elsif`
- `ifdef`
- `elsedef`
- `elsifdef`
- `switch`
- `case`
- `case-else`
- `switch-with-fallthru`

### Looping statements

- `while`
- `while-with-entry`
- `loop`
- `loop-with-entry`
- `for`
- `for-by`

### Declaration statements

- `constant`
- `enum`
- `enum-type`

### Routine statements

- `function`
- `procedure`
- `type`

### Scoped variations

**public**

- `public-constant`
- `public-enum`
- `public-enum-type`
- `public-function`
- `public-procedure`
- `public-type`

**export**

- `export-constant`
- `export-enum`
- `export-enum-type`
- `export-function`
- `export-procedure`
- `export-type`

**global**

- `global-constant`
- `global-enum`
- `global-enum-type`
- `global-function`
- `global-procedure`
- `global-type`

Loading

0 comments on commit 01558ef

Please sign in to comment.