diff --git a/README.md b/README.md index 2a4394f..5e287f7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Support for Z80 macro-assemblers in Visual Studio Code +# Support for Z80 macro-assemblers in Visual Studio Code The **Z80 Macro-Assembler** extension for Visual Studio Code provides the following features inside VS Code: @@ -10,14 +10,7 @@ The **Z80 Macro-Assembler** extension for Visual Studio Code provides the follow * label and symbol documenter on hover, defintion provider, completition proposer * snippets for macros and source control keywords -### Credits - -This extension was done by **Martin Bórik** as a compilation of derived work inspired by these VS Code extensions: -- [`z80asm-vscode`](https://github.com/Imanolea/z80asm-vscode) by **Imanol Barriuso** -- [`vscode-pasmo`](https://github.com/BouKiCHi/vscode-pasmo) by **BouKiCHi** -- [`rgbds-vscode`](https://github.com/DonaldHays/rgbds-vscode) by **Donald Hays** - -### Problem matchers +## Problem matchers There are some predefined problem matchers to handle reported errors from compilation output: - `errmatcher-as` for **Macroassembler AS** @@ -30,7 +23,33 @@ These values can be used in `.vscode/tasks.json` of your project's build task, f ... ``` -### License +## IntelliSense showcase + +### Definition Provider: +> ![Definition provider](images/z80-macroasm-definition.png) + +> Generated map of every symbol defined considers also modules or temporal labels: +> ![Peek Definition demo](images/z80-macroasm-definition-peek.gif) + +### Completion Proposer +> ![Completion Proposer](images/z80-macroasm-completion.png) + +> Inteligent completion of directives, pseudo-instructions, Z80 instructions, registers, labels or symbols: +> ![Completion and snippets demo](images/z80-macroasm-completion-demo.gif) + +### Hover over symbol: +> Show symbol's value or specific definiton: +> ![Hover over symbol](images/z80-macroasm-hover.gif) + + +## Credits + +This extension was done by **Martin Bórik** as a compilation of derived work inspired by these VS Code extensions: +- [`z80asm-vscode`](https://github.com/Imanolea/z80asm-vscode) by **Imanol Barriuso** +- [`vscode-pasmo`](https://github.com/BouKiCHi/vscode-pasmo) by **BouKiCHi** +- [`rgbds-vscode`](https://github.com/DonaldHays/rgbds-vscode) by **Donald Hays** + +## License The Z80 Assembly extension is subject to [these license terms](LICENSE). diff --git a/images/z80-macroasm-completion-demo.gif b/images/z80-macroasm-completion-demo.gif new file mode 100644 index 0000000..fe24f9b Binary files /dev/null and b/images/z80-macroasm-completion-demo.gif differ diff --git a/images/z80-macroasm-completion.png b/images/z80-macroasm-completion.png new file mode 100644 index 0000000..6969f79 Binary files /dev/null and b/images/z80-macroasm-completion.png differ diff --git a/images/z80-macroasm-definition-peek.gif b/images/z80-macroasm-definition-peek.gif new file mode 100644 index 0000000..e009db0 Binary files /dev/null and b/images/z80-macroasm-definition-peek.gif differ diff --git a/images/z80-macroasm-definition.png b/images/z80-macroasm-definition.png new file mode 100644 index 0000000..688347e Binary files /dev/null and b/images/z80-macroasm-definition.png differ diff --git a/images/z80-macroasm-hover.gif b/images/z80-macroasm-hover.gif new file mode 100644 index 0000000..92fc538 Binary files /dev/null and b/images/z80-macroasm-hover.gif differ diff --git a/syntaxes/z80-macroasm.tmLanguage.json b/syntaxes/z80-macroasm.tmLanguage.json index e5df70e..bfb58a6 100644 --- a/syntaxes/z80-macroasm.tmLanguage.json +++ b/syntaxes/z80-macroasm.tmLanguage.json @@ -40,7 +40,7 @@ "patterns": [ { "name": "keyword.control.z80asm", - "match": "(?i:(?<=\\s)(?:equ|eval|org|end?t|align|phase|dephase|unphase|shift|save(bin|hob|sna|tap|trd)|emptytrd|inc(bin|hob|trd)|b?include|insert|binary|end|output|fpos|page|slot|size|outradix)\\b)" + "match": "(?i:(?<=\\s)(?:equ|eval|org|end?t|align|phase|(de|un)phase|shift|save(bin|hob|sna|tap|trd)|emptytrd|inc(bin|hob|trd)|b?include|insert|binary|end|output|fpos|page|slot|size|outradix)\\b)" }, { "name": "keyword.control.z80asm", @@ -52,7 +52,22 @@ }, { "name": "keyword.control.z80asm", - "match": "(?i:(?<=\\s)(?:if|ifdef|ifndef|ifused|ifnused|else|elseif|endif)\\b)" + "match": "(?i:(?<=\\s)(?:if|ifn?def|ifn?used|else|elseif|endif)\\b)" + }, + { + "name": "string.other.lua.z80asm", + "begin": "(?i:(?<=\\s)(lua)\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.z80asm" + } + }, + "end": "(?i:(?<=\\s)(endlua)\\b)", + "endCaptures": { + "1": { + "name": "keyword.control.z80asm" + } + } } ] },