Treewalker is not able to move upwards if cursor is on a closed html tag inside .tsx (and probably .jsx as well) files
https://github.com/user-attachments/assets/28e4f527-3746-4d0f-b605-a72622d4a387
code to reproduce:
export function ArticlePage() {
return (
<div className="article-page">
<ArticleView />
<ArticleComments />
</div>
);
}
function ArticleView() {
const { articlePromise } = useLoaderData<ArticlePageLoaderData>();
return (
<Suspense fallback={<Spinner />}>
<Await resolve={articlePromise} errorElement={<ArticleContentError />}>
{(articleData) => <ArticleContent article={articleData.article} />}
</Await>
</Suspense>
);
}
type ArticleContentProps = {
article: SingleArticleResponse['article'];
};
function ArticleContent({ article }: ArticleContentProps) {
const { title, body, tagList } = article;
return (
<>
<div className="banner">
<div className="container">
<h1>{title}</h1>
<ArticleActionsBlock article={article} />
</div>
</div>
<div className="container page">
<div className="row article-content">
<div className="col-md-12">
<p>{body}</p>
{tagList.length > 0 && (
<ul className="tag-list">
{tagList.map((tag) => (
<li key={tag} className="tag-default tag-pill tag-outline">
{tag}
</li>
))}
</ul>
)}
</div>
</div>
<hr />
<div className="article-actions">
<ArticleActionsBlock article={article} />
</div>
</div>
</>
);
}
Can you please post your config to all of these issues?
Your example here is not meant to work - it treats the closing tag as the opening tag, and there's nothing above this to move to. If you added another tag above this, I suspect it'd jump to it
okay, apparently while i opened this issues at night i literally confused % builtin from nvim itself with the treesitter parser, yes it should not go up, this is hilarious, thanks!
Hah all good. Thanks again for all the issues! They really help to make the plugin more solid 🤘