-
Notifications
You must be signed in to change notification settings - Fork 3
Features
This document describes the features supported by this extension.
- Highlighting
- Formatting
- IntelliSense
- Transpile
- Clean
- Gno:Test
- Mod Init
- Maketx
- Find References
- Find Implementations
- Go To Symbol
- Call Hierarchy
- Toggle Between Code and Tests
- Add Import
- Rename Symbol
- Refactor
- Auto Install Missing Tools
- Lint
The default syntax highlighting for gno files is implemented in Visual Studio Code using TextMate grammar, not by this extension.
Format code and organize imports, either manually or on save.
The extension formats gno
code, organizes imports, and removes unused imports by default. For different behavior.
-
Organizing imports
When organizing imports, the imported packages are grouped in the default
gnoimports
style.
- Code completion: Suggestions appear as you type.
- Signature help: Displays function parameters as you type.
- Quick info: Shows documentation when hovering over symbols.
Supports compiling or transpiling Gno code into executable formats, enabling easier deployment or testing.
Removes unnecessary or temporary files generated during development. This helps to maintain a tidy workspace.
Runs all unit tests in a specified Gno package to verify the functionality of the entire module.
Executes all tests within a specific gno
test
Test a specific function
Executes the test case where the cursor is currently placed in the code editor.
Publish Gno package/realm to the chain. gnokey
needs to be installed for this feature to work.
Create gno.mod
file
Find or go to the references of a symbol.
Find the concrete types that implement a given interface.
Jump to or peek a symbol's declaration.
Show all calls from or to a function.
Quickly toggle between a file and its corresponding test file by using the Gno: Toggle Test File
command.
The extension organizes imports automatically and can add missing imports if the package is present in your module cache already.
Rename all occurrences of a symbol in your workspace.
Note: For undo after rename to work on Windows, you need to have diff
tool on your PATH
.
This feature is not available if you are using without gnopls
, the Go language server.
Select the area for refactoring (e.g. variable, function body, etc). Click on the Code Action light bulb icon that appears in the selected area, or select "Refactoring..." or "Rename Symbol" from the VS Code Context menu.