Title: Auto-import priority rules · Issue #51155 · microsoft/TypeScript · GitHub
Open Graph Title: Auto-import priority rules · Issue #51155 · microsoft/TypeScript
X Title: Auto-import priority rules · Issue #51155 · microsoft/TypeScript
Description: Suggestion It seems there are many folks struggling with the priority/ordering of VSCode's auto-import (intellisense) suggestions. There are a few different cases, but they seem to be all somewhat related to the general theme of how thes...
Open Graph Description: Suggestion It seems there are many folks struggling with the priority/ordering of VSCode's auto-import (intellisense) suggestions. There are a few different cases, but they seem to be all somewhat ...
X Description: Suggestion It seems there are many folks struggling with the priority/ordering of VSCode's auto-import (intellisense) suggestions. There are a few different cases, but they seem to be all somew...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/51155
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Auto-import priority rules","articleBody":"# Suggestion\r\n\r\nIt seems there are many folks struggling with the priority/ordering of VSCode's auto-import (intellisense) suggestions. There are a few different cases, but they seem to be all somewhat related to the general theme of how these suggestions are prioritized.\r\n\r\n- My specific case is that when coding in Vue, the import of `watch` from `fs` is always prioritized over `vue` (/cc @cabal95)\r\n- Others have issues with code from external modules being prioritized over code defined within their repo\r\n- Others have issues related to preferring aliases defined in their tsconfig\r\n- Many edge cases around specific paths suggested when dealing with monorepos...\r\n\r\nIt would be fantastic if VSCode provided a way to override the priority but it seems that TypeScript's language server suggestions could use some tweaking regardless.\r\n\r\n## ⭐ Suggestion\r\n\r\nSeems like a fairly reasonable priority would be:\r\n- code found within the repo/module (preferring aliased paths if they exist, probably preferring \"closer\" imports over further away in the tree?)\r\n- code found in other repos/modules defined locally within a monorepo (again preferring aliases)\r\n- code found in _explicit_ dependencies found in package.json\r\n- code found in node internals (ex: `fs`, `path`)\r\n\r\n---\r\n## 🔍 Search Terms\r\n\r\nimport priority prioritize prioritise auto-import vscode intellisense\r\n\r\n## 🔗 Related Issues\r\nopen\r\n- https://github.com/microsoft/TypeScript/issues/31710\r\n- https://github.com/microsoft/TypeScript/issues/43352\r\n\r\nclosed\r\n- https://github.com/microsoft/TypeScript/issues/43849\r\n- https://github.com/microsoft/vscode/issues/29613\r\n- https://github.com/microsoft/TypeScript/issues/15024\r\n","author":{"url":"https://github.com/theoephraim","@type":"Person","name":"theoephraim"},"datePublished":"2022-10-12T20:36:38Z","url":"https://github.com/microsoft/TypeScript/issues/51155"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:13663034-0bae-fae4-55f8-33103f9cd907 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D262:DA744:87AF4C:B7ADFF:6B00E625 |
| html-safe-nonce | a35c960c6da2bfaa1a78317bc7804b3080b56c44feb1df10192d137f14350be2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjYyOkRBNzQ0Ojg3QUY0QzpCN0FERkY6NkIwMEU2MjUiLCJ2aXNpdG9yX2lkIjoiMTc4MDY3MzgxNDcxNjI3ODMwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6c613fb0934acf12b397b1bb711f615abdc1b9949feb117d814945c33fb4a541 |
| hovercard-subject-tag | issue:1406780558 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/51155/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5b10e119fcc5702d01e02c8d0a48d121aae6d26bc5fca8ff31e92e1938226f4d/microsoft/TypeScript/issues/51155 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5b10e119fcc5702d01e02c8d0a48d121aae6d26bc5fca8ff31e92e1938226f4d/microsoft/TypeScript/issues/51155 |
| og:image:alt | Suggestion It seems there are many folks struggling with the priority/ordering of VSCode's auto-import (intellisense) suggestions. There are a few different cases, but they seem to be all somewhat ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | theoephraim |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width