]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1080: filetype: Mill files are not recognized v9.1.1080
authorChris Kipp <ckipp@pm.me>
Thu, 6 Feb 2025 20:26:08 +0000 (21:26 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 6 Feb 2025 20:26:08 +0000 (21:26 +0100)
Problem:  filetype: Mill files are not recognized
Solution: detect '*.mill' files as scala filetype
          (author)

In the past [Mill](https://mill-build.org/mill/index.html) build files
were always `build.sc` and treated as Scala files. However as the 0.12.x
series of mill you can create a `build.mill` file. You can see a lot of
examples of this if you search
[GitHub](https://github.com/search?q=build.mill&type=code). This small
change just ensures that if you have a `*.mill` file it treats it as a
Scala file.

closes: #16585

Signed-off-by: Chris Kipp <ckipp@pm.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index d2ff662269407733f44f6411d20f9543d9987e90..dcb6130b32505547521bca9d0e18e6c419510a94 100644 (file)
@@ -2212,7 +2212,7 @@ au BufNewFile,BufRead *.sass                      setf sass
 au BufNewFile,BufRead *.sa                     call dist#ft#FTsa()
 
 " Scala
-au BufNewFile,BufRead *.scala                  setf scala
+au BufNewFile,BufRead *.scala,*.mill           setf scala
 
 " SBT - Scala Build Tool
 au BufNewFile,BufRead *.sbt                    setf sbt
index e5411af154f9cd54073d28e25e25280d7c635a2f..3dcc6652900e92f04785d1c388ea1aa5e28482cc 100644 (file)
@@ -674,7 +674,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     sas: ['file.sas'],
     sass: ['file.sass'],
     sbt: ['file.sbt'],
-    scala: ['file.scala'],
+    scala: ['file.scala', 'file.mill'],
     scheme: ['file.scm', 'file.ss', 'file.sld', 'file.stsg', 'any/local/share/supertux2/config', '.lips_repl_history'],
     scilab: ['file.sci', 'file.sce'],
     screen: ['.screenrc', 'screenrc'],
index 8fc6f602a7de299b52970aa9447f3c08017c8051..d8e8c0ea6f5dd64fe4195d3fbfebfd9383a25832 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1080,
 /**/
     1079,
 /**/