Open d1y opened 1 month ago
Upstream It looks like there are two externals export:
(((documentation_comment) @_documentation_block_comment
(#match? @_documentation_block_comment "^///\\s*\\S+")) @content
(#set! "language" "markdown"))
(((documentation_comment) @_block_comment
(#match? @_block_comment "^/\\*\\*\\s*\\S+\\s*\\*/")) @content
(#set! "language" "markdown"))
Work?
This will hand over all the text to Markdown
- xx
* xxx
/// - xxx <!-- prefix /// need remove? -->
/// [xxxx]
So. let's expose these two upstream?
I am really not familiar with tree sitter, and I would like to know if it is possible to use regex in injections.scm
?@maxbrunsfeld
Like this:
; TODO: impl this?
(((documentation_comment) @_documentation_block_comment
(#match? @_documentation_block_comment "^///\\s*(\\S+)\\s*$")) #group(1) @content ; get match group in `\\S+`
(#set! "language" "markdown"))
Note: I know Neovim seems to have a #offset directive
https://github.com/tree-sitter/tree-sitter/issues/1944#issuecomment-1302459754
Check for existing issues
Describe the feature
Docs: https://dart.dev/effective-dart/documentation#doc-comments
It seems a markdown: https://dart.dev/effective-dart/documentation#markdown
Zed:
VScode:
If applicable, add mockups / screenshots to help present your vision of the feature
No response