Code Monkey home page Code Monkey logo

vscode-janet's Introduction

Janet language support for Visual Studio Code

Features

  • Syntax highlighting
  • Eval expression alt+e
  • Eval file alt+l

Notes

This extension is not published yet. To install proceed to local install section.

Local install

# 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.
npm install

# Generate the vscode 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).

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.

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

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

# Finally reload the vscode window (cmd + shift + P > Developer: Reload Window).

# If you're finding that vscode 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 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

vscode-janet's People

Contributors

bakpakin avatar chrisfougner avatar dependabot[bot] avatar foges avatar honix avatar lpedrosa avatar pyrmont avatar quan-nh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vscode-janet's Issues

Evaluate expression?

I'm sure that I'm missing something obvious (new to Janet and VS Code), but are there any settings or installation steps to use the keyboard shortcut to evaluate an expression (on macOS)?

Enhancement: Make extension work independently on jpm / spork being installed

Janet is a small language that can be conveniently installed and used just by copying a single binary, with no other dependencies or libraries.

However, the formatting in the VS Code extension only works if spork is installed. To install spork, jpm has to be installed.

It's trivial to modify the extension so that it runs independently on jpm or spork, requiring just the janet binary. I think this would make it easier to use the extension for people who are e.g. just trying Janet out and do not (yet) even know what jpm or spork is.

Extension doesn't show up in Extensions

After having cloned the repo into ~/.vscode/extensions it doesn't show up in my Extensions tab, so I can't enable it.

Looked around in vscode docs but couldn't find a way to enable it outside generating some sort of installation file.

Command history is not working

There is no command history in the Janet REPL started from the extension. It also lacks autocompletion too.

Expected
When clicking Up Arrow in Janet REPL, I should see previous command.

Actual
When clicking Up Arrow in Janet REPL, I see ^[[A symbols.

I've tracked it to -s flag of the REPL started. I don't know if it is there for a specific purpose, but running REPL without it fixes the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.