Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ken2057 committed Jul 3, 2023
1 parent eacea33 commit 9d62942
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ 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.

## Features

### Go to Declaretion

1. Click into variable or include file path
2. Press key F12 (Default shortcut)

For include file path with environment variable (e.g. $W $TEST_DIR)
You need to add custom variable for those variables, by:
1. Ctrl/Command + Shift + P
2. Type "User settings JSON" -> press Enter
3. Add the below value into the json file opened
```
"lux.envVariables": {
"W": "<your_file_path>",
"TEST_PATH": "<your_file_path"
},
```
4. Save the file and retry

## How to contribute

1. Clone the repo
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{
"title": "Custom Lux variable value",
"properties": {
"lux.variables": {
"lux.envVariables": {
"type": "object",
"default": {},
"description": "Custom variable value (in case of environment variable e.g. $TEST_DIR)"
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function isSkipLine(line: string) {

export function getCustomVariable(varName: string): string | undefined {
return vscode.workspace
.getConfiguration("lux.variables")
.getConfiguration("lux.envVariables")
.get(varName)
}

Expand Down

0 comments on commit 9d62942

Please sign in to comment.