Closed sandrodz closed 1 year ago
Configuration typescript.preferences.importModuleSpecifier
might help
@chemzqm none of these seem to work, I tried:
typescript.preferences.importModuleSpecifier: Preferred path style for auto imports. default: "shortest" Valid options: ["shortest","relative","non-relative","project-relative"]
typescript.preferences.importModuleSpecifierEnding: Preferred path ending for auto imports. default: "auto" Valid options: ["auto","minimal","index","js"]
Docs also mention typescript.preferences.includePackageJsonAutoImports: default: "auto" Valid options: ["auto","on","off"]
but this doesn't seem to be released feature yet. LS complains when I put this config.
Seems you're not using latest coc-tsserver.
@chemzqm 2.0.2
I am not sure what that error means.
It means it may not work as folder configuration in your project :h coc-configuration-scope
It means it may not work as folder configuration in your project
:h coc-configuration-scope
but is it the right setting for my issue?
Seems not, you need to send feature request to typescript project.
When using component that is not imported in current doc, tsserver automatically adds import at the top of the file. File path is like this:
import AppLayout from './layouts/App/App.layout'
But in the component directory there is a file with ./layouts/App/packages.json, it contains:
Which means that filename is redundant and import statement can be:
import AppLayout from './layouts/App
How do I force coc-tsserver use this pattern instead?