-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[regression] typescript intelisenses are missing after latest update #413
Comments
Additional information: My {
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
},
"incremental": true,
"verbatimModuleSyntax": true,
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.mts",
"**/*.mdx",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
} A sample mdx file: import { Swagger } from '@/components/Swagger';
import { someAPISwaggerDocs } from '@/app/api/v1/some/[...slug]/schema';
<Swagger spec={someAPISwaggerDocs} /> The MDX rendered ok. And this used to work yesterday and earlier today. Then I had to reboot my laptop and I guess that's when vscode upgraded this extension 😅 |
Are you sure this problem exists in 1.8.1? I could see why it would exist in 1.8.0, but 1.8.1 fixed some bugs due to internal changes. I’m not able to reproduce this issue with 1.8.1. |
Yes - I got this problem together with #407 whenever I rename a TS export as well (saw it just now when I tried to F2 renaming a component). vscode says I'm on 1.8.1: I have also tried to uninstall/reinstall via vscode marketplace - same issue :d |
I use the same version of VSCode. That’s not the problem. Do you also have this problem when you disable all other extensions? |
Can you try VSCode Insiders? |
I also had this problem after installing it for the first time today, as well as TypeScript errors showing on the last character of a line, rather than on the actual expression. Downgrading to 1.7.3 fixed it. |
Could you provide:
|
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
},
"incremental": true,
"verbatimModuleSyntax": true,
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.mts",
"**/*.mdx",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules", "workers/**"]
} |
That info is helpful. :) All 3 extensions you listed that provide TypeScript plugins ( |
I believe I've encountered the same root issue but only have the autocomplete problem. I've disabled all extensions except MDX and WSL. Repro is straight from astro with mdx starter, only modification is adding a Steps to reproduce
One other note is that HTML elements (e.g., div, img, etc.) on either 1.8.2 or 1.7.3 aren't found in intellisense either and after typing a start tag, they aren't auto-closing. Honestly can't remember if it ever did this (been a while since I've worked with MD/MDX) but I seem to recall it did. Possibly I have something else misconfigured but thought I would mention it just in case it helps shed any light. Unresolved HTML elements (occurs in 1.7.3 & 1.8.2) Extensions installed on WSL: Ubuntu:
azurite.azurite
bierner.github-markdown-preview
bierner.markdown-checkbox
bierner.markdown-emoji
bierner.markdown-footnotes
bierner.markdown-mermaid
bierner.markdown-preview-github-styles
bierner.markdown-yaml-preamble
bourhaouta.tailwindshades
davidanson.vscode-markdownlint
dbaeumer.vscode-eslint
eamodio.gitlens
editorconfig.editorconfig
eg2.vscode-npm-script
esbenp.prettier-vscode
github.copilot
github.copilot-chat
hbenl.vscode-mocha-test-adapter
hbenl.vscode-test-explorer
hookyqr.minify
huntertran.auto-markdown-toc
ibm.codewind
ibm.codewind-openapi-tools
letmaik.git-tree-compare
ms-azuretools.vscode-azureappservice
ms-azuretools.vscode-azurefunctions
ms-azuretools.vscode-azureresourcegroups
ms-azuretools.vscode-azurestaticwebapps
ms-azuretools.vscode-azurestorage
ms-azuretools.vscode-docker
ms-dotnettools.csharp
ms-dotnettools.vscode-dotnet-runtime
ms-python.debugpy
ms-python.isort
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-toolsai.vscode-jupyter-cell-tags
ms-toolsai.vscode-jupyter-slideshow
ms-vscode.azure-account
ms-vscode.azurecli
ms-vscode.powershell
ms-vscode.test-adapter-converter
msazurermtools.azurerm-vscode-tools
orta.vscode-jest
pwabuilder.pwa-studio
redhat.vscode-commons
redhat.vscode-xml
ritwickdey.liveserver
ryu1kn.partial-diff
shd101wyy.markdown-preview-enhanced
unifiedjs.vscode-mdx
vscode.docker
vscode.yaml
xdebug.php-debug
yzhang.markdown-all-in-one
/home/barry/.vscode-server/extensions/unifiedjs.vscode-mdx-1.8.2/package.json
{
"extends": "astro/tsconfigs/strict"
} |
I’m not seeing that:
I imagine this has something to do with a bug in |
This comment has been minimized.
This comment has been minimized.
Hi @remcohaszing - Thanks for looking in to this! I'm not sure I fully understand your comments, sorry. In my repro, I disabled ALL extensions except MDX & WSL, there is nothing related to svelte and I don't even have the extensions I just tried v1.8.4 and intellisense is working again for MDX components, however it does not work for me if using > v1.7.3 through < 1.8.4. Curious if you tested my repro using > 1.8.3 or 1.8.4? Also, even with 1.8.4, intellisense for HTML elements is not working - this only occurs in MDX files. Any thoughts? Thank you! |
I just released 1.8.5. This fixes a deeper issue which may resolve various unexpected bugs. But if you’re saying it works with 1.8.4, that should be ok, right?
What do you mean by this? This extension doesn’t deal with HTML files. MDX files don’t contain HTML. |
Yes, working with 1.8.4 is OK as it resolves the issue that existed > 1.7.3 < 1.8.4. I just tested with 1.8.5 and its working with that too so all good :) You had mentioned that you were unable to reproduce so I was only asking if you tested with 1.8.3 or if you had tested with 1.8.4. Either way, no worries, intellisense for MDX components is working as expected >= 1.8.4.
Sorry for the confusion. What I meant is that when typing an HTML element (e.g., div, span, etc.) into an MDX file, intellisense for the HTML element doesn't resolve correctly. As I mentioned in my previous message, I'm not sure if this ever worked but noticed it and thought I would mention/ask. Should HTML elements have intellisense in MDX files (e.g., if I'm adding a "div" or "span" to an MDX which would be valid content for an MDX file like in the below)? Thank you! |
Ah, so you meant JSX elements, not HTML. They are not the same. Anyway, what you’re seeing is #267. |
Initial checklist
Affected packages and versions
v1.8.1
Link to runnable example
No response
Steps to reproduce
A - definition navigation
B - import intelisense
Expected behavior
A - I should be able to F12/Ctrl + click the component to jump to its definition
B - I should have autocomplete for the path of my project
Actual behavior
A - Nothing happened
B - Nothing happened
Runtime
Node v20
Package manager
pnpm
OS
macOS
Build and bundle tools
Next.js
The text was updated successfully, but these errors were encountered: