linguist
linguist copied to clipboard
Add support for `.nls` extension in NetLogo
Description
Hi there,
I’d like to propose adding the .nls extension to the NetLogo language in linguist. This is an official NetLogo file type, but it's currently missing from languages.yml.
I've added heuristics to differentiate .nls files as NetLogo, TeX, or INI. Each pattern was tested individually, and all of them return results associated with the extension.
Thanks for considering this!
Checklist:
- [x] I am adding a new extension to a language.
- [x] The new extension is used in hundreds of repositories on GitHub.com
- Search results for each extension:
-
.nls(All | ~5.5k files): https://github.com/search?q=NOT+is%3Afork+path%3A*.nls&type=code&utf8=%E2%9C%93 -
.nls(NetLogo patterns | ~2k files): https://github.com/search?q=NOT+is%3Afork+path%3A*.nls+%2F%5E%5Cs*%28%3F%3A%3B%7Cto%5Cs%2B%5B%5Cw-%5D%2B%7Cto-report%5Cs%2B%5B%5Cw-%5D%2B%7C%28%3F%3A__includes%7Cextensions%7Cglobals%7Cturtles-own%7Cpatches-own%7Clinks-own%7Cundirected-link-breed%7Cdirected-link-breed%29%5Cs%2B%5C%5B%7Cask%5Cs%2B%5B%5Cw-%5D%2B%5Cs%2B%5C%5B%29%2F&type=code&utf8=%E2%9C%93 -
.nls(TeX patterns | 187 files): https://github.com/search?q=NOT+is%3Afork+path%3A*.nls+%2F%5E%5Cs*%28%3F%3A%25%7C%5C%5C%28%3F%3Abegin%7Cnomgroup%7Citem%7Cend%29%29%2F&type=code&utf8=%E2%9C%93 -
.nls(INI patterns NOT TeX NOT NetLogo | ~2.7k files): https://github.com/search?q=NOT+is%3Afork+path%3A*.nls+%2F%5E%5Cs*%28%3F%3A%5B%5Cw-%5D%2B%5Cs*%3D%7C%28%3F%3ASTRINGTABLE%7CLOCALE_%7CLGRPID_%29%29%2F+NOT+%2F%5E%5Cs*%28%3F%3A%25%7C%5C%5C%28%3F%3Abegin%7Cnomgroup%7Citem%7Cend%29%29%2F+NOT+%2F%5E%5Cs*%28%3F%3A%3B%7Cto%28%3F%3A%5Cs%2B%7C-%29%5B%5Cw-%5D%2B%7C%28%3F%3A__includes%7Cextensions%7Cglobals%7Cturtles-own%7Cpatches-own%7Clinks-own%7Cundirected-link-breed%7Cdirected-link-breed%29%5Cs%2B%5C%5B%7Cask%5Cs%2B%5B%5Cw-%5D%2B%5Cs%2B%5C%5B%29%2F&type=code&utf8=%E2%9C%93%3E -
.nls(NOT NetLogo | ~3.5K files): https://github.com/search?q=NOT+is%3Afork+path%3A*.nls+NOT+%2F%5E%5Cs*%28%3F%3A%3B%7Cto%5Cs%2B%5B%5Cw-%5D%2B%7Cto-report%5Cs%2B%5B%5Cw-%5D%2B%7C%28%3F%3A__includes%7Cextensions%7Cglobals%7Cturtles-own%7Cpatches-own%7Clinks-own%7Cundirected-link-breed%7Cdirected-link-breed%29%5Cs%2B%5C%5B%7Cask%5Cs%2B%5B%5Cw-%5D%2B%5Cs%2B%5C%5B%29%2F&type=code&utf8=%E2%9C%93%3E
-
- Search results for each extension:
- [x] I have included a real-world usage sample for all extensions added in this PR:
- Sample source(s):
-
show-values.nls(NetLogo): https://github.com/danielvartan/nlogo-utils/blob/48a61c93da6d8469703b36540abe9b81c6b373b1/nlogo/show-values.nls -
setup-procedures.nls(NetLogo): https://github.com/comses/megadapt/blob/6230bb4710ed4326e1298edf4788d8fb84bcbf20/src/netlogo/setup-procedures.nls#L81 -
myThesis.nls(TeX): https://github.com/jiec827/njustThesis/blob/bc30a8096b649a79367aa2f0ba29534401463705/myThesis.nls#L4 -
main.nls(TeX): https://github.com/ShevonKuan/Engineering-mechanics/blob/c80e4ee494bd9fed191ed590e07e7748d560d666/main.nls#L4 -
ena.nls(INI): https://github.com/kode54/wine/blob/503f5fa59579965eea984b09bb3f72ce03a2bf93/dlls/kernel32/nls/ena.nls#L4 -
settings.nls(INI): https://github.com/Briclyaz/NLSound_module_QCom/blob/11a0eefd0a3b275493080e29862f9d61ef31e12d/settings.nls#L2
-
- Sample license(s):
-
show-values.nls(NetLogo): CC0 1.0 Universal (https://github.com/danielvartan/nlogo-utils?tab=CC0-1.0-1-ov-file) -
setup-procedures.nls(NetLogo): GNU General Public License v3 (https://github.com/comses/megadapt?tab=GPL-3.0-1-ov-file) -
myThesis.nls(TeX): GNU General Public License v2 (https://github.com/jiec827/njustThesis?tab=GPL-2.0-1-ov-file) -
main.nls(TeX): GNU General Public License v3 (https://github.com/ShevonKuan/Engineering-mechanics?tab=GPL-3.0-1-ov-file) -
ena.nls(INI): GNU Lesser General Public License v2.1 (https://github.com/kode54/wine?tab=LGPL-2.1-3-ov-file) -
settings.nls(INI): GNU General Public License v2 (https://github.com/Briclyaz/NLSound_module_QCom?tab=GPL-2.0-1-ov-file)
-
- Sample source(s):
- [x] I have included a change to the heuristics to distinguish my language from others using the same extension.
- [x] The new extension is used in hundreds of repositories on GitHub.com
Hi @lildude,
Thanks for pointing out the issue.
I've added heuristics to distinguish .nls files as NetLogo, TeX, or INI, along with two sample files for each type. I also updated the PR description and the checklist sections.
Let me know if any further changes are needed.