Skip to content

Commit

Permalink
Add feature "Go to Declaretion" and file icon
Browse files Browse the repository at this point in the history
Add TypeScript to able run more thing for the extension
Add feature "Go to Declaretion"
Add icon for lux file
  • Loading branch information
ken2057 committed Jul 1, 2023
1 parent d468295 commit 88dc6c3
Show file tree
Hide file tree
Showing 19 changed files with 3,923 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ lux/
lux_logs/

*.vsix

out
dist
node_modules
.vscode-test/
*.vsix
9 changes: 9 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ lux/**
.gitignore
.vscodeignore
lux-colorizer.code-workspace

.vscode-test/**
src/**
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ To use snippets, start typing a meta statement, like `[loop]`, and VS Code will
offer possible options. Use TAB to autocomplete a statement and jumping between
input fields.

## How to contribute

1. Clone the repo
2. Run `npm install`
3. Add your magic
4. Test extension (following [this guide](https://code.visualstudio.com/api/working-with-extensions/testing-extension))
5. (optional) To build extension file
1. Run `npm install -g @vscode/vsce`
2. Run `vsce package` (it will build .vsix file)

## Useful References

1. Lux
Expand Down
1 change: 1 addition & 0 deletions assets/examples/lux-examples/common.luxinc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[global TEST=test]
1 change: 1 addition & 0 deletions assets/examples/lux-examples/intro.lux
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Assign a global variable which is accessible in all shells
[global file=removeme.txt]
[global test5=removeme.txt]

# Start a shell
[shell single]
Expand Down
10 changes: 10 additions & 0 deletions assets/examples/lux-examples/loop.lux
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
[doc Demo the loop statement]

[global file=loop_break.tmp]
[my file3=loop_break.tmp]
[local file4=loop_break.tmp]

[include intro.lux]
[include ../test.luxinc]

[macro a test file2]
!echo 123
?$file2 $test $file $file3 $file4 $test5
?$test_here
[endmacro]
###
### Vanilla style of loops
###
Expand Down
1 change: 1 addition & 0 deletions assets/examples/test.luxinc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[global test_here=1]
Loading

0 comments on commit 88dc6c3

Please sign in to comment.