nvim-treesitter / nvim-treesitter/nvim-treesitter-textobjects

(comment) for global.

Open
#204 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Tree-sitter Query
Stars
2.8k
Forks
271
Avg merge
8d 8h
Merged PRs (30d)
1

Description

I found that comments in most languages can be queried with (comment),
Although only tested css, javascript, go, php, vue, I believe for comments, mostly the same (comment).

But now if want to add a query for (comment) for each language, you can only modify each file, which is tedious.

Is it possible to add a global filetype so that each language can apply the query inside.

图片

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is identified in the issue. Start by locating how comment queries are currently defined and selected for each language, then assess where a shared filetype query could be applied. Done means the comment query can be maintained once and used across the relevant languages without duplicating each language’s definition.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.