Hi everyone,
NetLogo is a niche programming language, partly because many users don’t publish their work on public
Git platforms like
GitHub or
GitLab.
Even when they do, language detection tools on these platforms often fail to recognize NetLogo files, especially the various extensions used across the ecosystem. I've been working on improving support for the
.nls extension on GitHub, but full coverage isn’t there yet (see this
PR to learn more).
A simple workaround is to add a
.gitattributes file to the root of your repository. This helps the platform understand which files belong to NetLogo. Doing this ensures your project is correctly identified, and it increases NetLogo’s visibility in language statistics across platforms. If you publish NetLogo code, please include one.
Here’s a minimal configuration you can use when publishing on GitHub:
*.nls linguist-detectable
*.nlogo linguist-detectable
*.nlogo3d linguist-detectable
*.nlogox linguist-detectable
*.nlogox3d linguist-detectable
*.nls linguist-language=NetLogo
*.nlogo linguist-language=NetLogo
*.nlogo3d linguist-language=NetLogo
*.nlogox linguist-language=NetLogo
*.nlogox3d linguist-language=NetLogoA practical example can be seen
here.
For GitHub, the documentation about this detection can be found
here.
If you want to see better support for NetLogo, this is a small but effective way to contribute.
Cheers,
Daniel Vartanian