Skip to content

[Feature] Implement inline diagnostics for eco-efficiency suggestions #6

Description

@LeonardLeroy

Summary

Transition from a dashboard-only view to an "inline" experience where the extension highlights inefficient code patterns directly in the code editor.

Problem

Currently, users have to leave their code and open the dashboard to see results. This breaks the developer's flow and makes it harder to identify exactly which line of code needs optimization.

Proposed solution

Use VS Code's Diagnostic API to underline specific code blocks (like deep nested loops or heavy libraries imports). When a user hovers over the underlined code, a tooltip should explain the carbon impact and suggest an alternative.

Acceptance criteria

  • Research and implement vscode.languages.createDiagnosticCollection.
  • Underline code patterns identified as "energy-intensive".
  • Display a hover message explaining the "why" and "how to fix".

Additional context

Similar to how ESLint works. We want to guide the developer while they are typing.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions