我在vscode中的绝对文件路径intellisense无法正常工作。它总是向我显示智能感知中的相对文件路径。如何使它显示绝对文件路径而不是intellisense中的相对路径?
编辑:当我将"allowJs": false,
设置为true时,它起作用。但是,如果我使用流程,我显然无法做到这一点?
jsconfig.json
{
"compilerOptions": {
"allowJs": false,
"allowSyntheticDefaultImports": false,
"baseUrl": "./src",
"paths": {
"@app/*": [
"./src"
],
"@src/*": [
"./src"
]
}
},
"exclude": [
"node_modules"
],
"include": ["src"]
}
jsconfig.json
文件有一个名为src
的兄弟姐妹,其中有我的应用程序。在我的设置中,我有:
"path-intellisense.absolutePathToWorkspace": false,
和
"javascript.preferences.importModuleSpecifier": "non-relative",
:
settings.json
{
"git.enableSmartCommit": true,
"editor.action.transformToUppercase": true,
"path-intellisense.absolutePathToWorkspace": false,
"extensions.ignoreRecommendations": false,
"window.zoomLevel": 1,
"javascript.validate.enable": false,
"flow.runOnAllFiles": true,
"flow.enabled": true,
"flow.runOnEdit": true,
"flow.showStatus": true,
"editor.rulers": [80],
"explorer.confirmDelete": false,
"flow.useNPMPackagedFlow": true,
"explorer.confirmDragAndDrop": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.preferences.importModuleSpecifier": "non-relative",
"elixir.projectPath": "api/",
"flow.pathToFlow": "${workspaceFolder}/frontend/node_modules/.bin/flow",
"flow.showUncovered": false,
"flow.useLSP": false,
"editor.formatOnSave": true,
"prettier.eslintIntegration": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.minimap.maxColumn": 80
}