withastro / language-tools

Language tools for Astro
MIT License
240 stars 45 forks source link

🐛 BUG: Disable useless emmet abbreviation when trying to reference variables from script. #834

Closed jamesmcl113 closed 3 months ago

jamesmcl113 commented 3 months ago

Describe the Bug

I've setup the Astro LS and it's working nicely. However, when writing JSX in a .astro file I get an annoying emmet abbreviation completion when I'm trying to reference a name from the script section of the file. Image below shows the completion:

Screenshot 2024-03-16 at 18 37 13

If I select the completion, it just pastes in the name without curly braces. It's pretty annoying since it's always the first completion that appears in the list. I'd like to disable this without disabling emmet for the whole language server if possible.

Steps to Reproduce

  1. npm init astro using template
  2. Setup astro-ls for neovim
  3. Create a .astro file with a variable in the script section
  4. Begin typing name from the script section in HTML + JS section
  5. Annoying emmet abbreviation auto-complete options appears