benknoble / vim-racket

vim bundle for Racket
MIT License
23 stars 4 forks source link

Inclusion in Vim runtime #7

Open benknoble opened 2 years ago

benknoble commented 2 years ago

Based on a suggestion from @dkearns, it might be worth including this in the vim distribution.

What remains to be done for that to be possible?

dkearns commented 2 years ago

The file detection needs to be added as well. The autocmd would go in runtime/filetype.vim, the function in runtime/autoload/dist/ft.vim and tests in src/testdir/test_filetype.vim

I'll submit a PR here with the header additions later today.

benknoble commented 2 years ago

Ok, good to know. I should mention that the filetype detection will change somewhat radically; I've opted for an approach that says "Racket is an ecosystem of languages; rather than naïvely try to apply racket filetype settings to all the languages in the ecosystem, build an ecosystem for many filetype settings." That is, somethings are #lang racket-like, but others are very much not (#lang datalog, for example, really needs its own syntax), so they should have filetypes that are not racket.

Some people have complained and/or don't like it, but there are workarounds and fixes. For example, updating the mapping in this plugin, or extending/overriding it (I need to write docs…).

benknoble commented 2 years ago

"Change somewhat radically"—I mean from what currently exists in vim, not from how this plugin currently operates.

dkearns commented 2 years ago

Would it be worthwhile just including the racket filetype to start?

benknoble commented 2 years ago

Possibly—that would include the ftplugin, syntax, and indent for racket, but not the filetype detection bit or the related plugins for other #langs that have accumulated here.

benknoble commented 2 years ago

Linking PR #8

dkearns commented 1 year ago

https://github.com/benknoble/vim-racket/pull/10 handles Bram's recent comments on your submission.

Sorry, I always forget to add that boiler plate. Vim9 script does away with the need for that.