Skip to content

Show enclosing statement when clicking closing brace '}' (like Arduino IDE 1.x) #2867

@Mileticiv

Description

@Mileticiv

Describe the request

In Arduino IDE 1.x, when the cursor is placed at a closing brace }, the opening statement is shown in a tooltip on the tab bar:

Image

This allows the user to quickly get an understanding of context of code they are viewing and facilitates navigation through the code in large sketch projects.

Please add this feature to Arduino IDE 2.x.

Describe the current behavior

In Arduino IDE 2.x, only block highlighting is available, which makes navigation in large sketches difficult.

Arduino IDE version

2.3.7

Operating system

Windows

Operating system version

  • 10
  • 11

Additional context

A somewhat similar feature is present in the framework upon which Arduino IDE is built:

https://code.visualstudio.com/docs/editing/editingevolved#_breadcrumbs

That "breadcrumbs" feature is intentionally disabled in Arduino IDE. This makes sense as a default in order to provide a carefully curated UI that will be approachable to beginners. However, it also makes sense to allow advanced users to enable additional UI components according to their preferences. This should be supported via the breadcrumbs.enabled advanced setting. However, that setting currently has no effect due to the breadcrumbs feature having been disabled in the source code instead of only through configuring a default for that setting. The task of restoring support for breadcrumbs.enabled is tracked in #1733. That could serve as a partial resolution for this request. It is not functionally equivalent to the Arduino IDE 1.x feature due to only providing function level granularity, while the Arduino IDE 1.x feature provides information about blocks nested within a function.


Keywords

  • "breadcrumb"

  • "bread crumb"

  • "function signature"

  • "signature"

  • "tool tip"

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions