Closed thanh-nguyen-95 closed 3 weeks ago
Seems to work fine for me:
https://github.com/user-attachments/assets/28200abb-ef85-415a-9746-6bd6ed5c3af8
It DOES work in VSCode with the official extension as I mentioned in the bug report.
I'm using Neovim with a plugin, which uses @astrojs/language-server
under the hood. I'm not sure why it stops working after I installed date-fns
so I created an issue to see if anyone else has this problem. I assume the VSCode extension also uses @astrojs/language-server
so it should work for me, but it's not.
I'm well aware this could be an edge case and could be solved by removing date-fns
. Please feel free to close this issue if there's no further update.
Ah apologies, I missed that part of the original post. Unfortunately, I barely have the time to debug VS Code issues, and so Neovim issues are insanely low priority. I'm sorry.
They do both use the same language server, there's only one LS for Astro
It's fine, really. This could very well be a problem with Neovim plugins that I'm using.
Thank you for taking your time and checking out my issue. I'll remove date-fns for now.
You can close this issue now. Thank you
Guys, I have the same issue. When I add package date-fns, it completely broke .astro files intellisense. When I remove date-fns package, it's working again.
I tried uninstall all other VSCode plugins and tried fresh astro project, but it's caused by the date-fns.
Recorded video to demonstrate the issue. When the date-fns is imported, only .astro files are broken.
https://github.com/user-attachments/assets/1745c393-fd2c-41d6-8676-55c0f30e9afd
@Princesseuh this should be re-open, I am using VSCode not Neovim.
I have the same issue.
I noticed that my VSCode astro intellisense was broken and found this Issue, so I uninstalled date-fns and it works fine.
I am using the latest version of Astro extension and VSCode.
OS: Windows 11 23H2 (22631.4112) IDE: Visual Studio Code 1.94.2 bun: 1.1.32 Astro Extension: 2.15.3 Astro version: 4.15.12
After the Astro VSCode plugin last update to v2.15.4 its working as expected for now.
Awesome. Could anyone else confirm?
Closing, since it seems like this is fixed. Let me know if it still happens.
Describe the Bug
Installing
date-fns
package makes Astro Language Server stops autocompletion on imports.Everything works as intended if I'm using VSCode with the latest Astro extension (2.15.2).
Additional info:
Steps to Reproduce
npm init astro
using default optionsnpm install date-fns
Link to Minimal Reproducible Example
https://github.com/thanh-nguyen-95/astro-ls-error-with-date-fns