Open gridbugs opened 5 months ago
How about we just updated vim-ocaml to override this for dune.lock/foo.pkg? files. It doesn't seem like a good trade-off to add cruft to our stuff to satisfy the tiny fraction of users that use "Virata".
It's not about virata users. Vim comes with virata syntax highlighting out of the box so all vim users see the virata syntax highlighting when editing .pkg files.
I agree with Rudi, it's fairly easy to change vim-ocaml to support this.
It looks like vim comes with syntax highlighting for ocaml and dune files out of the box (checked by installing vim and neovim in an empty docker image). I just realized that I never installed syntax highlighting vim packages for ocaml on my machine. I wonder how many other ocaml developers never installed ocaml-vim.
Vim treats the .pkg file extension as "Virata AConfig Configuration Script Syntax" (https://www.vim.org/scripts/script.php?script_id=930). This leads to confusing highlighting E.g. the
%
character is treated as the start of a comment, and$VARIABLES
are highlighted as if only the first character is the variable, similar to in Makefiles.I propose that we change the extension to
.dune_pkg
to avoid this confusion.