FoolScript is a VS Code extension that adds context-aware hover buttons for your custom snippets in any programming language. Unlike traditional code lenses that only work with specific language servers, FoolScript uses hover actions and decorations to work with all file types.
Version 3.0.0 Changes
Language Agnostic: Now works with all programming languages, not just TypeScript/JavaScript
Hover-based Interface: Replaced CodeLens with hover buttons for better language compatibility
Visual Indicators: Added visual decorations (➤) to indicate where snippets are available
Improved UX: Hover over the first line to see and activate available snippets
Features
Context-aware Snippets: Only shows snippets relevant to your current file based on:
File path patterns
Filename patterns
Dependencies in your project
Visual Feedback: Lines with available snippets show a ➤ indicator in the gutter
Easy Activation: Hover over the decorated line to see buttons for your snippets
Universal Language Support: Works with any programming language or file type
Usage
Create snippets in your .code-snippets files with conditions:
{
"My Custom Snippet": {
"prefix": "mycustom",
"body": [
"// Your snippet content here"
],
"description": "My custom snippet",
"conditions": {
"pathContains": "src",
"filenameContains": "component",
"dependencyRequired": "react"
}
}
}
Look for the ➤ indicator at the beginning of files where snippets are available
Hover over the line to see available snippets
Click a button to insert the snippet
Commands
FoolScript: Configure FoolScript - Creates a template foolscript.code-snippets file in your workspace