diff options
author | Christian Clason <c.clason@uni-graz.at> | 2025-02-06 21:52:27 +0100 |
---|---|---|
committer | Christian Clason <ch.clason+github@icloud.com> | 2025-02-06 23:23:58 +0100 |
commit | 5f54f03285964d355744f0fdfca796b2d73af1d1 (patch) | |
tree | 4b048776677b6acba6b5b6d51f6b24ecf06ca2f8 | |
parent | 6db830e40e92dd61cd62d3e0bb5296e8b600cc18 (diff) | |
download | rneovim-5f54f03285964d355744f0fdfca796b2d73af1d1.tar.gz rneovim-5f54f03285964d355744f0fdfca796b2d73af1d1.tar.bz2 rneovim-5f54f03285964d355744f0fdfca796b2d73af1d1.zip |
vim-patch:9.1.1080: filetype: Mill files are not recognized
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: vim/vim#16585
https://github.com/vim/vim/commit/9c8f9b10fcb177fb07684626b49118dd2d2540b5
Co-authored-by: Chris Kipp <ckipp@pm.me>
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index cc7358ee49..5aaa3f053b 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1074,6 +1074,7 @@ local extension = { sass = 'sass', sbt = 'sbt', scala = 'scala', + mill = 'scala', ss = 'scheme', scm = 'scheme', sld = 'scheme', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 9398cea786..384bc8d8b3 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -671,7 +671,7 @@ func s:GetFilenameChecks() abort \ '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'], |