HindiLang for Visual Studio Code
Write code in Hinglish - Hindi words in English letters - with full editor support.
This extension adds first-class support for HindiLang (.hindi files): syntax highlighting, IntelliSense, snippets and a one-click Run button.
karya jodo(a, b) {
vapas a + b;
}
maano naam = "Duniya";
likho "Namaste,", naam;
likho "2 + 3 =", jodo(2, 3);
gino i 1 se 3 tak {
likho "Ginti", i;
}
Features
- Syntax highlighting for keywords, strings (with escapes), numbers, comments, function names, and all 109 built-in functions - GUI functions (
khidki, batan, canvas, ...) get their own colour.
- IntelliSense: completions for keywords, built-ins (with signatures and Hinglish help) and your own
karya / maano names.
- Hover help on keywords and built-in functions.
- Run button (top-right of the editor),
Ctrl+Alt+R (Cmd+Alt+R on macOS), or HindiLang: Run File from the Command Palette.
- REPL: HindiLang: Open REPL from the Command Palette.
- Snippets - type the prefix and press
Tab.
- Auto-closing brackets and quotes, comment toggling (
Ctrl+/), smart indentation.
- Optional HindiLang Dark colour theme (
Ctrl+K Ctrl+T).
- File icon for
.hindi files.
Requirements
You need the HindiLang interpreter (hindi.exe on Windows, hindi on Linux/macOS) to run programs.
Highlighting, completions and snippets work without it.
If the interpreter's folder is on your PATH, nothing else is needed. Otherwise set HindiLang: Executable Path in Settings (for example C:\hindilang\hindi.exe).
Snippets
| Prefix |
Inserts |
karya |
function |
agar, agarw, agarwa |
if, if-else, if / else-if / else |
jabtak |
while loop |
gino |
counting loop: gino i 1 se 10 tak |
harek |
for-each loop |
koshish |
try / catch (koshish / pakdo) |
maano, likho, padho |
variable, print, keyboard input |
kosh, suchi |
dictionary, list |
gui, batan, likhavat, canvasp, ghadi, menu, kunji |
GUI program skeleton and widgets |
Extension settings
| Setting |
Default |
Description |
hindilang.executablePath |
hindi |
Path to the interpreter. Machine-scoped for security. |
hindilang.saveBeforeRun |
true |
Save the file before running it. |
Security
Running a program executes code on your machine, so Run is disabled in untrusted workspaces (VS Code Workspace Trust). The interpreter path can only be set in your own user/machine settings.
Known issues
- GUI built-ins (windows, buttons, canvas) run only on Windows, because the interpreter's GUI is Windows-only.
- IntelliSense scans the current file only.
Release notes
See the Changelog tab on this page.
License
MIT - see the License section on this page.
| |