Open FilConscious opened 4 months ago
Are you able to provide an .astro
file that reproduces this issue?
I'm running into this as well, I believe the tree-sitter-astro
changed in a way that the queries don't work.
This errors pops up for me from the most basic of astro files :
---
interface Props {
title: string;
}
const { title } = Astro.props;
---
<!doctype html>
<html lang="en" data-theme="pastel">
<head>
<meta charset="UTF-8" />
<meta name="description" content="Astro description" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body class="scroll-smooth">
<slot />
</body>
</html>
Same here, even with the placeholder index.astro
---
// Welcome to Astro! Everything between these triple-dash code fences
// is your "component frontmatter". It never runs in the browser.
console.log('This runs in your terminal, not the browser!');
---
<!-- Below is your "component template." It's just HTML, but with
some magic sprinkled in to help you build great templates. -->
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>
<style>
h1 {
color: orange;
}
</style>
Does anyone have any workarounds?
Hi Sorixelle,
Thanks a lot for the package. I have followed your installation instructions without any errors, specifically:
treesit-install-language-grammar
When I open a
.astro
file the major mode is not detected (it remainsFundamental
in the mode line) but it is activated if I doM-x astro-ts-mode
(I see the change in the mode line). However, no code is highlighted and tree-sitter throws the error below:Any help would be really appreciated.