[VSCE] [Bug] ref/source autocomplete doesn't trigger when editing existing code, and requires typing opening quote first (works differently in Studio)
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this a new bug in the VS Code extension?
- [x] I believe this is a new bug in the VS Code extension, not the dbt Fusion CLI
- [x] I have searched the existing issues and could not find a duplicate
### Current Behavior
In the VS Code extension, ref/source autocomplete has a gap compared to Studio's behavior:
Autocomplete requires the opening single quote (') to already be typed before it triggers. In Studio, you can trigger the same completion list by typing inside ref( before any quote is entered — the quote gets inserted automatically as part of accepting the completion.
https://github.com/user-attachments/assets/83e5a5f7-ab85-4813-a170-8c83e4663fc5
Additionally, in both VSCE and Studio IDE:
Autocomplete only reliably triggers when a ref()/source() call is being typed net-new. Placing the cursor back inside an already-written ref('...') or source('...') call to edit the model/source name does not reliably bring up the completion list.
### Expected Behavior
Clicking/placing the cursor inside an existing ref()/source() argument should trigger the completion list, the same as when typing it for the first time.
Completion should trigger as soon as the cursor is inside the parens, without requiring the opening quote to be typed manually first, matching Studio's behavior.
### Troubleshooting
_No response_
### Steps To Reproduce
1. In a model file, write a line with an existing ref('some_model') call and save
2. Place the cursor inside the quotes to edit the model name — note autocomplete does not reliably appear
3. On a new line, type ref( and, without typing a ', start typing a model name — note no completion list appears until the quote is typed manually
### Relevant log output
```shell
```
### Environment
```markdown
Data Platform: Snowflake
dbt Version: Fusion Latest
```
### Which area of the extension is affected?
IntelliSense / SQL validation / go-to-definition / references
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.