FoolScript VS Code Extension
FoolScript is a powerful VS Code chat extension designed to generate crash course style documentation for any programming language. It integrates seamlessly with the GitHub Copilot chat window, providing quick and easy access to language-specific information and code examples.
Features
- Multi-Language Support: FoolScript automatically detects the language of your active file and provides language-specific assistance.
- Crash Course Documentation: Quickly generate concise, informative documentation for various programming concepts.
- Interactive Chat Interface: Communicate with FoolScript using natural language within the Copilot chat window.
- Code Examples: Get relevant code snippets and examples for better understanding.
General Request
The @fools
chat participant defaults to converting your request directly into idiomatic code for the current language. Instead of phrasing your request as a question, you can simply state what you want to achieve, and FoolScript will generate the code for you.
For example, typing @fools an array that prints each element
will generate the appropriate code snippet for iterating over an array and printing each element.
Available Commands
FoolScript offers a variety of commands to generate documentation and code examples:
Basic Concepts
/class
: Get a crash course on classes in the current language
/function
: Learn about functions and their usage
/enum
: Understand enumeration types
/variable
: Explore variable declarations and scoping
Data Types & Operations
/number
: Explore number types and operations
/string
: Discover string manipulations
/boolean
: Learn about boolean operations
/array
: Learn about array operations
/object
: Get a crash course on objects and their usage
/null
: Understand null handling
Control Flow
/ifelse
: Learn about conditional statements
/while
: Get examples of loop structures
Project Structure
/entry
: Understand program entry points and initialization
/structure
: Learn about recommended project organization and file structure
Design Patterns
/patternMvc
: Learn about the Model-View-Controller pattern
/patternRepository
: Understand the Repository pattern
/patternFactory
: Explore the Factory pattern
/patternSingleton
: Learn about the Singleton pattern
/patternObserver
: Understand the Observer pattern
/patternStrategy
: Explore the Strategy pattern
/types
: Explore type-related concepts
/language
: Get comprehensive information about the current programming language
/interface
: Understand interface definitions
Installation
Install from VS Code Marketplace
- Open VS Code
- Go to the Extensions view (Ctrl+Shift+X)
- Search for "FoolScript"
- Click Install
Manual Installation
If you prefer to install the extension manually, follow these steps:
- Clone the repository or download the source code
- Open a terminal and navigate to the project directory
- Run
npm install
to install dependencies
- Run
npm run package
to create a .vsix file
- In VS Code, go to the Extensions view (Ctrl+Shift+X)
- Click on the "..." menu at the top of the Extensions view
- Choose "Install from VSIX..."
- Navigate to and select the .vsix file you created
- Click "Install"
Usage
- Open a file in VS Code
- Open the GitHub Copilot chat window
- Type
@foolscript
followed by your query or command
Examples:
@foolscript /language
to get information about the current language
@foolscript /patternStrategy
to learn about the Strategy pattern
@foolscript /structure
to understand project organization
@foolscript Explain how to declare variables in this language
Requirements
- VS Code version 1.85.0 or higher
- GitHub Copilot extension installed and activated
Extension Settings
Currently, FoolScript doesn't require any specific settings. It works out of the box!
Known Issues
Please report any issues you encounter on our GitHub repository.
Contributing
We welcome contributions! Please see our Contributing Guide for more details.
License
This extension is released under the MIT License.
Enjoy learning with FoolScript! 🚀
For more information, visit our GitHub repository.