This is a basic language extension for Poryscript. (https://github.com/huderlem/poryscript)
At this basic stage it supports basic Syntax Highlighting
The extension parses files like event.inc
and movement.inc
to provide completion hints on your LSP client. (Visual Studio Code)
It needs to know where those files are with respect to your root workspace. To do so, it reads the property languageServerPoryscript.commandIncludes
of your settings.json
.
If the field is not set it defaults to the following setting:
{
"languageServerPoryscript.commandIncludes": [
"asm/macros/event.inc",
"asm/macros/movement.inc"
]
}
The extension also parses customizable files to read values usually present when working with poryscript
. A few are included in the default settings, but new ones can be configured or changed at will. Each entry contains a regular expression
, a type which can be special
or define
and a file
path. The first match group of the regular expression will be treated as the name of the defined token. The second group will be treated as a detail in the completion hint window. The default settings are:
"languageServerPoryscript.symbolIncludes": [
{
"expression": "^\\s*def_special\\s+(\\w+)",
"type": "special",
"file": "data/specials.inc"
},
{
"expression": "^\\s*#define\\s+(FLAG_\\w+)\\s+(.+)",
"type": "define",
"file": "include/constants/flags.h"
},
{
"expression": "^\\s*#define\\s+(VAR_\\w+)\\s+(.+)",
"type": "define",
"file": "include/constants/vars.h"
},
{
"expression": "^\\s*#define\\s+(ITEM_\\w+)\\s+(.+)",
"type": "define",
"file": "include/constants/items.h"
},
{
"expression": "^\\s*#define\\s+(SE_\\w+)\\s+(.+)",
"type": "define",
"file": "include/constants/songs.h"
},
{
"expression": "^\\s*#define\\s+(MUS_\\w+)\\s+(.+)",
"type": "define",
"file": "include/constants/songs.h"
},
{
"expression": "^\\s*#define\\s+(MAP_SCRIPT_\\w+)\\s+(.+)",
"type": "define",
"file": "include/constants/map_scripts.h"
}
]
- Visual Studio Code ^1.44.0
- Extension settings are read relatively to your root workpace, therefore this does not work in a multi-workspace environment.
Please view the CHANGELOG for a full list of changes.
- npm audit fix
- update include directives for modern pret-style movement constants
- Added support for assembly-style scripts (Language
poryasm
)
- Fixed broken windows paths for
readfs
client commands - npm audit fix
- Added Completion hints and highlighting for symbols from other script files
- Added Completion hints and highlighting for custom includable files
- Added Definition Lookup Provider
- Added Icon
- Several fixes in highlighting and semantic highlighting
- Semantic highlighting for document local constants
- Experimental Semantic Highlighter
- Minor fixes and improvements
- Add constant parsing
- Minor bugfixes
- Added
poryswitch
as a completion hint - Major bug fixes for most non-unix platforms
- Added language server capabilities
- Added Symbol name declarations to entity.name.function.pory
- Minor Fixes and Improvements.
- Initial release, support basic syntax highlighting