Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: vim highlights dune lockfiles as if they were virata config files #10404

Open
gridbugs opened this issue Apr 8, 2024 · 4 comments
Open

Comments

@gridbugs
Copy link
Collaborator

gridbugs commented Apr 8, 2024

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.

@rgrinberg
Copy link
Member

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".

@gridbugs
Copy link
Collaborator Author

gridbugs commented Apr 9, 2024

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.

@emillon
Copy link
Collaborator

emillon commented Apr 17, 2024

I agree with Rudi, it's fairly easy to change vim-ocaml to support this.

@gridbugs
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants