Lazy C Extension
A comprehensive VS Code extension for C programming with intelligent code assistance and productivity features.
Features
🛠️ Core Features
- ✅ C Manual Pages Browser - Complete C library reference with search functionality
- ✅ Auto Semicolons - Smart insertion (skips control structures & comments)
- ✅ Auto Headers - Automatically includes required header files
- ✅ One-Click Compile & Run -
Ctrl+Shift+R to compile and run
- ✅ Smart Code Templates - Auto-inserts main function in new files
- ✅ Function Prototypes - Automatic generation and management
- ✅ Code Completion - Intelligent suggestions for C keywords and library functions
- ✅ Safety Checks - Detects unsafe functions and memory issues
📚 Library Reference
- Complete Coverage: All standard C library functions (stdio.h, stdlib.h, string.h, math.h, time.h, ctype.h)
- Rich Documentation: Function signatures, parameters, examples, and related functions
- Smart Search: Quick access to any function documentation
- Hover Information: Detailed info on hover over functions
🛡️ Safety & Quality
- Unsafe Function Detection: Warns about dangerous functions (gets, strcpy, etc.)
- Memory Safety: Detects potential memory leaks and null pointer issues
- Smart Alternatives: Suggests safer function alternatives
- Real-time Diagnostics: Shows warnings as you code
Setup
- Install the extension from VS Code Marketplace
- Ensure you have a C compiler (GCC) installed and in your PATH
- Open any
.c file to start using the features
Usage
C Manual Pages
- Press
Ctrl+Shift+H to open the C Library Reference
- Search for any standard library function
- Get prototypes, examples, and descriptions
Auto Features
- Semicolons are added automatically as you type
- Header files are included when you use library functions
- New C files get a basic main function template
Compile & Run
- Press
Ctrl+Shift+R to compile and run your current C file
- Errors are displayed in the Problems panel with helpful messages
- No need to open terminals manually
Code Completion
- Start typing any C keyword or function name
- Press
Ctrl+Space to see suggestions
- Includes function signatures and documentation
Safety Checks
- Unsafe functions are highlighted with warnings
- Memory issues are detected and reported
- Safer alternatives are suggested
Keyboard Shortcuts
| Shortcut |
Action |
Ctrl+Shift+H |
Open C Manual Pages |
Ctrl+Shift+R |
Compile and Run |
Ctrl+Shift+M |
Insert main function |
Ctrl+Shift+D |
Generate function documentation |
Requirements
- VS Code 1.80.0 or higher
- GCC compiler (for compile & run functionality)
Extension Settings
c-helper.autoSemicolon: Enable/disable automatic semicolon insertion (default: true)
c-helper.autoHeaders: Enable/disable automatic header inclusion (default: true)
c-helper.compilerPath: Path to C compiler (default: 'gcc')
Changelog
[2.2.0] - 2024-02-24
- 🎨 UI Improvements: Modern interface design
- 📚 Enhanced Documentation: Better function references
- 🛡️ Safety Features: Improved unsafe function detection
- ⚡ Performance: Faster code completion and diagnostics
- 🐛 Bug Fixes: Resolved issues with auto-features
[2.1.0] - 2024-02-20
- ✨ Initial Release: Core C programming features
- 📖 Manual Pages: Complete library reference
- 🚀 Auto Features: Semicolons, headers, templates
- ⚙️ Compilation: One-click compile and run
License
MIT License
Support
Made with ❤️ for C developers worldwide
| |