Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation instructions, formatting in README.md #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 30 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,68 @@
## Features

- Syntax highlighting
- Eval expression ```alt+e```
- Eval file ```alt+l```
- Eval expression: `Alt+E`
- Eval file: `Alt+L`

## Notes
## Installation

This extension is not published yet. To install proceed to local install section.
### From the VS Code Marketplace

## Local install
The extension is available [here](https://marketplace.visualstudio.com/items?itemName=janet-lang.vscode-janet).

To install, launch VS Code Quick Open (`Cmd+P`), paste the following command, and press enter.

```
ext install janet-lang.vscode-janet
```

Alternatively, run the following in a terminal.

```shell
code --install-extension janet-lang.vscode-janet
```

### From source

```shell
# First, make sure you have Node.js version 14 or greater installed.

# Clone the extension.
git clone https://github.com/janet-lang/vscode-janet.git
cd vscode-janet

# Install vscode-janet dependencies.
# Install vscode-janet's dependencies.
npm install

# Generate the vscode extension (VSIX) file using vsce.
# Generate the VS Code extension (VSIX) file using vsce.
npx vsce package

# Install the extension.
code --install-extension vscode-janet-0.0.2.vsix

# Finally reload the vscode window (cmd + shift + P > Developer: Reload Window).
# Finally, reload the VS Code window (Cmd+Shift+P > Developer: Reload Window).
```

Alternatively you can clone the extension right into vscode's extention directory. This is easier, but can be unreliable as vscode will sometimes clean up the extension directory and remove vscode-janet.
```
Alternatively, you can clone the extension right into VS Code's extension directory. This is easier, but can be unreliable as VS Code will sometimes clean up the extension directory and remove vscode-janet.

```shell
# Clone the extension.
cd ~/.vscode/extensions
git clone https://github.com/janet-lang/vscode-janet.git

# Force vscode to regenerate the extensions.json file.
# Force VS Code to regenerate the extensions.json file.
mv extensions.json /tmp/

# Finally reload the vscode window (cmd + shift + P > Developer: Reload Window).
# Finally, reload the VS Code window (Cmd+Shift+P > Developer: Reload Window).

# If you're finding that vscode isn't loading the extension, you can force it to
# If you're finding that VS Code isn't loading the extension, you can force it to
# regenerate the extensions.json file by removing ~/.vscode/extensions/extensions.json.
```


## Debug this extension

- Run `npm install` in terminal to install dependencies
- Run `npm install` in a terminal to install dependencies
- Run the `Run Extension` target in the Debug View in VS Code. This will:
- Start a task `npm: watch` to compile the code
- Run the extension in a new VS Code window