Skip to content

fix(cargo-hover): show feature dependency metadata in hover - #1932

Merged
ya7010 merged 3 commits into
mainfrom
ya7010/hover-feature-deps-first
Jun 7, 2026
Merged

fix(cargo-hover): show feature dependency metadata in hover#1932
ya7010 merged 3 commits into
mainfrom
ya7010/hover-feature-deps-first

Conversation

@ya7010

@ya7010 ya7010 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • show feature dependency metadata when hovering dependency feature items in Cargo manifests
  • keep default feature lists in the tooltip and render both sections with code formatting
  • update hover tests to cover feature dependencies before default features

Validation

  • cargo fmt --all --check
  • cargo test -p tombi-extension-cargo
  • cargo test -p tombi-lsp --test test_hover
  • cargo clippy --workspace --all-targets --locked -- -D warnings

Copilot AI review requested due to automatic review settings June 7, 2026 05:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Cargo hover behavior in the tombi-extension-cargo extension to display feature dependency metadata when hovering dependency feature items, while preserving the default feature list tooltip (now rendered with inline code formatting) and updating hover tests accordingly.

Changes:

  • Add dependency feature metadata extraction (feature dependency map + default features) for path and crates.io dependencies and render combined hover tooltips.
  • Render both “Feature Dependencies” and “Default Features” sections with code formatting and deterministic ordering for default features.
  • Update LSP hover tests to validate feature-dependency section precedence and new formatting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
extensions/tombi-extension-cargo/src/hover.rs Adds feature-dependency metadata retrieval and tooltip formatting for dependency feature hovers.
crates/tombi-lsp/tests/test_hover.rs Updates hover expectations to include feature-dependency metadata and backtick formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread extensions/tombi-extension-cargo/src/hover.rs
Comment thread extensions/tombi-extension-cargo/src/hover.rs
@ya7010
ya7010 merged commit f96a449 into main Jun 7, 2026
21 checks passed
@ya7010
ya7010 deleted the ya7010/hover-feature-deps-first branch June 7, 2026 07:22
@ya7010 ya7010 added the enhancement New feature or request label Jun 7, 2026
jylenhof pushed a commit to jylenhof/gh-action-pulse that referenced this pull request Jul 16, 2026
Automated mise tool upgrades from local config.

Updated tools:
- `tombi`

Command: `mise upgrade --bump --local tombi`

<details>
<summary>Version changelog (tombi)</summary>

| Tool | Requested | Installed |
|------|-----------|-----------|
| `tombi` | `1.0.0` → `1.2.0` | `1.0.0` → `1.2.0` |

</details>

<details>
<summary>Release notes (1 tools)</summary>

<details>
<summary>tombi: `1.0.0` → `1.2.0` (tombi-toml/tombi)</summary>

### v1.1.0

<!-- Release notes generated using configuration in .github/release.yml at v1.1.0 -->

## What's Changed

Starting with this version, we will synchronize [setup-tombi](https://github.com/tombi-toml/setup-tombi) with version control.

### 🛠️ Other Changes
* test: consolidate tombi-lsp ad hoc cases by @ya7010 in tombi-toml/tombi#1914
* ci: sync setup-tombi release automation by @ya7010 in tombi-toml/tombi#1915

**Full Changelog**: tombi-toml/tombi@v1.0.0...v1.1.0

### v1.1.1

<!-- Release notes generated using configuration in .github/release.yml at v1.1.1 -->

## What's Changed
### 🐛 Bug Fixes
* Align multiline delimiter comments with trailing comment width by @ya7010 in tombi-toml/tombi#1924
### 👒 Dependencies
* fix: address Dependabot security alerts by @ya7010 in tombi-toml/tombi#1919
* fix: remove unused surf fallback from schema store by @ya7010 in tombi-toml/tombi#1920
### 🛠️ Other Changes
* fix: statically link Windows MSVC CRT by @ya7010 in tombi-toml/tombi#1917
* fix: resolve Dependabot security alerts by @ya7010 in tombi-toml/tombi#1918

**Full Changelog**: tombi-toml/tombi@v1.1.0...v1.1.1

### v1.1.2

<!-- Release notes generated using configuration in .github/release.yml at v1.1.2 -->

## What's Changed
### 🚀 New Features
* feat(installer): add archive checksum verification by @ya7010 in tombi-toml/tombi#1931
* fix(cargo-hover): show feature dependency metadata in hover by @ya7010 in tombi-toml/tombi#1932
### 👒 Dependencies
* build(deps): bump tar from 0.4.45 to 0.4.46 in the cargo group across 1 directory by @dependabot[bot] in tombi-toml/tombi#1928
### 🛠️ Other Changes
* ci: follow setup-tombi consolidated release workflow by @ya7010 in tombi-toml/tombi#1925
* docs(schema): describe partially dynamic pyproject metadata by @ya7010 in tombi-toml/tombi#1929

**Full Changelog**: tombi-toml/tombi@v1.1.1...v1.1.2

### v1.1.3

<!-- Release notes generated using configuration in .github/release.yml at v1.1.3 -->

## What's Changed
### 🚀 New Features
* fix(pyproject): keep declarations out of references by @ya7010 in tombi-toml/tombi#1937
### 🛠️ Other Changes
* docs(install): remove sha256 prefix from checksum example by @ya7010 in tombi-toml/tombi#1933
* fix(ci): quote install workflow step name by @ya7010 in tombi-toml/tombi#1934
* ci: pin GitHub Actions and tighten defaults by @ya7010 in tombi-toml/tombi#1935
* ci: pin npm release tooling versions by @ya7010 in tombi-toml/tombi#1936
* ci: use trusted publishing for PyPI release by @ya7010 in tombi-toml/tombi#1938
* fix(ci): pass snapcraft matrix platform to build by @ya7010 in tombi-toml/tombi#1939
* fix(ci): allow snapcraft cross-build platforms on amd64 by @ya7010 in tombi-toml/tombi#1940

**Full Changelog**: tombi-toml/tombi@v1.1.2...v1.1.3

### v1.1.4

<!-- Release notes generated using configuration in .github/release.yml at v1.1.4 -->

## What's Changed
### 🐛 Bug Fixes
* fix(lsp): avoid stale diagnostics after changes by @ya7010 in tombi-toml/tombi#1954
### 👒 Dependencies
* build(deps-dev): bump esbuild from 0.28.0 to 0.28.1 in the npm_and_yarn group across 1 directory by @dependabot[bot] in tombi-toml/tombi#1945
* build(deps-dev): bump the npm_and_yarn group across 2 directories with 1 update by @dependabot[bot] in tombi-toml/tombi#1952
### 🛠️ Other Changes
* fix(ci): include LICENSE in python sdist by @ya7010 in tombi-toml/tombi#1942
* docs: explain selective auto-sort re-enable by @ya7010 in tombi-toml/tombi#1943
* Use GitHub App token for dependent release dispatches by @ya7010 in tombi-toml/tombi#1951

**Full Changelog**: tombi-toml/tombi@v1.1.3...v1.1.4

### v1.1.5

<!-- Release notes generated using configuration in .github/release.yml at v1.1.5 -->

## What's Changed
### 🐛 Bug Fixes
* fix(lsp): merge allOf table key completions by @ya7010 in tombi-toml/tombi#1959
* fix(vscode): color TOML dates as constants by @ya7010 in tombi-toml/tombi#1960
### 🛠️ Other Changes
* fix(lsp): complete literal keys in tables by @ya7010 in tombi-toml/tombi#1958

**Full Changelog**: tombi-toml/tombi@v1.1.4...v1.1.5

### v1.1.6

<!-- Release notes generated using configuration in .github/release.yml at v1.1.6 -->

## What's Changed
### 🚀 New Features
* feat: include target in CLI version output by @ya7010 in tombi-toml/tombi#1974
### 🐛 Bug Fixes
* fix: remove npm install script from tombi package by @ya7010 in tombi-toml/tombi#1969
### 🛠️ Other Changes
* Fix Windows release CRT linkage by @ya7010 in tombi-toml/tombi#1961
* ci: use shared release environment by @ya7010 in tombi-toml/tombi#1962
* Deprecate legacy document-link feature toggles by @ya7010 in tombi-toml/tombi#1965
* docs: add v2 release todo by @ya7010 in tombi-toml/tombi#1966
* chore: bump biome $schema to match pinned CLI 2.3.8 by @EduardF1 in tombi-toml/tombi#1967
* Align release build settings by @ya7010 in tombi-toml/tombi#1972
* fix: update vulnerable npm dependencies by @ya7010 in tombi-toml/tombi#1973

## New Contributors
* @EduardF1 made their first contribution in tombi-toml/tombi#1967

**Full Changelog**: tombi-toml/tombi@v1.1.5...v1.1.6

### v1.1.7

<!-- Release notes generated using configuration in .github/release.yml at v1.1.7 -->

## What's Changed
### 🦅 New Features
* Apply quote style to string keys by @ya7010 in tombi-toml/tombi#1980
* Support JSON schema `deprecationMessage` by @ya7010 in tombi-toml/tombi#1986
### 🐝 Bug Fixes
* Fix nested anyOf hover enum selection by @ya7010 in tombi-toml/tombi#1979
### 🛠️ Other Changes
* Update issue template emoji by @ya7010 in tombi-toml/tombi#1975
* Fix anyOf hover enum leakage by @ya7010 in tombi-toml/tombi#1976
* ci: validate winget manifest before submission by @ya7010 in tombi-toml/tombi#1977
* Improve formatting edit debug log by @ya7010 in tombi-toml/tombi#1978
* ci: harden winget manifest invocation check by @ya7010 in tombi-toml/tombi#1981
* ci: validate winget manifest leaf directory by @ya7010 in tombi-toml/tombi#1982
* ci: ignore winget manifest validation warnings by @ya7010 in tombi-toml/tombi#1983
* Fix root `$ref` schema completion by @kjanat in tombi-toml/tombi#1984

**Full Changelog**: tombi-toml/tombi@v1.1.6...v1.1.7

### v1.2.0

<!-- Release notes generated using configuration in .github/release.yml at v1.2.0 -->

## What's Changed
### 🚨 Breaking Changes
* Send CLI diagnostics to stderr by @ya7010 in tombi-toml/tombi#1991
### 🦅 New Features
* Add release asset attestations by @ya7010 in tombi-toml/tombi#1993
### 🐝 Bug Fixes
* fix(lsp): clear diagnostics after document close if workspace-diagnostics is disabled by @ya7010 in tombi-toml/tombi#1998
### 🛠️ Other Changes
* ci: align release note category emoji by @ya7010 in tombi-toml/tombi#1990
* docs: document TOMBI_NO_COLOR by @ya7010 in tombi-toml/tombi#1997
* fix(lsp): avoid cloning document URIs by @ya7010 in tombi-toml/tombi#1999

**Full Changelog**: tombi-toml/tombi@v1.1.7...v1.2.0

</details>

</details>

Modified files:
- `.mise.toml`

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants