Skip to content

Releases: belian-earth/duckdb-r-editor

v0.8.1 - Autocomplete Fix

10 Feb 23:47

Choose a tag to compare

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.R with diverse test cases

Documentation

  • Added Ctrl+Space tip 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

10 Feb 14:21
ad83fb2

Choose a tag to compare

✨ New Features

duckplyr Support

  • Autocomplete now works in read_sql_duckdb() and db_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
  • duckdb npm package moved to devDependencies (used only by make functions to 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 completionProvider being disposed twice on deactivation
  • Fixed diagnosticsProvider diagnostic collection not being disposed
  • Removed stale defaultExtensions config key and loadExtension command

🧹 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

27 Jan 01:01
83a6f47

Choose a tag to compare

✨ 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 in glue_sql() calls
  • Configurable Styles: Choose between standard, tabularLeft, or tabularRight formatting
  • 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

23 Jan 13:31

Choose a tag to compare

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.ts for
    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_COLORENABLE_BACKGROUND_COLOR

Internal Changes

  • Consolidated SQL keywords to single source
  • Removed unused methods from documentCache.ts and completionProvider.ts
  • Added type safety to error handlers
  • Updated all files to use centralized constants

v0.6.2 - Bug Fixes and Quality Improvements

22 Jan 14:01

Choose a tag to compare

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

21 Jan 12:04

Choose a tag to compare

✅ 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:

  1. Your R connection object has an unusual name
  2. Rename it to follow R identifier rules: start with
    letter, use only letters/numbers/dots/underscores
  3. 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:

  1. Positron → Extensions → ... → Install from VSIX
  2. Or use: code --install-extension duckdb-r-editor-0.6.1.vsix