{"id":24895005,"url":"https://github.com/ascpixi/vscode-path-go-to-definition","last_synced_at":"2025-10-16T10:30:54.683Z","repository":{"id":274784156,"uuid":"822696733","full_name":"ascpixi/vscode-path-go-to-definition","owner":"ascpixi","description":"📁 A VSCode extension to extend the \"Go to Definition\" (F12) action to support file paths in strings","archived":false,"fork":false,"pushed_at":"2025-01-29T10:53:11.000Z","size":1446,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T11:34:09.692Z","etag":null,"topics":["typescript","visual-studio-code","visual-studio-code-extension","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=ascpixi.path-go-to-definition","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ascpixi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-01T16:22:29.000Z","updated_at":"2025-01-29T10:53:15.000Z","dependencies_parsed_at":"2025-01-29T11:44:28.316Z","dependency_job_id":null,"html_url":"https://github.com/ascpixi/vscode-path-go-to-definition","commit_stats":null,"previous_names":["ascpixi/vscode-path-go-to-definition"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascpixi%2Fvscode-path-go-to-definition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascpixi%2Fvscode-path-go-to-definition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascpixi%2Fvscode-path-go-to-definition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascpixi%2Fvscode-path-go-to-definition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascpixi","download_url":"https://codeload.github.com/ascpixi/vscode-path-go-to-definition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236706709,"owners_count":19192045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["typescript","visual-studio-code","visual-studio-code-extension","vscode","vscode-extension"],"created_at":"2025-02-01T19:15:43.583Z","updated_at":"2025-10-16T10:30:49.296Z","avatar_url":"https://github.com/ascpixi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Path Go To Definition VSCode Extension\nExtends the \"Go to Definition\" (F12) action to support file paths in strings, with extensive customization abilities.\n\n(\u003ca href=\"https://github.com/ascpixi/vscode-path-go-to-definition\"\u003e\u003ccode\u003eGitHub\u003c/code\u003e\u003c/a\u003e | \u003ca href=\"https://github.com/ascpixi/vscode-path-go-to-definition/issues\"\u003e\u003ccode\u003eIssue Tracker\u003c/code\u003e\u003c/a\u003e)\n\n![Extension demonstration](etc/demonstration.gif)\n\n## Features\n\n- language-agnostic,\n- ability to define regular expressions to match custom path formats in strings,\n- ability to define custom settings depending on the language ID of documents and by matching their pathnames via regular expressions.\n\n## Extension Settings\n\nThis extension contributes the following settings:\n\n* `pathGoToDefinition.projectRootRegex`: The regex to use when checking for paths that are relative to the project's root directory. Matches the whole string.\n* `pathGoToDefinition.relativeRegex`: The regex to use when checking for paths that are relative to the directory the file is in. Matches the whole string.\n* `pathGoToDefinition.langWhitelist`: Language IDs that the extension should handle. If empty, all languages are handled.\n* `pathGoToDefinition.filenameWhitelist`: If any of the regex patterns in the array match the relative path of a document, the extension will be active for that document. If empty, no checks are performed.\n* `pathGoToDefinition.specific`: Allows for specialized configuration sets for different languages or file types.\n\nThe `pathGoToDefinition.specific` setting is an array of objects of the given types:\n* `language`: The language ID that this specific configuration set matches. (`string` or `null`)\n* `path`: The regular expression to match against the file path to determine whether this configuration set applies. (`string` or `null`)\n* `projectRootRegex`: The regex to use when checking for paths that are relative to the project's root directory. Matches the whole string. If null or empty, uses the global default. (`string` or `null`)\n* `relativeRegex`: The regex to use when checking for paths that are relative to the directory the file is in. Matches the whole string. If null or empty, uses the global default. (`string` or `null`)\n* `pathStringRegex`: The regex to use when scanning for path strings in addition to regular string scanning. The last group is used as the string. Matches the entire line. If null or empty, this behavior is disabled.\n* `defaultFile`: If a path points to a directory, the extension will navigate to the file with this name in that directory. (`string` or `null`)\n* `assumedProjectRoot`: Paths detected with this configuration set will assume this path as the project root. This path may itself be relative to the real project root.\n\nThe defaults for these settings are:\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eName\u003c/th\u003e\n        \u003cth\u003eDefault\u003c/th\u003e\n        \u003cth\u003eDefault (JSON)\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003epathGoToDefinition.projectRootRegex\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e^(?:\\/|\\\\).+$\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e\"^(?:\\\\/|\\\\\\\\).+$\"\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003epathGoToDefinition.relativeRegex\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e^\\.(?:\\/|\\\\).+$\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e\"^\\\\.(?:\\\\/|\\\\\\\\).+$\"\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003epathGoToDefinition.langWhitelist\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e(empty)\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e[]\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003epathGoToDefinition.filenameWhitelist\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e(empty)\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e[]\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003epathGoToDefinition.specific\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e(empty)\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003e[]\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nThe `pathGoToDefinition.specific` can prove useful when defining support for e.g. DSLs based on another language. For example:\n```json\n{\n    \"pathGoToDefinition.specific\": [\n        {\n            \"language\": \"python\",\n            \"path\": \"^.+\\\\.build$\",\n            \"defaultFile\": \"component.build\",\n            \"projectRootRegex\": \"^.+\\\\/.+$\"\n        }\n    ],\n}\n```\n\nThis snippet will apply to all files that are classified to be Python and that have their pathnames end with `.build`. The project root regex is changed to be less restrictive (only requiring a single slash in a string to be considered a path), and instruct the extension to go to the `component.build` file if the path points to a directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascpixi%2Fvscode-path-go-to-definition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascpixi%2Fvscode-path-go-to-definition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascpixi%2Fvscode-path-go-to-definition/lists"}