patch 9.1.1042: filetype: just files are not recognized Commit: https://github.com/vim/vim/commit/72755b3c8e91ec90447969b736f080e0de36003d Author: Peter Benjamin <petermbenja...@gmail.com> Date: Mon Jan 20 21:56:41 2025 +0100
patch 9.1.1042: filetype: just files are not recognized Problem: filetype: just files are not recognized Solution: adjust filetype detection pattern, detect just shebang line, include just ftplugin, indent and syntax plugin (Peter Benjamin) closes: #16466 Signed-off-by: Peter Benjamin <petermbenja...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 6052197de..9874dc7ac 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -208,6 +208,7 @@ runtime/ftplugin/json.vim @dbarnett runtime/ftplugin/json5.vim @dkearns runtime/ftplugin/jsonc.vim @izhakjakov runtime/ftplugin/julia.vim @carlobaldassi +runtime/ftplugin/just.vim @pbnj runtime/ftplugin/jq.vim @vito-c runtime/ftplugin/kconfig.vim @chrisbra runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo @@ -354,6 +355,7 @@ runtime/indent/javascript.vim @bounceme runtime/indent/json.vim @elzr runtime/indent/jsonc.vim @izhakjakov runtime/indent/julia.vim @carlobaldassi +runtime/indent/just.vim @pbnj runtime/indent/kdl.vim @imsnif @jiangyinzuo runtime/indent/kotlin.vim @udalov runtime/indent/krl.vim @KnoP-01 @@ -512,6 +514,7 @@ runtime/syntax/jjdescription.vim @gpanders runtime/syntax/json.vim @vito-c runtime/syntax/jsonc.vim @izhakjakov runtime/syntax/julia.vim @carlobaldassi +runtime/syntax/just.vim @pbnj runtime/syntax/jq.vim @vito-c runtime/syntax/karel.vim @kirillmorozov runtime/syntax/kconfig.vim @chrisbra diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim index 33ed7fd2f..859126f0f 100644 --- a/runtime/autoload/dist/script.vim +++ b/runtime/autoload/dist/script.vim @@ -4,7 +4,7 @@ vim9script # Invoked from "scripts.vim" in 'runtimepath' # # Maintainer: The Vim Project <https://github.com/vim/vim> -# Last Change: 2023 Aug 10 +# Last Change: 2025 Jan 20 # Former Maintainer: Bram Moolenaar <b...@vim.org> export def DetectFiletype() @@ -133,6 +133,9 @@ export def Exe2filetype(name: string, line1: string): string elseif name =~ 'node\(js\)\=\>\|js\>' || name =~ 'rhino\>' return 'javascript' + elseif name =~# 'just' + return 'just' + # BC calculator elseif name =~ '^bc\>' return 'bc' diff --git a/runtime/filetype.vim b/runtime/filetype.vim index f9d189f63..6b323bd82 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: The Vim Project <https://github.com/vim/vim> -" Last Change: 2025 Jan 15 +" Last Change: 2025 Jan 20 " Former Maintainer: Bram Moolenaar <b...@vim.org> " Listen very carefully, I will say this only once @@ -1292,7 +1292,7 @@ au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet au BufNewFile,BufRead *.jl setf julia " Just -au BufNewFile,BufRead [jJ]ustfile,.justfile,*.just setf just +au BufNewFile,BufRead -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1tZysS-007sv7-Hj%40256bit.org.