Commit 48c4a51
committed
refactor(symbol): clean up label_for_symbol to match JDTLS output
Remove handlers for symbol kinds that JDTLS workspace/symbol never
returns (Constructor, Field, Constant, EnumMember, Variable, Package).
Deduplicate Class/Interface/Enum into a single match arm. Add README
section documenting project symbol search and CamelCase fuzzy matching.
JDTLS WorkspaceSymbolHandler only searches type names (Class, Interface,
Enum, Annotation) and optionally method names when
includeSourceMethodDeclarations is enabled:
https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/main/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/WorkspaceSymbolHandler.java
Zed only calls label_for_symbol for workspace/symbol results, not
textDocument/documentSymbol:
https://github.com/zed-industries/zed/blob/main/crates/language_extension/src/extension_lsp_adapter.rs1 parent a1dffd9 commit 48c4a51
2 files changed
Lines changed: 17 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
571 | 554 | | |
572 | 555 | | |
573 | 556 | | |
| |||
660 | 643 | | |
661 | 644 | | |
662 | 645 | | |
663 | | - | |
664 | | - | |
| 646 | + | |
| 647 | + | |
665 | 648 | | |
666 | 649 | | |
667 | 650 | | |
| |||
676 | 659 | | |
677 | 660 | | |
678 | 661 | | |
679 | | - | |
| 662 | + | |
| 663 | + | |
680 | 664 | | |
681 | 665 | | |
682 | 666 | | |
| |||
702 | 686 | | |
703 | 687 | | |
704 | 688 | | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | 689 | | |
719 | 690 | | |
720 | 691 | | |
| |||
0 commit comments