Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xanewok/vscode-generated-files
Warn when opening or editing generated files in VS Code
https://github.com/xanewok/vscode-generated-files
Last synced: 7 days ago
JSON representation
Warn when opening or editing generated files in VS Code
- Host: GitHub
- URL: https://github.com/xanewok/vscode-generated-files
- Owner: Xanewok
- License: mit
- Created: 2023-08-09T14:01:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-09T19:40:57.000Z (over 1 year ago)
- Last Synced: 2024-12-12T19:43:30.940Z (10 days ago)
- Language: TypeScript
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Mark generated files in VS Code
Warns whenever a file that's considered to be generated (externally) is opened or edited.
## Features
A file can be considered generated whenever it's URI matches a pattern (`/generated/` by default) or its first line includes a marker (`This file is generated` by default).
Such files are rendered as greyed out (think when a variable is reported as unnecessary) to retain the semantic tokens.
Moreover, editing the file will trigger a warning to help remind the user that the file is generated and thus it may be overwritten at some point.## Extension Settings
This extension contributes the following settings:
- `generatedSourceWarning.generatedFileUriPattern`: RegExp file URI pattern for generated files to warn against.
- `generatedSourceWarning.generatedMarker`: First line marker that indicates whether to warn against a file.## Building and installing locally
```script
$ npm install
$ npm run package# ... and install the extension manually using the resulting .vsix file
```