diff options
Diffstat (limited to 'runtime/lua/vim')
| -rw-r--r-- | runtime/lua/vim/filetype/detect.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua index 1b624b7022..1680c316bf 100644 --- a/runtime/lua/vim/filetype/detect.lua +++ b/runtime/lua/vim/filetype/detect.lua @@ -2162,6 +2162,10 @@ local function match_from_hashbang(contents, path, dispatch_extension) end end + if name == 'uv' and matchregex(first_line, [[\<uv run\>]]) then + return 'python' + end + -- If nothing matched, check the extension table. For a hashbang like -- '#!/bin/env foo', this will set the filetype to 'fooscript' assuming -- the filetype for the 'foo' extension is 'fooscript' in the extension table. |