Skip to content

Commit 587b159

Browse files
Prepare 2.0.0 release
1 parent 0769df7 commit 587b159

File tree

4 files changed

+41
-22
lines changed

4 files changed

+41
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99
### New Features
1010
- Added new IntelliSense features for code auto-completion!
1111
- Improved syntax highlighting that now allows standard variables and tag pairs to be colored
12+
1213
### Fixes
1314
- Fixed bugs with the HTML tag indenting
15+
1416
### Deprecations
1517
- Removed channel entries snippets in favor of the IntelliSense auto-completion
1618
- Removed keyword snippets in favor of the IntelliSense auto-completion

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The ultimate **ExpressionEngine CMS** extension for Visual Studio Code <br> with
1616

1717
### IntelliSense and Syntax Highlighting
1818

19-
![](https://raw.githubusercontent.com/mindpixel-labs/vsc-expressionengine/release/1.2.0/docs/images/vsc-ee-syntax-snippets.gif)
19+
![](https://raw.githubusercontent.com/mindpixel-labs/vsc-expressionengine/master/docs/images/vsc-ee-syntax-snippets.gif)
2020

2121
</div>
2222

@@ -46,7 +46,7 @@ The above example would resolve to something like: `/Users/your-name/sites/my-si
4646
```
4747

4848
## Commands
49-
All commands start within the `EE` namespace. Visual Studio Code will however correctly pull up the commands even if you type it in lowercase. Also, while the full name of the commands appears long, the editor will match shorter typings like `ee addon-on`, `ee partial` etc.
49+
All commands start within the `EE` namespace. Visual Studio Code will however correctly pull up the commands even if you type it in lowercase. Also, while the full name of the commands appear long, the editor will match shorter typings like `ee addon-on`, `ee partial` etc.
5050

5151
| Command | Description |
5252
|--- | --- |
@@ -80,6 +80,28 @@ You can customize your active color theme by adding the `editor.tokenColorCustom
8080

8181
View the full list of available [scope names](https://github.com/mindpixel-labs/vsc-expressionengine/wiki/Scope-Names) to override.
8282

83+
## Settings
84+
This extension contributes the following variables to the [settings](https://code.visualstudio.com/docs/getstarted/settings):
85+
86+
- `ee.userPath`: the path to your sites user directory. Defaults to `system/user/`.
87+
88+
- `ee.suggestCompletions`: enable/disable IntelliSense/auto-completion. Is enabled by default.
89+
90+
## Snippets
91+
Here is a list of the most useful snippets to help you quickly setup your templates.
92+
93+
| Description | Trigger | Completion |
94+
|--- | --- | --- |
95+
Tag Pair | <sub>tp</sub> | Generates a tag pair {$1 $2} {/$1} |
96+
Conditional If | <sub>if</sub> | Generates a condtional tag pair {$if $1} {/if} |
97+
Conditional Else If | <sub>elseif</sub> | {if:elseif $1} |
98+
Conditional Else | <sub>else</sub> | {if:else} |
99+
Pagination Links | <sub>pl</sub> | {paginate}{pagination_links}{/paginate}|
100+
Pagination Pair | <sub>pp</sub> | Generates a full template of pagination variables. See [example](https://github.com/mindpixel-labs/vsc-expressionengine/wiki/Pagination#paginate-pair).|
101+
102+
&#x1F4D8; **Note:** The $1 symbol denotes where the cursor position will be placed when the snippet is triggered and the next steps as you tab through.
103+
104+
83105
## Development Roadmap
84106
- Providing code completion packages that can additionally installed for all the major third party add-ons!
85107
- Add error diagnostics to help prevent templating code errors or catch bugs

package.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -117,37 +117,17 @@
117117
}
118118
],
119119
"snippets": [
120-
{
121-
"language": "ee",
122-
"path": "./snippets/global-variables.json"
123-
},
124120
{
125121
"language": "ee",
126122
"path": "./snippets/tag-pair.json"
127123
},
128-
{
129-
"language": "ee",
130-
"path": "./snippets/channel-entries.json"
131-
},
132-
{
133-
"language": "ee",
134-
"path": "./snippets/categories.json"
135-
},
136124
{
137125
"language": "ee",
138126
"path": "./snippets/conditionals.json"
139127
},
140-
{
141-
"language": "ee",
142-
"path": "./snippets/layout.json"
143-
},
144128
{
145129
"language": "ee",
146130
"path": "./snippets/pagination.json"
147-
},
148-
{
149-
"language": "ee",
150-
"path": "./snippets/segments.json"
151131
}
152132
]
153133
}

src/models/variables/variables.model.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ const GlobalVariables: VariableInterface = {
111111
description: '',
112112
snippet: 'layout="$1"'
113113
},
114+
last_segment: {
115+
hasClosingTag: false,
116+
description: '',
117+
snippet: ''
118+
},
114119
member_group: {
115120
hasClosingTag: false,
116121
description: '',
@@ -156,6 +161,16 @@ const GlobalVariables: VariableInterface = {
156161
description: '',
157162
snippet: ''
158163
},
164+
segment: {
165+
hasClosingTag: false,
166+
description: '',
167+
snippet: 'segment_$1'
168+
},
169+
"segment:": {
170+
hasClosingTag: false,
171+
description: '',
172+
snippet: 'segment:$1'
173+
},
159174
site_url: {
160175
hasClosingTag: false,
161176
description: '',

0 commit comments

Comments
 (0)