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

`@function.outer` should include annotation-comments preceding the function

Open
#409 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

Is your feature request related to a problem? Please describe.
When using daf or yaf, the annotation comments preceding the function are left over.

Describe the solution you'd like
Include the annotation comments for a function. Either as an option, or even by default.

Describe alternatives you've considered
Currently, I use something like vafokkkd which isn't really ideal.

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

The issue names no file or test. Start by locating the implementation and tests for the @function.outer text object, then inspect how preceding annotation comments are represented. Done means daf and yaf include those comments, with coverage for the requested behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.