Enhance open.mp support: autocomplete, hover docs, syntax highlighting, snippets, and compiler integration - #20
Open
stefanutc1 wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces several quality-of-life and IntelliSense improvements for open.mp and modern Pawn development:
Summary of Changes
Autocomplete & Hover Documentation:
doHoveranddoSignHelpto show rich Markdown tooltips and active parameter hints.Float:,bool:,PlayerText:, etc.) and command definitions (CMD:,YCMD:) without losing definition references.#defineparsing.Syntax Highlighting & Tokenization:
Pawn.tmLanguageto properly recognize#elif, diagnostic directives (#error,#warning), and extended#pragmaflags (warning,option,compatibility,disablestate,naked,reparse).bool,Float,File,Text,Text3D,PlayerText,PlayerText3D,Menu,DB,DBResult,Bit,Iterator,Task,Timer,Group,BitArray,ConstString,struct,decl).CMD:,COMMAND:,YCMD:,flags:), operators (sizeof,tagof,defined), control keywords (foreach,yield), and language constants.Code Snippets:
snippets/pawn.jsoncatalog registered inpackage.jsonwith snippets for:OnPlayerConnect,OnPlayerDisconnect,OnPlayerSpawn,OnPlayerDeath,OnDialogResponse,OnPlayerWeaponShot, etc.).CMD:,YCMD:, admin commands with permission checks).GetPlayerPoolSize(),GetVehiclePoolSize(), andGetActorPoolSize(), as well asforeachiterators.Compiler Integration & Problem Matcher:
tasks.jsontemplate insrc/client/task.ts.$pawnccproblem matcher inpackage.jsonwith a more flexible regular expression that accurately parses standard compiler output, column numbers, warning/error codes, and line ranges.fileLocationto"autoDetect"so compiler diagnostics map to the exact file and line directly in the VS Code Problems panel.