ChristianKohler / PathIntellisense

Visual Studio Code plugin that autocompletes filenames
https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense
MIT License
428 stars 47 forks source link

Does not detect some extensions with absolute path. #209

Open Pedromdsn opened 2 years ago

Pedromdsn commented 2 years ago

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.

Belonit commented 2 years ago

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

Pedromdsn commented 2 years ago

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

Belonit commented 2 years ago

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",
    },
piscopancer commented 1 year ago

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? πŸ˜‡πŸ₯ΊπŸ˜

ChristianKohler commented 1 year ago

Hey @piscopancer

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

piscopancer commented 1 year ago

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

ChristianKohler commented 1 year ago

Thank you @piscopancer

Could you try to add:

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

to your configuration?

piscopancer commented 1 year ago

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)