Janet
Janet language support for Sublime Text
Details
Installs
- Total 146
- Win 52
- Mac 56
- Linux 38
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Mac | 1 | 0 | 0 | 1 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
Linux | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 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
Installation
Using Package Control
- Install Package Control.
ctrl + shift + p
(Win/Linux) /cmd + shift + p
(Mac) →Package Control: Install Package
→Janet
Manual
- 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
- Windows:
- 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 Tools
→ SublimeREPL
→ Janet
. However, if you want it to be available through the command palette, you should do the following:
- Go to SublimeREPL installation directory (under user packages).
- Create a directory there
config/Janet
. - Copy file
SublimeREPL/Main.sublime-menu
from this repo toconfig/Janet
. - 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.