Releases: belian-earth/duckdb-r-editor
v0.8.1 - Autocomplete Fix
Bug Fixes
- Fixed single-line autocomplete - Completions now work when the cursor is at the end of single-line SQL strings (e.g.
dbExecute(con, "SELECT ..."))
New Features
- Debug SQL Detection command - New command to diagnose autocomplete issues at cursor position (Command Palette → "DuckDB R Editor: Debug SQL Detection at Cursor")
- Manual test suite - Added
examples/test_autocomplete.Rwith diverse test cases
Documentation
- Added
Ctrl+Spacetip for manually triggering completions - Documented debug command in README
Installation
Download duckdb-r-editor-0.8.1.vsix and install via:
Positron: Extensions → ... → Install from VSIX
Full Changelog: v0.8.0...v0.8.1
v0.8.0 - Remove native duckdb dependency, add duckplyr support
✨ New Features
duckplyr Support
- Autocomplete now works in
read_sql_duckdb()anddb_exec()function calls
Improved Positional Autocomplete
- Smarter context-aware completions after FROM, JOIN, WHERE, and SELECT clauses
- Columns from all tables in query (FROM + JOINs) shown in relevant contexts
🔧 Architecture Change
Removed Native duckdb Dependency
The Node.js duckdb native module has been replaced with a static JSON function list. This fixes extension activation failures on architectures where the native module fails to load (e.g., Apple Silicon - #8).
- Base DuckDB functions (~690) ship as a pre-generated JSON file
- Extension functions are discovered automatically from R sessions via auto-refresh
duckdbnpm package moved to devDependencies (used only bymake functionsto regenerate the list)- VSIX no longer contains native binaries — smaller and more portable
🐛 Bug Fixes
- Fixed potential crash when SQL string starts at column 0 (negative position in named-argument check)
- Fixed
completionProviderbeing disposed twice on deactivation - Fixed
diagnosticsProviderdiagnostic collection not being disposed - Removed stale
defaultExtensionsconfig key andloadExtensioncommand
🧹 Code Quality
- Eliminated ~80 lines of duplicated parsing logic in
GlueInterpolationHandler - Removed dead code from
RCodeExecutor(unused temp file utilities) - Updated README to reflect removed features and correct setting names
📦 Installation
Download duckdb-r-editor-0.8.0.vsix and install via:
Positron: Extensions → ... → Install from VSIX
Full Changelog: v0.7.0...v0.8.0
v0.7.0 - SQL Auto-Formatting
✨ New Features
SQL Auto-Formatting
Format SQL strings in R code with full support for glue interpolations!
- Format SQL Command: Format SQL at cursor position (Command Palette → "DuckDB R Editor: Format SQL in R String")
- Glue Interpolation Support: Preserves
{variable}interpolations inglue_sql()calls - Configurable Styles: Choose between
standard,tabularLeft, ortabularRightformatting - Keyword Casing: Control SQL keyword case (
preserve,upper,lower) - Smart Indentation: Automatically indents multi-line SQL based on R code context
Configuration Options:
{
"duckdb-r-editor.sqlFormattingStyle": "standard",
"duckdb-r-editor.sqlKeywordCase": "preserve"
}🐛 Bug Fixes
- Fixed background highlighting incorrectly highlighting text between named arguments
- Fixed autocomplete position detection at end of SQL strings
- Improved named argument filtering for
glue_sql()functions
🔧 Code Quality
- Refactored SQL region detection into shared utility (
sqlRegionFinder.ts) - Eliminated ~200 lines of duplicated code
- Unified background highlighting and semantic token provider logic
📦 Installation
Download duckdb-r-editor-0.7.0.vsix and install via:
Positron: Extensions → ... → Install from VSIX
Full Changelog: v0.6.0...v0.7.0
Code Quality & Maintainability
Improvements
- Major refactoring: Removed duplicate code
- New utilities: Created 4 utility modules for validation, error handling, R code
templates, and constants - R code organization: Centralized all R code patterns into
rCodeTemplates.tsfor
better maintainability - Build automation: Added Makefile with common development tasks
- Documentation: Moved development docs to
docs/DEVELOPMENT.md
Bug Fixes
- Fixed R identifier validation regex (now correctly rejects
.123) - Fixed JSON escaping in function refresh template
- Fixed 6 ESLint issues (curly braces, unused imports, unnecessary escapes)
- Replaced magic number hack with labeled break statement
- Renamed misleading constant
BACKGROUND_COLOR→ENABLE_BACKGROUND_COLOR
Internal Changes
- Consolidated SQL keywords to single source
- Removed unused methods from
documentCache.tsandcompletionProvider.ts - Added type safety to error handlers
- Updated all files to use centralized constants
v0.6.2 - Bug Fixes and Quality Improvements
Bug Fixes
SQL Diagnostics False Positives
- Fixed backward quote search incorrectly detecting SQL strings across
unrelated code blocks - Added position validation to ensure cursor is within detected string
range - Resolves false "unmatched parentheses" errors on non-SQL code after SQL
functions
Background Highlighting
- Multi-line SQL strings no longer highlight leading whitespace on
continuation lines - Background now starts at first non-whitespace character for cleaner
appearance
New Features
Independent Background Color Control
- New setting:
duckdb-r-editor.enableSQLBackgroundColor - Toggle background highlighting separately from keyword/function
highlighting - Allows customization: keywords only, background only, both, or neither
Code Quality
- Extract SQL_FUNCTION_PATTERN regex to class constant (performance)
- Extract MAX_SQL_STRING_LOOKAHEAD_LINES magic number (clarity)
- Add bounds checking for quote positions (defensive programming)
- Extract theme colors to named constants (maintainability)
All changes are backward compatible. No migration required.
Note: GitHub doesn't auto-populate from git tag annotations - you have to
manually paste them. Alternatively, you can use the GitHub CLI:
gh release create v0.6.2 duckdb-r-editor-0.6.2.vsix --title
v0.6.1 - Security Update
✅ Testing & Verification
- ✅ Compiles successfully
- ✅ Extension packages successfully
- ✅ All existing functionality preserved
- ✅ Backward compatible (only rejects invalid names)
- ✅ Ready for VS Code Marketplace publication
Upgrade Notes
This is a mandatory security update. No configuration
changes required.
If you see errors about invalid connection names after
upgrading:
- Your R connection object has an unusual name
- Rename it to follow R identifier rules: start with
letter, use only letters/numbers/dots/underscores - Example: rename
`my-connection`to
my_connection
Security Audit
- Last Audit: 2026-01-21
- Runtime Vulnerabilities: None (known)
- Development Vulnerabilities: Not applicable (tar
package only affects npm install)
For security questions or to report vulnerabilities:
https://github.com/h-a-graham/duckdb-r-editor/security
📦 Installation
Download the .vsix file from the Assets section below
and install via:
- Positron → Extensions →
...→ Install from VSIX - Or use:
code --install-extension duckdb-r-editor-0.6.1.vsix