Pine Script v6 Language Server for VS Code
A comprehensive VS Code extension for Pine Script v6 with advanced language server capabilities, specifically designed for TradingView's latest Pine Script version.
🚀 Features
Pine Script v6 Specific Features
- Dynamic Requests: Support for
request.*()
functions with "series string" values
- Enhanced Boolean Operations: Short-circuit evaluation for
and
/or
operators
- Typographic Text Sizing: Support for point-based text sizes in drawings
- Text Formatting: Bold and italic text formatting support
- Strategy Improvements: Order trimming instead of 9000-limit errors
- Negative Array Indices: Support for negative array indexing
Core Language Features
- 🎯 Advanced Syntax Highlighting - Comprehensive Pine Script v6 syntax support
- 💡 Intelligent Code Completion - Context-aware completions with function signatures
- 📖 Hover Documentation - Instant access to function and variable documentation
- 🔍 Library Integration - Import statement completions and hover previews
- 🎨 Multiple Themes - Various color themes optimized for Pine Script
- 📝 Code Templates - Quick templates for indicators, strategies, and libraries
- 🏷️ Type Generation - Automatic type annotations for variables
- 📋 Documentation Generation - Automated docstring generation
📦 Installation
Via VS Code Marketplace
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Search for "Pine Script v6"
- Click Install
Manual Installation
- Download the
.vsix
file from releases
- In VS Code:
Ctrl+Shift+P
→ "Extensions: Install from VSIX"
- Select the downloaded file
🆕 What's New in v6
Dynamic Requests
//@version=6
indicator("Dynamic Symbol Analysis")
// Now you can use series strings for symbols!
symbols = array.from("AAPL", "GOOGL", "MSFT")
for symbol in symbols
price = request.security(symbol, "1D", close) // Dynamic!
// Process each symbol's data
Enhanced Text Features
//@version=6
indicator("Enhanced Text")
if barstate.islast
// Use exact point sizes for text
label.new(bar_index, high, "Bold Text",
text_size = 16, // Exact points!
text_formatting = text.format_bold)
Boolean Optimizations
//@version=6
indicator("Smart Conditions")
// Short-circuit evaluation - more efficient!
if array.size(myArray) > 0 and myArray.first() > 0
// myArray.first() only evaluated if size > 0
label.new(bar_index, high, "Safe!")
🛠️ Development Setup
- Clone the repository:
git clone https://github.com/yourusername/Pine-Script-v6-VS-Code.git
cd Pine-Script-v6-VS-Code
- Install dependencies:
pnpm install
- Compile the extension:
pnpm run compile
- Run in development mode:
pnpm run start
📚 Documentation
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
📄 License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
🙏 Acknowledgments
- Based on the excellent Pine Script v5 extension by frizLabz
- Thanks to TradingView for Pine Script v6
- Community feedback and contributions
📞 Support
Disclaimer: Pine Script™ is a trademark of TradingView. This project is not affiliated with, endorsed by, or connected to TradingView.