When I submitted the HLSL-language, I accidentally missed that the
first extension was the primary one (as is documented in the source
code, which I unfortunately missed), and instead alphabetized the
whole list.
The primary extension should be .hlsl, so let's remedy this.
Add support for DirectX HLSL / FX files. The FX files are
just HLSL files with some additional syntax to set
render-states and define multiple shader stages in one file.
Samples are either written by me, or taken from Chromium.
These samples were taken from the paper "Flux: A Language for
Programming High-Performance Servers", by Burns et al and Flux V0.02
which can be found here:
https://plasma.cs.umass.edu/emery/flux.1.html
GrammarKit is a plugin by JetBrains for creating custom language plugins
for JetBrains IDEs (such as IntelliJ, RubyMine, CLion and more). It
defines a BNF parser language which can be used to generate a parser in
Java, and it also integrates JFLex for generating a lexer in Java.
Both of these generated Java files can be recognised by a comment on the
first line of the file, and so classifying them as generated is trivial.
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
When using syntax extensions in stable or beta Rust channels using the syntex package, it is common to use the file extension .rs.in for the source file, and .rs for the generated file.