Skip to content

Parsing Documentation Strings Line By Line #46

@natdm

Description

@natdm

Forgive me if this is a neovim specific issue, though I don't think it is --

The comment parsing in elixir seems to be done by block instead of by line. This makes it harder to do parsing in comments that go line by line. I understand this is a functionality I'm using in neovim, but it could just as easily be used in another client, like a treesitter-js client.

Here's an example:
Elixir: https://ibb.co/G7QK5Hr

Comments show up as a block of quoted_context. This makes it difficult to use treesitter to parse where things like the examples may be.

Here's an example with Rust using line-by-line comment parsing, and you can use TS to parse each one to see if there may be code in the comment: https://ibb.co/XtKFjFL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions