{"id":26924969,"url":"https://github.com/shivamkumar2002/go-extras","last_synced_at":"2026-05-11T05:44:56.637Z","repository":{"id":285440352,"uuid":"958151123","full_name":"ShivamKumar2002/go-extras","owner":"ShivamKumar2002","description":"Advanced Go development features that extend beyond the official VS Code Go extension.","archived":false,"fork":false,"pushed_at":"2025-03-31T19:25:23.000Z","size":165,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T19:28:33.791Z","etag":null,"topics":["go","golang","vscode-extension","vscode-plugin"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=shivamkumar.go-extras","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShivamKumar2002.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-31T18:16:27.000Z","updated_at":"2025-03-31T19:25:14.000Z","dependencies_parsed_at":"2025-03-31T19:28:43.727Z","dependency_job_id":"6aa13b36-b4a7-409b-875f-69b663849be7","html_url":"https://github.com/ShivamKumar2002/go-extras","commit_stats":null,"previous_names":["shivamkumar2002/go-extras"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivamKumar2002%2Fgo-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivamKumar2002%2Fgo-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivamKumar2002%2Fgo-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivamKumar2002%2Fgo-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShivamKumar2002","download_url":"https://codeload.github.com/ShivamKumar2002/go-extras/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741280,"owners_count":20826096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","vscode-extension","vscode-plugin"],"created_at":"2025-04-02T02:20:14.805Z","updated_at":"2026-05-11T05:44:56.602Z","avatar_url":"https://github.com/ShivamKumar2002.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GO Extras\n\n[![Version](https://img.shields.io/visual-studio-marketplace/v/shivamkumar.go-extras)](https://marketplace.visualstudio.com/items?itemName=shivamkumar.go-extras)\n[![Installs](https://img.shields.io/visual-studio-marketplace/i/shivamkumar.go-extras)](https://marketplace.visualstudio.com/items?itemName=shivamkumar.go-extras)\n[![Rating](https://img.shields.io/visual-studio-marketplace/r/shivamkumar.go-extras)](https://marketplace.visualstudio.com/items?itemName=shivamkumar.go-extras)\n\nA Visual Studio Code extension that provides advanced Go development features that extend beyond the official VS Code Go extension.\n\n\n## Overview\n\nGo Extras enhances the Go development experience in VS Code by adding powerful features not found in the standard toolset. This extension will grow over time to include various capabilities that make Go development more productive and insightful. The initial release focuses on improving symbol reference analysis with intelligent filtering options.\n\n## Installation\n\nYou can install Go Extras directly from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=shivamkumar.go-extras):\n\n* Open VS Code\n* Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)\n* Search for \"Go Extras\"\n* Click Install\n\nAlternatively, you can install the extension using the VS Code Quick Open (Ctrl+P / Cmd+P):\n```\next install shivamkumar.go-extras\n```\n\n### Capabilities\n\n*   **Dedicated Panel View:** Displays references in a structured tree view within the VS Code panel (`Go Extras: Filtered References`).\n*   **Reference Classification:** Leverages the Go Language Server (`gopls` via the `golang.go` extension) to classify references as:\n    *   **Read:** Symbol is being read (e.g., used in an expression).\n    *   **Write:** Symbol is being written to (e.g., assignment, declaration).\n    *   **Text:** Symbol appears in comments or strings (classification may vary based on `gopls` behavior).\n*   **Interactive Filtering:**\n    *   **Checkboxes:** Quickly toggle Read/Write/Text classifications to filter the displayed references.\n    *   **Tree View Selection:** Click on files or directories within the tree to narrow down the references shown in the Peek View.\n*   **Path Compression:** Directory paths in the tree view are compressed (e.g., `src/app/components/` instead of nested nodes) for better readability.\n*   **Peek View Integration:** Filter selections instantly update VS Code's native Peek References view (`editor.action.showReferences`).\n*   **Direct Navigation:** Clicking on a specific reference line (e.g., `Line 10:5`) in the tree view navigates directly to that location in the editor.\n\n\n### Activation\n\nYou can activate the Filtered References feature in several ways when your cursor is on a Go symbol:\n\n1.  **Command Palette:** Open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`) and search for `Go Extras: Filtered References`.\n2.  **Context Menu:** Right-click on the symbol in a Go file and select `Go Extras: Filtered References`.\n3.  **Keyboard Shortcut:** Press `Alt+Shift+R` (configurable in VS Code keyboard shortcuts).\n\n\n## How it Works (Filtered References)\n\n1.  Place your cursor on a Go symbol (variable, function, type, etc.) in your code.\n2.  Activate the feature using one of the methods listed above.\n3.  The **Go Extras: Filtered References** panel will open (usually in the bottom panel area).\n4.  The panel displays:\n    *   Checkboxes for `Read`, `Write`, and `Text` filters (initially all checked).\n    *   A tree view grouping references by file and directory.\n5.  Simultaneously, VS Code's Peek View will appear, showing all found references.\n6.  **Filtering:**\n    *   Uncheck/check the `Read`, `Write`, `Text` boxes in the panel to instantly filter the locations shown in the **Peek View**. The tree view itself *currently* shows all references but may be updated in the future.\n    *   Clicking a **file** or **directory** in the panel's tree view will filter the **Peek View** to show only references within that selection.\n    *   Clicking a specific **reference line** (e.g., `Line 15:3`) in the tree view will close the Peek View and navigate directly to that line in the editor.\n\n\n## Screenshots\n\n\u003c!-- ![Filtered References Panel](images/filtered-references.png)\n\n*The Filtered References panel showing classified references with filter controls.* --\u003e\n\n\n## Requirements\n\n* Visual Studio Code.\n* **Go Extension:** The official `golang.go` extension must be installed and enabled, as Go Extras relies on it for finding and classifying references via the Go Language Server (`gopls`).\n* **Semantic Highlighting:** This extension requires semantic highlighting to be enabled in gopls. To enable it:\n  1. Open VS Code Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)\n  2. Search for **\"Preferences: Open User Settings (JSON)\"** and select it.\n  3. Add the following configuration to your `settings.json` file:\n     ```json\n     \"gopls\": {\n       \"ui.semanticTokens\": true\n     }\n     ```\n  4. Save the file and restart VS Code for changes to take effect.\n\n## Development and Build Process\n\n### Prerequisites\n\n*   Node.js (LTS version recommended)\n*   npm (comes with Node.js)\n*   Visual Studio Code for testing\n\n### Setup\n\n1.  Clone the repository:\n\n```bash\ngit clone https://github.com/ShivamKumar2002/go-extras.git\ncd go-extras\n```\n\n2.  Install dependencies:\n\n```bash\nnpm install\n```\n\n### Build Commands\n\n*   **Compile (Development):**\n\n```bash\nnpm run compile\n```\n\nThis runs type checking, linting, and builds the extension using esbuild.\n\n*   **Watch Mode:**\n\n```bash\nnpm run watch\n```\n\nThis starts a development mode that automatically rebuilds when files change. It runs both esbuild and TypeScript type checking in watch mode.\n\n*   **Package for Production:**\n\n```bash\nnpm run package\n```\n\nThis creates a production build of the extension, optimized and ready for distribution.\n\n*   **Type Checking:**\n\n```bash\nnpm run check-types\n```\n\nRuns the TypeScript compiler to check for type errors without emitting files.\n\n*   **Linting:**\n\n```bash\nnpm run lint\n```\n\nRuns ESLint to check for code style issues and potential bugs.\n\n### Testing\n\n*   **Run Tests:**\n\n```bash\nnpm test\n```\n\nThis runs the test suite using VS Code's testing infrastructure.\n\n*   **Compile Tests Only:**\n\n```bash\nnpm run compile-tests\n```\n\n### Debugging in VS Code\n\n1.  Open the repository in VS Code\n2.  Press F5 to start debugging\n3.  This will launch a new VS Code Extension Development Host window where you can test the extension\n\n### Publishing\n\nThe extension is published to the VS Code Marketplace using:\n\n```bash\nvsce package\nvsce publish\n```\n\nNote: You'll need to have `@vscode/vsce` installed globally and be logged in with appropriate publisher rights.\n\n\n## Extension Settings\n\nThis extension does not currently contribute any specific settings.\n\n\n## Known Issues\n\n* Reference classification accuracy depends entirely on the underlying `gopls` results provided by the `golang.go` extension.\n\nPlease report any bugs or unexpected behavior by opening an issue on the project's GitHub repository.\n\n\n## Release Notes\n\nSee the [CHANGELOG.md](CHANGELOG.md) file for details on changes in each version.\n\n\n## Contributing\n\nContributions are welcome and appreciated! Here's how you can contribute:\n\n1. **Report Issues**: Found a bug or have a feature request? Open an [issue](https://github.com/ShivamKumar2002/go-extras/issues).\n2. **Submit Pull Requests**: Have a fix or new feature to contribute? Submit a [pull request](https://github.com/ShivamKumar2002/go-extras/pulls).\n3. **Improve Documentation**: Help improve documentation by fixing errors or adding examples.\n\nPlease ensure your code follows the project's coding standards and includes appropriate tests.\n\n\n## Project Structure Notes\n\n### Generated Directories\n\n* **memory-bank/**: This directory is automatically generated and managed by the Roo Code/Cline.\n\n\n## License\n\nThis extension is licensed under the [MIT License](LICENSE).\n\nCopyright (c) 2025 Shivam Kumar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivamkumar2002%2Fgo-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivamkumar2002%2Fgo-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivamkumar2002%2Fgo-extras/lists"}