GitHub repository: Porth language extension for VSCode
This is a Visual Studio Code extension created by Tim Holzhey to add Porth language support.
Porth is an imperative, stack-based programming language. Porth is open-source and is currently being developed by Alexey Kutepov aka Tsoding.
Features:
- Syntax highlighting
- Code snippets
- Bootstrap, compile and run commands
- Integrated Porth compiler (submodule)
- Jump to definition (
CTRL+LEFTCLICK
)
- Open a
.porth
file - Open the Command Pallet (
CTRL+SHIFT+P
for Windows/Linux orCMD+SHIFT+P
on Mac) and enter one of the supported commands:- Porth: Bootstrap compiler (required once before compiling)
- Porth: Compile program
- Porth: Run program
- Porth: Open examples folder
Make sure you have all required commands (python3, nasm, ld) added to $PATH
.
porth.path
: Path to the porth compiler (default:_builtin_
)porth.debug
: Compiler debug flag (default: off)porth.auto-run
: Auto run the program after compiling (default: on)fasm.path
: Path to the fasm compiler (default:_builtin_
)
Future features:
- Test programs
- Syntax error diagnostics
- Autocomplete suggestions
- Parse definitions from all included files
- Install flat assembler (FASM) for Linux with
sudo apt-get install fasm
- Windows Subsystem for Linux (WSL), install with:
wsl --install
- Download flat assembler (FASM) for Linux
- Unzip and move the fasm folder to a reasonable location
- Remove file
fasm
and renamefasm.x64
tofasm
- Add FASM to
$PATH
and restart
- Docker is required to compile for macOS, fasm is bundled