Skip to content

Exclude top-level imports from document symbols - #64160

Draft
Jake Bailey (jakebailey) with Copilot wants to merge 3 commits into
mainfrom
copilot/should-native-lsp-include-imports
Draft

Exclude top-level imports from document symbols#64160
Jake Bailey (jakebailey) with Copilot wants to merge 3 commits into
mainfrom
copilot/should-native-lsp-include-imports

Conversation

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The native LSP reported top-level imports through textDocument/documentSymbol, unlike the established VS Code Outline behavior.

  • Document symbols
    • Skip top-level import and import-equals declarations.
    • Preserve ordinary declarations and nested symbols.
import { value } from "./values";
const local = 1;

The response includes local, but not value.

Copilot AI and others added 2 commits September 3, 2026 22:52
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
@@ -1,23 +1,4 @@
// === Document Symbols ===
// === /navigationBarItemsImports.ts ===

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm, I forgot that the outline also powers the navigation bar. Maybe nobody's navigating within an import?

Copilot AI changed the title [WIP] Fix TypeScript LSP documentSymbol response for top-level imports Exclude top-level imports from document symbols Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should the native TypeScript LSP include top-level imports in its textDocument/documentSymbol response?

2 participants