SourcePawn for VSCode
An extension that enables helpful features for the SourcePawn programming language in Visual Studio Code
Features
Syntax highlighting for .sp and .inc files
Highlight different elements of the SourcePawn syntax.
Syntax highlighting for .cfg and .txt files
Highlight different elements of the .cfg and .txt file format (for translations files for instance).
Code auto-completion
Provide suggestions of code completion based on included files and previously declared functions, variables, enums, etc.
Events auto-completion
Provide suggestions of events name when calling HookEvent and HookEventEx.
Include's path auto-completion
Provide suggestions of includes path when adding the #include statement.
Signature help
Provide signature help when calling functions and entering their parameters.
Hover help
Provide JSDoc like informations when hovering a function, enum, etc.
Go to definition
Go to the definition of the function, enum, etc, when doing ctrl+click on them. This now supports scopped variables within a function.
Linter
Provide live debugging informations while coding, based on the compiler's errors. Tips on how to solve the errors are also provided accordingly.
[/u]
Additional features- Compile from VSCode with a simple button.
- Automatically install Sourcemod includes and compiler
- Custom icons for .sp, .inc and .smx files.
- Useful snippets.
- Automatically generate JSDoc like comments by typing /* above a function.
- Generate a new project automatically.
- Upload to an FTP/SFTP server on successful compile.
- Automatically run sm plugins refresh on a successful upload.
To do- Incrementally Format Code as the User Types
- Automatic callback generation.
- Automatic convert to new syntax (partially).
Credits- Dreae's extension which is not supported anymore, and on which this extension is based on.
- Deathreus' extension which helped me to implement the linting feature.
MarketPlace Download
| Source | Beta builds
__________________