aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2021-12-25 15:17:55 +0100
committerGitHub <noreply@github.com>2021-12-25 15:17:55 +0100
commit4f952249072851677b88740fc2e457b08bf24f59 (patch)
tree5a108063aa54bf53c3137310c89541188bfafe6a /runtime
parent3e81c1f9b5e37a3e62dfbf2938331993de064231 (diff)
downloadrneovim-4f952249072851677b88740fc2e457b08bf24f59.tar.gz
rneovim-4f952249072851677b88740fc2e457b08bf24f59.tar.bz2
rneovim-4f952249072851677b88740fc2e457b08bf24f59.zip
vim-patch:8.2.3873: go.mod files are not recognized (#16757)
Problem: go.mod files are not recognized. Solution: Check for the file name. (closes vim/vim#9380) https://github.com/vim/vim/commit/82b3b4c6cf2973fe767f8e2311482af0bd95267e
Diffstat (limited to 'runtime')
-rw-r--r--runtime/filetype.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 57aaeab766..8a705abd1c 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1087,7 +1087,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 |