Navigate to component in VSC

Going to definition of component actually points me to components.d.ts instead of the actual component file. I was trying to find what i was missing from navigating to the component code. My intellisense is failing as well not sure if it's related but in my research i already set tsconfig with components alias since i have been running nuxt 4.
6 Replies
kapa.ai
kapa.ai7d ago
Hi @Nove [876 Gaming]. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, there isn't enough specific information to directly address your issue about navigating to component definitions in Visual Studio Code (VSC) for Nuxt projects. The knowledge sources don't contain details about IDE-specific behaviors or troubleshooting for component navigation. However, I can provide some general information about Nuxt components that might be relevant to your situation: 1. Nuxt automatically imports components from the components/ directory, which allows you to use them without explicit imports Docs > Guide > Directory-structure > components (https://nuxt.com/docs/guide/directory-structure/components). 2. The auto-import feature might be affecting how your IDE resolves component definitions. Nuxt generates type definitions for these auto-imported components, which could explain why you're being directed to components.d.ts. 3. Nuxt uses a specific naming convention for components based on their file path. For example, a component at components/base/foo/Button.vue would be named <BaseFooButton /> Docs > Guide > Directory-structure > components (https://nuxt.com/docs/guide/directory-structure/components). To potentially improve component navigation in your IDE, you could try: 1. Ensuring your Nuxt and Vue language support extensions in VSC are up to date. 2. Checking if your project's TypeScript configuration is correctly set up for Nuxt. 3. Using explicit imports for components you want to navigate to, which might help VSC locate the source files. If these suggestions don't help, you might need to consult VSC-specific documentation or Nuxt community forums for more targeted assistance with IDE integration issues. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai7d ago
<@295042077853745153> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Cue
Cue7d ago
Goto definition alias - Visual Studio Marketplace
Extension for Visual Studio Code - Go to definition following alias redirections
Nove [876 Gaming]
Will definitely take a look. I added some more data to my question too, realized i left off a few potentially vital bits of information.
Cue
Cue7d ago
Regarding intellisense, there’s many reasons why things stop working or appear not to work, from a mixture of regen of type definitions, to Volar being temperamental. It’s why I also have vscode shortcut to reload the window because I find myself doing this often.
Nove [876 Gaming]
Do you have issues with seeing the props expected for components?
Want results from more Discord servers?
Add your server