VsCode use path defined in tsconfig paths?

Is there a way that Vscode automatically imports the files using the paths defined in my tsconfig?

    "paths": {
      "@/ui/*": [
        "./src/components/ui/*"
      ],
      "@/components/*": [
        "./src/components/*"
      ],
      "@/store/*": [
        "./src/lib/store/*"
      ],
      "@/*": [
        "./src/*"
      ],
    },


It currently does not work and it imports paths like this:

import { UserNav } from "../user/user-nav";


I always have to update them manually in order to get this:

import { UserNav } from "@/components/user/user-nav";
Was this page helpful?