diff options
author | Omar El Halabi <omar.el.halabi@freiheit.com> | 2023-05-29 19:59:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-29 19:59:45 +0100 |
commit | c9fbd2560f24180d2efa40028ed68427341d2d99 (patch) | |
tree | e5d77e56c8a6eacabfdd5624918642b7c0198077 /runtime | |
parent | 247caa378fc1121c99ecc594fab024691a6d7a9b (diff) |
patch 9.0.1591: some "gomod" files are not recognizedv9.0.1591
Problem: Some "gomod" files are not recognized.
Solution: Check for "go.mod" file name before checking out the contents.
(Omar El Halabi, closes #12462)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/dist/ft.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 7ac053eb2f..770f7066c3 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -484,14 +484,14 @@ enddef export def FTmod() if exists("g:filetype_mod") exe "setf " .. g:filetype_mod + elseif expand("<afile>") =~ '\<go.mod$' + setf gomod elseif IsLProlog() setf lprolog elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)' setf modula2 elseif IsRapid() setf rapid - elseif expand("<afile>") =~ '\<go.mod$' - setf gomod else # Nothing recognized, assume modsim3 setf modsim3 |