ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Janet

by archydragon ST3

Janet language support for Sublime Text

Details

Installs

  • Total 27
  • Win 10
  • Mac 11
  • Linux 6
Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21
Windows 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
Mac 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0
Linux 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

Janet language support for Sublime Text

This package provides Janet languge support and includes so far:

  • syntax highlighting
  • go to symbol navigation
  • running Janet code right from the editor
  • SublimeREPL integration

Tested against Janet v1.26.

Screenshots

dark

light with rainbow brackets

Installation

Using Package Control

  1. Install Package Control.
  2. ctrl + shift + p (Win/Linux) / cmd + shift + p (Mac) → Package Control: Install PackageJanet

Manual

  1. Go to Sublime Text user packages directory:
    • Windows: %AppData%\Roaming\Sublime Text\Packages\User
    • macOS: ~/Library/Application Support/Sublime Text/Packages/User
    • Linux: ~/.config/sublime-text/Packages/User
  2. Clone this repository: git clone https://github.com/archydragon/sublime-janet

Feature details

Syntax highlighting

There is a known bug that it isn't very consistent when it comes to highlighting top level def calls. Other than that, should be fine.

Build system

For this and REPL, you need to have Janet binary under one of directories listed in PATH environment variable.

Strictly talking, it isn't a build system, just an evaluation of current file using available Janet interpreter. Partial evaluation of expressions isn't supported yet.

Integration with SublimeREPL

SublimeREPL upstream seems to be not really maintained for some years, but still works. Out of the box, if you have it installed, after adding Janet package to Sublime Text, its REPL should be available under ToolsSublimeREPLJanet. However, if you want it to be available through the command palette, you should do the following:

  1. Go to SublimeREPL installation directory (under user packages).
  2. Create a directory there config/Janet.
  3. Copy file SublimeREPL/Main.sublime-menu from this repo to config/Janet.
  4. Create a file config/Janet/Default.sublime-commands with the following content:
[
    {
        "caption": "SublimeREPL: Janet",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_janet",
            "file": "config/Janet/Main.sublime-menu"
        }
    }
]

Ctrl+, shortcuts still don't work, and I ain't sure if I did something wrong or just the age of SublimeREPL projects reveals itself.

License

MIT