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
I'm working on a DSL that uses Scheme syntax, but I currently use a non-Scheme file extension to differentiate the files from normal Scheme code. It would be cool if I could tell tokei to treat those files as Scheme code, as the syntax is the same. As my DSL currently has approximatly one user (myself), it would be overly bold to add it as a Scheme extension inside languages.json. However, if I could extend a languages' extension list via the command line, I would be able to use tokei to count the amount of code in my DSL in my project without adding a niche language extension to the tokei codebase. I would suggest something like this (bikeshedding alert, the proposed option name is just a stand-in):
tokei --add-extension Scheme:bmx
When running tokei like this, it would classify .bmx files as Scheme code. What do you think about the general idea? If something like this is deemed a useful addition to the codebase, I might try my hand at a PR. This proposal is somewhat related to PR #1262; if the addition of the file extensions proposed in that PR would be deemed to be too niche to be added to language.json, the intent of the PR could still be fulfilled by using my proposed CLI extension.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a DSL that uses Scheme syntax, but I currently use a non-Scheme file extension to differentiate the files from normal Scheme code. It would be cool if I could tell
tokeito treat those files as Scheme code, as the syntax is the same. As my DSL currently has approximatly one user (myself), it would be overly bold to add it as a Scheme extension insidelanguages.json. However, if I could extend a languages' extension list via the command line, I would be able to usetokeito count the amount of code in my DSL in my project without adding a niche language extension to the tokei codebase. I would suggest something like this (bikeshedding alert, the proposed option name is just a stand-in):When running
tokeilike this, it would classify.bmxfiles as Scheme code. What do you think about the general idea? If something like this is deemed a useful addition to the codebase, I might try my hand at a PR. This proposal is somewhat related to PR #1262; if the addition of the file extensions proposed in that PR would be deemed to be too niche to be added tolanguage.json, the intent of the PR could still be fulfilled by using my proposed CLI extension.Beta Was this translation helpful? Give feedback.
All reactions