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

Janet

by archydragon ST3

Janet language support for Sublime Text

Details

Installs

  • Total 194
  • Win 74
  • Mac 72
  • Linux 48
Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21
Windows 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0
Linux 0 0 1 0 1 0 0 0 0 0 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
01234Aug 4Aug 1Jul 29Jul 26Jul 23Jul 20Jul 17Jul 14Jul 11Jul 8Jul 5Jul 2Jun 29Jun 26Jun 23Aug 4 Linux: 0 Mac: 0 Windows: 0Aug 3 Linux: 0 Mac: 0 Windows: 0Aug 2 Linux: 1 Mac: 0 Windows: 0Aug 1 Linux: 0 Mac: 1 Windows: 0Jul 31 Linux: 1 Mac: 0 Windows: 1Jul 30 Linux: 0 Mac: 0 Windows: 1Jul 29 Linux: 0 Mac: 0 Windows: 0Jul 28 Linux: 0 Mac: 0 Windows: 0Jul 27 Linux: 0 Mac: 0 Windows: 0Jul 26 Linux: 0 Mac: 0 Windows: 0Jul 25 Linux: 0 Mac: 0 Windows: 0Jul 24 Linux: 1 Mac: 1 Windows: 0Jul 23 Linux: 0 Mac: 0 Windows: 0Jul 22 Linux: 2 Mac: 0 Windows: 0Jul 21 Linux: 0 Mac: 0 Windows: 0Jul 20 Linux: 0 Mac: 0 Windows: 0Jul 19 Linux: 0 Mac: 0 Windows: 0Jul 18 Linux: 0 Mac: 0 Windows: 0Jul 17 Linux: 0 Mac: 1 Windows: 0Jul 16 Linux: 0 Mac: 0 Windows: 0Jul 15 Linux: 0 Mac: 0 Windows: 0Jul 14 Linux: 0 Mac: 0 Windows: 0Jul 13 Linux: 0 Mac: 0 Windows: 0Jul 12 Linux: 0 Mac: 0 Windows: 0Jul 11 Linux: 0 Mac: 0 Windows: 0Jul 10 Linux: 0 Mac: 0 Windows: 1Jul 9 Linux: 0 Mac: 0 Windows: 0Jul 8 Linux: 0 Mac: 0 Windows: 0Jul 7 Linux: 0 Mac: 0 Windows: 0Jul 6 Linux: 0 Mac: 0 Windows: 0Jul 5 Linux: 0 Mac: 0 Windows: 0Jul 4 Linux: 0 Mac: 0 Windows: 0Jul 3 Linux: 0 Mac: 0 Windows: 0Jul 2 Linux: 0 Mac: 1 Windows: 0Jul 1 Linux: 0 Mac: 0 Windows: 1Jun 30 Linux: 1 Mac: 0 Windows: 0Jun 29 Linux: 0 Mac: 0 Windows: 0Jun 28 Linux: 0 Mac: 0 Windows: 0Jun 27 Linux: 0 Mac: 0 Windows: 0Jun 26 Linux: 0 Mac: 0 Windows: 0Jun 25 Linux: 0 Mac: 0 Windows: 0Jun 24 Linux: 0 Mac: 0 Windows: 0Jun 23 Linux: 0 Mac: 1 Windows: 0Jun 22 Linux: 0 Mac: 0 Windows: 0Jun 21 Linux: 0 Mac: 0 Windows: 0Aug 4 Linux: 0 Mac: 0 Windows: 0Aug 3 Linux: 0 Mac: 0 Windows: 0Aug 2 Linux: 1 Mac: 0 Windows: 0Aug 1 Linux: 0 Mac: 1 Windows: 0Jul 31 Linux: 1 Mac: 0 Windows: 1Jul 30 Linux: 0 Mac: 0 Windows: 1Jul 29 Linux: 0 Mac: 0 Windows: 0Jul 28 Linux: 0 Mac: 0 Windows: 0Jul 27 Linux: 0 Mac: 0 Windows: 0Jul 26 Linux: 0 Mac: 0 Windows: 0Jul 25 Linux: 0 Mac: 0 Windows: 0Jul 24 Linux: 1 Mac: 1 Windows: 0Jul 23 Linux: 0 Mac: 0 Windows: 0Jul 22 Linux: 2 Mac: 0 Windows: 0Jul 21 Linux: 0 Mac: 0 Windows: 0Jul 20 Linux: 0 Mac: 0 Windows: 0Jul 19 Linux: 0 Mac: 0 Windows: 0Jul 18 Linux: 0 Mac: 0 Windows: 0Jul 17 Linux: 0 Mac: 1 Windows: 0Jul 16 Linux: 0 Mac: 0 Windows: 0Jul 15 Linux: 0 Mac: 0 Windows: 0Jul 14 Linux: 0 Mac: 0 Windows: 0Jul 13 Linux: 0 Mac: 0 Windows: 0Jul 12 Linux: 0 Mac: 0 Windows: 0Jul 11 Linux: 0 Mac: 0 Windows: 0Jul 10 Linux: 0 Mac: 0 Windows: 1Jul 9 Linux: 0 Mac: 0 Windows: 0Jul 8 Linux: 0 Mac: 0 Windows: 0Jul 7 Linux: 0 Mac: 0 Windows: 0Jul 6 Linux: 0 Mac: 0 Windows: 0Jul 5 Linux: 0 Mac: 0 Windows: 0Jul 4 Linux: 0 Mac: 0 Windows: 0Jul 3 Linux: 0 Mac: 0 Windows: 0Jul 2 Linux: 0 Mac: 1 Windows: 0Jul 1 Linux: 0 Mac: 0 Windows: 1Jun 30 Linux: 1 Mac: 0 Windows: 0Jun 29 Linux: 0 Mac: 0 Windows: 0Jun 28 Linux: 0 Mac: 0 Windows: 0Jun 27 Linux: 0 Mac: 0 Windows: 0Jun 26 Linux: 0 Mac: 0 Windows: 0Jun 25 Linux: 0 Mac: 0 Windows: 0Jun 24 Linux: 0 Mac: 0 Windows: 0Jun 23 Linux: 0 Mac: 1 Windows: 0Jun 22 Linux: 0 Mac: 0 Windows: 0Jun 21 Linux: 0 Mac: 0 Windows: 0Aug 4 Linux: 0 Mac: 0 Windows: 0Aug 3 Linux: 0 Mac: 0 Windows: 0Aug 2 Linux: 1 Mac: 0 Windows: 0Aug 1 Linux: 0 Mac: 1 Windows: 0Jul 31 Linux: 1 Mac: 0 Windows: 1Jul 30 Linux: 0 Mac: 0 Windows: 1Jul 29 Linux: 0 Mac: 0 Windows: 0Jul 28 Linux: 0 Mac: 0 Windows: 0Jul 27 Linux: 0 Mac: 0 Windows: 0Jul 26 Linux: 0 Mac: 0 Windows: 0Jul 25 Linux: 0 Mac: 0 Windows: 0Jul 24 Linux: 1 Mac: 1 Windows: 0Jul 23 Linux: 0 Mac: 0 Windows: 0Jul 22 Linux: 2 Mac: 0 Windows: 0Jul 21 Linux: 0 Mac: 0 Windows: 0Jul 20 Linux: 0 Mac: 0 Windows: 0Jul 19 Linux: 0 Mac: 0 Windows: 0Jul 18 Linux: 0 Mac: 0 Windows: 0Jul 17 Linux: 0 Mac: 1 Windows: 0Jul 16 Linux: 0 Mac: 0 Windows: 0Jul 15 Linux: 0 Mac: 0 Windows: 0Jul 14 Linux: 0 Mac: 0 Windows: 0Jul 13 Linux: 0 Mac: 0 Windows: 0Jul 12 Linux: 0 Mac: 0 Windows: 0Jul 11 Linux: 0 Mac: 0 Windows: 0Jul 10 Linux: 0 Mac: 0 Windows: 1Jul 9 Linux: 0 Mac: 0 Windows: 0Jul 8 Linux: 0 Mac: 0 Windows: 0Jul 7 Linux: 0 Mac: 0 Windows: 0Jul 6 Linux: 0 Mac: 0 Windows: 0Jul 5 Linux: 0 Mac: 0 Windows: 0Jul 4 Linux: 0 Mac: 0 Windows: 0Jul 3 Linux: 0 Mac: 0 Windows: 0Jul 2 Linux: 0 Mac: 1 Windows: 0Jul 1 Linux: 0 Mac: 0 Windows: 1Jun 30 Linux: 1 Mac: 0 Windows: 0Jun 29 Linux: 0 Mac: 0 Windows: 0Jun 28 Linux: 0 Mac: 0 Windows: 0Jun 27 Linux: 0 Mac: 0 Windows: 0Jun 26 Linux: 0 Mac: 0 Windows: 0Jun 25 Linux: 0 Mac: 0 Windows: 0Jun 24 Linux: 0 Mac: 0 Windows: 0Jun 23 Linux: 0 Mac: 1 Windows: 0Jun 22 Linux: 0 Mac: 0 Windows: 0Jun 21 Linux: 0 Mac: 0 Windows: 0

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

Supported Janet version: 1.28

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.

jpm

jpm is used as default build system, if project.janet file is present in the root directory.

Windows build note: you need to set vcvars_bat_path variable in your Sublime Text settings to match MSVC batch file used for initialization of build environment (e.g. "C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Auxiliary\\Build\\vcvars64.bat"). See MS documentation about command line toolset for extra details.

There are also shortcuts for jpm clean and jpm test available in command palette.

Single script evaluation

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