benknoble / vim-racket

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

Shebang filetype detection is poor #5

Open benknoble opened 2 years ago

benknoble commented 2 years ago

Files like the following get ft=conf.

#! /usr/bin/env racket
#lang racket

Using ; vim: ft=racket helps, but fails to correctly load https://github.com/benknoble/vim-sexp (some mappings are loaded, but not all: mostly those from https://github.com/tpope/vim-sexp-mappings-for-regular-people are missing). I think this is a separate issue, one that may be fixed by change the default g:sexp_filetypes.

But for shebang-filetype detection, we probably need to use a scripts.vim without somehow re-inventing all the work in ftdetect/racket.vim

benknoble commented 1 year ago

I think I've fixed the sexp-mappings issue by adding a racket ftplugin that calls for those mappings.

benknoble commented 1 year ago

But I still need to fix sexp-mappings-for-regular-people

benknoble commented 1 year ago

I think I did fix sexp-mappings-for-regular-people?


Nevertheless, I shouldn't have to write ; vim: ft=racket.