language-tools
language-tools copied to clipboard
🐛 BUG: completions in components differ based on newlines and cursor position
Describe the Bug
Completions for astro components are not consistent and vary depending on newlines and the cursor position.
Problem occurs in TypeScript project.
Example 1:
<Code code="{}" lang="json" theme="one-dark-pro" />
🟢 Cursor position before closing tag:
🔴 Cursor Position one space before closing tag:
Example 2:
<Code code="{}" lang="json" theme="one-dark-pro" inline={true} />
🟢 Cursor Position one space before closing tag:
Example 3:
<Code
code="{}"
lang="json"
theme="one-dark-pro"
inline={true}
/>
🔴 Cursor Position in new line:
Steps to Reproduce
import { Code } from 'astro:components';- Insert component in astro page
- Try 3 jsx attributes inline and place the cursor at different positions
- Try 4 jsx attributes inline
- Try 4 jsx attributes multiline
- Unexpected/inconsistent completions
Hello! Thank you for reporting this issue. On what OS are you? I can't seems to be able to reproduce most of these, which I'm thinking could mean it's a Windows thing perhaps
astro info
Astro v3.4.3
Node v18.17.0
System macOS (arm64)
Package Manager pnpm
Output server
Adapter astro-sst
Integrations @astrojs/tailwind
its in .astro files