PathIntellisense icon indicating copy to clipboard operation
PathIntellisense copied to clipboard

Does not detect some extensions with absolute path.

Open Pedromdsn opened this issue 3 years ago β€’ 8 comments

As you can see in the print, it detects the .ts, js, tsx and jsx extensions, but it does not detect the logo.png image.

image

I'm using the default installation with no config changes.

Pedromdsn avatar Sep 13 '22 12:09 Pedromdsn

This is because this extension does not support the paths property from [tj]sconfig.json

Belonit avatar Sep 28 '22 11:09 Belonit

But it found the path of the ts, tsx, js and jsx files using da [tj]sconfig.json just didn't find the image.

Pedromdsn avatar Sep 29 '22 18:09 Pedromdsn

The search for ts, tsx, js and jsx is carried out by the built-in vs code tools. You can try adding these options to your settings.json

    "path-intellisense.extensionOnImport": true,
    "path-intellisense.mappings": {
		"@/": "${workspaceFolder}/src",
    },

Belonit avatar Sep 30 '22 07:09 Belonit

But it found the path of the ts, tsx, js and jsx files using da [tj]sconfig.json just didn't find the image.

hey, I have had the same problem at the moment. Damn it images not being suggested is annoying. Have you figured out the solution? πŸ˜‡πŸ₯ΊπŸ˜

piscopancer avatar Mar 20 '23 10:03 piscopancer

Hey @piscopancer

Could you provide a minimal environment where I can reproduce it?

  • minimal file/ folder structure
  • your path intellisense configuration

ChristianKohler avatar Mar 20 '23 11:03 ChristianKohler

Hey @piscopancer

Could you provide a minimal environment where I can reproduce it?

  • minimal file/ folder structure
  • your path intellisense configuration

Sure sir,

settings.json

{
    "workbench.colorTheme": "One Dark Pro Flat",
    "editor.fontSize": 16,
    "workbench.editor.untitled.hint": "hidden",
    "editor.linkedEditing": true,
    "git.ignoreMissingGitWarning": true,
    "liveServer.settings.donotShowInfoMsg": true,
    "editor.wordWrap": "on",
    "editor.tabSize": 2,
    "editor.minimap.renderCharacters": false,
    "editor.minimap.enabled": false,
    "tabnine.experimentalAutoImports": true,
    "javascript.preferences.quoteStyle": "single",
    "explorer.confirmDragAndDrop": false,
    "javascript.updateImportsOnFileMove.enabled": "always",
    "[scss]": {
        "editor.defaultFormatter": "sibiraj-s.vscode-scss-formatter"
    },
    "typescript.updateImportsOnFileMove.enabled": "always",
    "files.associations": {
        "*.script": "lua"
    },
    "diffEditor.codeLens": true,
    "editor.fontFamily": "consolas",
    "path-intellisense.autoTriggerNextSuggestion": true,
    "path-intellisense.extensionOnImport": true,
    "path-intellisense.autoSlashAfterDirectory": true,
    "path-intellisense.mappings": {
        "@/": "${workspaceRoot}/src"
    },
    "path-intellisense.absolutePathToWorkspace": true,
    "vscode-color-picker.languages": [
        "python",
        "javascript",
        "typescript",
    ],
    "scss.lint.unknownAtRules": "ignore",
    "editor.suggestSelection": "first",
    "css.lint.unknownAtRules": "ignore",
    "css.lint.unknownProperties": "ignore",
    "scss.lint.duplicateProperties": "warning",
    "sass.disableUnitCompletion": false,
    "sass.format.convert": false,
    "sass.andStared": [
        "active",
        "focus",
        "hover",
        "nth-child"
    ],
    "scss.format.spaceAroundSelectorSeparator": true,
    "rest-client.excludeHostsForProxy": [],
}

link to project, up-to-date indeed. Take a look at src/components/header/index.ts/

https://github.com/piscopancer/headblaster-client

piscopancer avatar Mar 20 '23 11:03 piscopancer

Thank you @piscopancer

Could you try to add:

{ "typescript.suggest.paths": false }
{ "javascript.suggest.paths": false }

to your configuration?

ChristianKohler avatar Mar 20 '23 12:03 ChristianKohler

image image

Not working anyway. Even though I have restarted vs code after that just in case

BTW pictures suggestions work well in css -> url(/.../...). So img files pop up. But ts/js seems to be different πŸ’€

I am using vite (if it has anything to do about it)

piscopancer avatar Mar 20 '23 12:03 piscopancer