-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add todo.txt tree-sitter #7835
Conversation
languages.toml
Outdated
[[language]] | ||
name = "todotxt" | ||
scope = "text.todotxt" | ||
file-types = ["todo.txt", "todotxt"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file-types = ["todo.txt", "todotxt"] | |
file-types = [".todo.txt"] |
This should work to catch .todo.txt
files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried it and test.todo.txt
was not recognised.
as far as im aware this is not fixable without changing the recognition code since it checks the extension first (docs) and only checks other methods if it dosnt match (and .txt
is the extension)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, I was thinking that .todo.txt
was the full filename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use suffix
here, I think that should catch test.todo.txt
:
file-types = [{ suffix = ".todo.txt"}, "todotxt"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that worked. pushed a new commit
Add support for todo.txt (docs, website).
Since i often use todo.txt for organizing and markdown is already included i wanted to offer upstreaming my config.
The official file extension is
.todo.txt
, but that doesn't work with helix (and a bunch of other editors) due to the recognition prioritization, therefore i also added the alternative.todotxt
extension.This uses the same tree-sitter as neovim.