You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, these tools aren't integrated with the IDE in any meaningful way. They also show the wordcount in the global status bar, which is already overloaded and -- especially in Positron, due to the Console -- some distance from the document whose words are being enumerated.
In this way, it's a bit like spell check -- see #1485.
Word counting can be pretty difficult due to the language-specific context around what counts as a word and what doesn't. I would propose that, as part of our effort to make Positron a first-class environment for scientific authoring, we:
Create an API that extensions can use to supply a word count, using the typical *Provider model used to supply other language features. This would be easiest to add to the Positron LSP extensions since they are the right place to efficiently update the word count as the document mutates, without needing to do a full re-scan in most cases.
Possibly display the word count, if available, in the editor surface in a small status bar or similar.
Another possibility would be to add an API more generally for contributing to a small status bar that lives on the bottom of the editor.
There are a few tools already to help count words in Quarto documents.
https://github.com/yunier-olivera/markdown-quarto-word-count
https://github.com/andrewheiss/quarto-wordcount
And there's a word count add-in from Microsoft that counts words in Markdown documents.
https://marketplace.visualstudio.com/items?itemName=ms-vscode.wordcount
However, these tools aren't integrated with the IDE in any meaningful way. They also show the wordcount in the global status bar, which is already overloaded and -- especially in Positron, due to the Console -- some distance from the document whose words are being enumerated.
In this way, it's a bit like spell check -- see #1485.
Word counting can be pretty difficult due to the language-specific context around what counts as a word and what doesn't. I would propose that, as part of our effort to make Positron a first-class environment for scientific authoring, we:
*Provider
model used to supply other language features. This would be easiest to add to the Positron LSP extensions since they are the right place to efficiently update the word count as the document mutates, without needing to do a full re-scan in most cases.Another possibility would be to add an API more generally for contributing to a small status bar that lives on the bottom of the editor.
(originally via slack: https://positpbc.slack.com/archives/C05M2EZCPGR/p1718716125891049)
(interesting project via @hadley: state machine for word counting https://github.com/robertdavidgraham/wc2)
The text was updated successfully, but these errors were encountered: