This extension provides language support for the NajaScript programming language, including syntax highlighting, code completion, and execution in the integrated terminal.
Features
Syntax highlighting for NajaScript (.naja and .ns files)
Code execution via the integrated VS Code terminal
Code autocompletion for language keywords and functions
Module autocompletion for imports
Autocompletes modules in naja_modules directory
Recognizes local modules with exported functions
Provides autocompletion for exported functions, classes, and variables
Execution button in the editor title and context menu
Default keyboard shortcuts for running code (F4)
JSON syntax highlighting for .naja_config files
Module Autocompletion
The extension now provides intelligent autocompletion for modules when writing import statements:
Type import " to get autocompletion for available modules
Modules in the naja_modules directory are suggested automatically
If you create a directory with .ns files containing exports, it will be recognized as a module
After importing a module, you can access its exported functions with autocompletion:
import "mymodule";
mymodule.exportedFunction(); // exportedFunction will be suggested
Special Files
.ns - New, shorter extension for NajaScript files
.naja - Traditional NajaScript files
.naja_config - Configuration files with JSON syntax highlighting
Installation / Instalação
English
Download the latest .vsix package from the GitHub releases
In VS Code, go to the Extensions view (Ctrl+Shift+X)
Click on the "..." menu in the top right corner
Select "Install from VSIX..."
Choose the downloaded .vsix file
Português
Abra o Visual Studio Code
Pressione Ctrl+Shift+X para abrir a aba de extensões
Pesquise por "NajaScript"
Clique em "Instalar"
Ou instale o arquivo VSIX manualmente:
Baixe o arquivo .vsix da extensão
No VS Code, vá em Extensions (Ctrl+Shift+X)
Clique no ícone "..." e selecione "Install from VSIX..."
Selecione o arquivo baixado
Usage / Uso
English
Running NajaScript Code
Open a .naja or .ns file
Press F4 or click the run button in the editor title
The code will execute in the integrated terminal
Portuguese Mode
Use Shift+F4 to run in Portuguese mode
Or select "Executar NajaScript (Português)" from the context menu
Português
Executar código NajaScript
Abra um arquivo .naja ou .ns
Use o botão "Executar NajaScript" na barra de status
Alternativamente, pressione F4 ou use o menu de contexto do editor
Configuration / Configurações
English
The following settings are available:
najascript.useTerminal: Execute NajaScript code in the integrated terminal (default: true)
najascript.enableAutocomplete: Enable code suggestions and autocomplete (default: true)
Português
Para personalizar o comportamento da extensão, acesse as configurações do VS Code (Ctrl+,) e procure por "NajaScript":
NajaScript: Use Terminal - Execute código no terminal integrado (permite interação com input)
NajaScript: Enable Autocomplete - Habilita/desabilita sugestões de código
Development Features / Recursos de Desenvolvimento
Autocompletar
Palavras-chave da linguagem (if, for, while, fun, export, etc.)
Tipos de dados (int, string, bool, etc.)
Funções integradas (println, input, etc.)
Métodos de objetos (.length(), .add(), etc.)
Módulos em contextos de import
Funções exportadas de módulos
Keyboard Shortcuts / Atalhos de Teclado
F4 - Execute current NajaScript file / Executar arquivo NajaScript atual
Shift+F4 - Execute current NajaScript file in Portuguese mode / Executar arquivo com suporte a português
Requirements / Requisitos
Visual Studio Code 1.50.0 or higher / ou superior
NajaScript installed and configured in PATH / instalado e configurado no PATH
Packaging / Empacotamento
To create a VSIX file that can be shared and installed / Para criar um arquivo VSIX que pode ser compartilhado e instalado:
Install vsce / Instale o vsce:
npm install -g @vscode/vsce
In the extension directory, run / No diretório da extensão, execute:
vsce package
A .vsix file will be generated / Um arquivo .vsix será gerado