* Add detectable key to languages
This key allows to override the language being included in the
language stats of a repository.
* Make detectable override-able using .gitattributes
* Mention `linguist-detectable` in README
* Remove detectable key from languages
Reverts changes in 0f7c0df5.
* Update commit hash to the one that was merged
PR #3806 changed the commit hash. The original commit was not
actually merged into the test/attributes branch.
* Fix check to ensure detectable is defined
* Add include in language stats tests when detectable set
* Ignore detectable when vendored, documentation or overridden
* Add documentation on detectable override in README
* Improve documentation on detectable override in README
* Add more troubleshooting info
* Add more updates
* A lot more words and reformatting
* Few more tweaks
* Add how it works on GitHub.com
* More clarifications
* Feedback tweaks
* Add missing run
* Learn grammar
TLDR: This greatly increases the flexibility of vim modeline detection
to manually set the language of a file.
In vim there are two forms of modelines:
[text]{white}{vi:|vim:|ex:}[white]{options}
examples: 'vim: syntax=perl', 'ex: filetype=ruby'
-and-
[text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text]
examples: 'vim set syntax=perl:', 'Vim: se ft=ruby:'
As you can see, there are many combinations. These changes should allow
most combinations to be used. The two most important additions are the
use of the keyword 'syntax', as well as the addition of the first form
(you now no longer need to use the keyword 'set' with a colon at the end).
The use of first form with 'syntax' is very, very common across GitHub:
https://github.com/search?l=ruby&q=vim%3A+syntax%3D&ref=searchresults&type=Code&utf8=%E2%9C%93
Documentation is an important part of a software project but is not
generally thought of as part of the code for that project. Repository
language statistics are used to quantify the project's code, so it makes
sense to exclude documentation from those computations.
Documentation files are recognized similarly to vendored files.
lib/linguist/documentation.yml contains regular expressions to match
common names for documentation files. A new linguist-documentation Git
attribute can be used to override those conventions.
* origin/master: (97 commits)
Modifying some modeline fixtures to test case InSeNsItivitY
Making modelines case-insensitive
Missing whitespace
Vim and Emacs modelines
Update README.md
Update URL for AutoHotkey grammar
Remove grammar for AutoHotkey
Bumping version to v4.3.1
Grammar update
'Text' doesn't qualify as a valid modeline language.
Add .4TH Forth extension.
Grammar for eC from TextMate bundle
Sample for eC
Grammar for Ox from Sublime Text package
Grammar for Grace from TextMate bundle
Grammar for G-Code from Sublime Text package
Grammar for TXL from Sublime Text package
Grammar for J from Sublime Text package
Sample for J
Grammar for Golo from Sublime Text package
...
Conflicts:
README.md