diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-22 19:19:08 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-22 19:19:08 +0000 |
commit | 82b3b4c6cf2973fe767f8e2311482af0bd95267e (patch) | |
tree | 5a66a7fa1006c49ca4590044a475696abf308c00 /runtime | |
parent | 080182216e605df3428cc699b9fd7e761368d12f (diff) |
patch 8.2.3873: go.mod files are not recognizedv8.2.3873
Problem: go.mod files are not recognized.
Solution: Check for the file name. (closes #9380)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/filetype.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 7740d8faa4..bd1d2e9057 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1091,7 +1091,9 @@ au BufNewFile,BufRead *.mmp setf mmp " Modsim III (or LambdaProlog) au BufNewFile,BufRead *.mod - \ if getline(1) =~ '\<module\>' | + \ if expand("<afile>") =~ '\<go.mod$' | + \ setf gomod | + \ elseif getline(1) =~ '\<module\>' | \ setf lprolog | \ else | \ setf modsim3 | |