Skip to content

ref snippet autocomplete adds extra placeholder text that must be deleted before model selection works #1787

@shreyastelkar

Description

@shreyastelkar

Environment

  • Platform: GitHub Codespaces
  • dbt Power User version: [latest]

Problem

Autocompleting ref inserts extra curly braces and displays {{ {{ ref('my_model') }} }} instead of {{ ref('my_model') }}.

Expected behavior

Typing out {{ ref( or {{ ref(' triggers the modal to select an available model as expected, and inserts the ref correctly.

Actual behavior

Using the ref snippet autocomplete adds an extra pair of curly braces around the entire expression:

  • Expected: {{ ref('my_model') }}
  • Actual: {{ {{ ref('my_model') }} }}

Workaround

Type out {{ ref(' manually instead of using the ref snippet autocomplete.

Steps to reproduce

  1. Open a dbt model file in GitHub Codespaces
  2. Type ref and select the snippet from autocomplete
  3. Select a model from the autocomplete list
  4. Observe extra curly braces wrapping the entire expression

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions