-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enhance component references in find references (#2157)
#2130 This allows for finding current component references from the script tag. The advantage of this is that you can now use the "Find All References" command for component references. This will always open in the sidebar without setting the references.preferredLocation config. While we're on this topic, I also map the reference for a component to "find component references". Currently, these are only the references for the file that was requested. The reason is that the name of the generated component is suffixed, so any import will be an aliased default import. Thus, TypeScript only searches within the same file.
- Loading branch information
1 parent
54f921a
commit bf99a93
Showing
5 changed files
with
186 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...anguage-server/test/plugins/typescript/testfiles/find-component-references-parent2.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script script lang="ts"> | ||
import Component1 from "./find-component-references-child.svelte"; | ||
</script> |