From 571b50be16a0bb859082196ac1a80872526314cb Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 17 Mar 2023 09:42:33 +0100 Subject: [PATCH] vim-patch:9.0.1409: racket files are recognized as scheme Problem: Racket files are recognized as scheme. Solution: Recognize rackets files separately. (Gabriel Kakizaki, closes vim/vim#12164, closes vim/vim#12162) https://github.com/vim/vim/commit/d11ac403db07b6eac43882485e98caeb5e83e2e5 Co-authored-by: Gabriel Kakizaki --- runtime/lua/vim/filetype.lua | 6 +++--- test/old/testdir/test_filetype.vim | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index f5353b853d..b777eaa179 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -838,6 +838,9 @@ local extension = { R = function(path, bufnr) return require('vim.filetype.detect').r(bufnr) end, + rkt = 'racket', + rktd = 'racket', + rktl = 'racket', rad = 'radiance', mat = 'radiance', ['pod6'] = 'raku', @@ -910,9 +913,6 @@ local extension = { ss = 'scheme', scm = 'scheme', sld = 'scheme', - rkt = 'scheme', - rktd = 'scheme', - rktl = 'scheme', sce = 'scilab', sci = 'scilab', scss = 'scss', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index ece1284df4..6635458ee6 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -476,6 +476,7 @@ let s:filename_checks = { \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'], \ 'quarto': ['file.qmd'], \ 'r': ['file.r', '.Rprofile', 'Rprofile', 'Rprofile.site'], + \ 'racket': ['file.rkt', 'file.rktd', 'file.rktl'], \ 'radiance': ['file.rad', 'file.mat'], \ 'raku': ['file.pm6', 'file.p6', 'file.t6', 'file.pod6', 'file.raku', 'file.rakumod', 'file.rakudoc', 'file.rakutest'], \ 'raml': ['file.raml'], @@ -514,7 +515,7 @@ let s:filename_checks = { \ 'sather': ['file.sa'], \ 'sbt': ['file.sbt'], \ 'scala': ['file.scala'], - \ 'scheme': ['file.scm', 'file.ss', 'file.sld', 'file.rkt', 'file.rktd', 'file.rktl'], + \ 'scheme': ['file.scm', 'file.ss', 'file.sld'], \ 'scilab': ['file.sci', 'file.sce'], \ 'screen': ['.screenrc', 'screenrc'], \ 'scss': ['file.scss'],