Here the new API docs with all (I hope) function, define, enum, methodmap and fixed xml structure. Docs were generated by reworked generator plugin.
- Generate auto-completion files.
- Generate inline docs (sourcemod.xml).
- Supports SourceMod 1.7 API specifics.
- Added better way to detect commentary.
- Added methods docs.
- Added more console stats.
- Added xml filter.
- Code optimization.
- Detects all function params.
- Detects enum & define correctly.
- Detects methodmap selection.
- Detects typeset.
- Makes keywords to pop up correctly.
sm_makedocs - starts to parse SourceMod includes and generates output files.
SourceMod docs files are located in the plugins\NPP\ subfolder of sourcemod folder.
Notepad++ API files are located in the plugins\APIs\ subfolder of the Notepad++ installation folder.
Notepad++ API v7.6+ files are located in the autoCompletion\ subfolder of the Notepad++ installation folder.
Note: Use sm_makedocs command to generate docs or get them from the latest release).
A preset has all the setting ready to developing your plugin. To load preset go to Notepd++ -> Lanuguage -> Define your language -> Import and select userDefineLang.xml from SourceMod docs or copy userDefineLang.xml to <USER_NAME>\AppData\Roaming\Notepad++\
If you want to configurate user defined languge or update keywords, check plugins\NPP\ folder for NPP_STYLE files. These files contain defining the keyword lists for the SourcePawn language. Open one of those files, select keywords and copy. Go to Notepd++ -> Lanuguage -> Define your language... Select you own language or create new and past keywords to the Keywords Lists group. Do it for other groups too. More information here: UDL 2.0.
Note: It's important to define your language as sourcemod
Copy sourcemod.xml file from SourceMod docs folder to Notepad++ API folder. Done! Due to Notepad++ Issues I highly recommend using 3P plugin for autocompletion feature. Otherwise, you can use default Notepad++ autocompletion feature (don't forget to read about Issues). The completion list can be triggered automatically as you type, via settings in Settings -> Preferences -> Auto-Completion: Auto-Completion is enabled by a checkbox. Additionally there is a setting "From X th character", accepting a the minimum length of a prefix needed before the completion list is shown (some people like 2, some 3, some 4...); and, there is a setting to specify which candidates should be used: words, functions, or both.
Note: Press TAB to fast autocompletion.
Note: To watch docs again place the cursor between( )
characters and press CTRL+SHIFT+SPACE hotkeys
NppExec Script and Console Hightlight
These strings are not actual SourceMod functions. The purpose of these strings is to provide access to documentation showing the methodmap structure. Notepad++ don't reacts on dots in names (exp: fileArray.GetString) and docs not shown, so .
were separated with _
symbol.
Note: If you want to use string as code you must remove prefix and separate
_
with.
Note: If you want to watch docs you must do the vice versa.
MM (Methodmap) type | With tag | Without tag |
---|---|---|
C (Constructor) | MM_%1 _%2 _C_%3 |
MM_%1 _C_%3 |
M (Method) | MM_%1 _%2 _M_%3 |
MM_%1 _M_%3 |
P (Property) | MM_%1 _%2 _P_%3 |
MM_%1 _P_%3 |
Where: %1
- Class name, %2
- Tag name, %3
- Real method/property/constructor name.
Note: Prefix - a string before
%3
param (e.g.,MM_ArrayList_Handle_M_
GetArray).
MM (Methodmap) type | With tag | Without tag |
---|---|---|
C (Constructor) | MM_Menu_Handle_C_Menu | Always has the tag |
M (Method) | MM_Menu_Handle_M_ToPanel | MM_AdminId_M_BindIdentity |
P (Property) | MM_Menu_Handle_P_ItemCount | MM_AdminId_P_ImmunityLevel |
Editing string to watch docs:
Method: ToPanel()
Prefix: MM_Menu_Handle_M_
Result: MM_Menu_Handle_M_ToPanel
Editing string to use as code:
Docs string: MM_AdminId_P_ImmunityLevel
Removes prefix: MM_AdminId_M_
Result: my_code.ImmunityLevel()
The following Issues were reported on notepad-plus-plus repository.
- Code-complete-file defined with
ignoreCase="yes"
input makes autocomplete work incorrectly. - Code-complete-file defined with
ignoreCase="no"
input makes pop up docs work incorrectly for functions with a similar names (e.g., ReplaceStringEx hint docs from ReplaceString).
By deafault code-complete-file defined withignoreCase="yes"
input, because it did less harm. So, keep in mind about issues #1.
Note: For changing
ignoreCase
attribute edit sourcemod.xml file.
- Thanks @MCPAN for original plugin.
My cat wants a new toy! I try to make quality and beautiful toys for my beloved cat. I create toys in my spare time but sometimes I can step into a tangle and get confused! Oops! It takes time to get out! When the toy is ready I give it to the cat, the GitHub cat and the community can also play with it. So if you enjoy my toys and want to thank me for my work, you can send any amount. All money will be spent on milk! Donate 🐾