Skip to content

Commit

Permalink
feat: add more js autocompletion and fix snippet tab behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhdaware committed Sep 17, 2023
1 parent f19fae8 commit 7c020cb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "abell-language-features",
"displayName": "Abell Language Features",
"description": "Syntax Highlighting for .abell files. Learn more about Abell at https://abelljs.org/",
"version": "1.2.0",
"version": "1.2.1",
"publisher": "saurabh",
"author": {
"name": "saurabhdaware"
Expand Down
33 changes: 33 additions & 0 deletions server/src/modes/abellMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ const builtInJSFunctions: (CompletionItem & {on?: string})[] = [
kind: CompletionItemKind.Function,
documentation: 'console.log from javascript (logs in your terimnal)'
},
{
label: 'import',
kind: CompletionItemKind.Keyword,
},
{
label: 'from',
kind: CompletionItemKind.Keyword,
},
{
label: 'setTimeout',
kind: CompletionItemKind.Function
Expand Down Expand Up @@ -65,6 +73,31 @@ const builtInJSFunctions: (CompletionItem & {on?: string})[] = [
on: '.',
label: 'reduce',
kind: CompletionItemKind.Function,
},
{
on: '.',
label: 'toUpperCase',
kind: CompletionItemKind.Function,
},
{
on: '.',
label: 'toLowerCase',
kind: CompletionItemKind.Function,
},
{
on: '.',
label: 'includes',
kind: CompletionItemKind.Function,
},
{
on: '.',
label: 'startsWith',
kind: CompletionItemKind.Function,
},
{
on: '.',
label: 'endsWith',
kind: CompletionItemKind.Function,
}
]

Expand Down
4 changes: 2 additions & 2 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"Abell-HTML Block": {
"prefix": "html",
"body": [
"<html>\n<body>\n {{ $1 }}\n</body>\n</html>"
"<html>\n<body>\n {{ $0 }}\n</body>\n</html>"
],
"description": "Start HTML page with Abell Template"
},
"Abell-Declaration Block": {
"prefix": "declaration",
"body": [
"{{\n\t/** @declaration */\n\t$1\n}}"
"{{\n\t/** @declaration */\n\n\t$0\n}}"
],
"description": "Declaration block to declare variables in abell"

Expand Down

0 comments on commit 7c020cb

Please sign in to comment.