path-alias

introduce

The reason is that the project team has adopted a uniform path alias in their code, which has the advantage of not seeing.. /.. /.. / and so on code, but the editor for this path basically no hint, jump, this plug-in is to solve, vscode can not prompt path alias, can not provide from the path alias function, variable, can not provide function, variable jump. To install, search for path-alias in the vscode plug-in store

Features

  • You can customize path aliases in SettingspathAlias.aliasMapKey is the alias you want to define, and value is the absolute path to which the path alias corresponds. Where you can use${cwd}To replace the absolute path to the current working directory. Let’s say I want to use@SRC directory in my working directory so I only need to write in configuration
    {
      "@": "${cwd}/src"
    }
    Copy the code

    Can be

  • Provides input hints for path aliases
  • Provides file jumps with path aliases
  • A message is automatically updated after the path alias is updated
  • The corresponding prompts are automatically updated after files are added and deleted
  • Some path abbreviations can jump correctly
  • Support for importing attributes or functions from path aliases
  • Supports refactoring from relative paths to path aliases
  • Supports the jump of import variables
  • Component label hopping is supported.
  • To add a configuration file, you can configure the pathalias through the package.json field pathalias or in the root directory. Pathaliasrc (written in json format)
  • Provides signature Help for functions imported from path aliases
  • Provides automatic import of functions from path aliases

Afterword.

At present, the main functions have been developed, welcome everyone to mention the issue after experiencing the plug-in. Finally, if you feel good, remember to give me a star! Making the address