From c96947b1c64c56f70125a9bac9c006f69e45d5d3 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 1 Jan 2022 18:34:50 +0100 Subject: Update --- autoload/polyglot/detect.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'autoload/polyglot/detect.vim') diff --git a/autoload/polyglot/detect.vim b/autoload/polyglot/detect.vim index cac826cf..2b1900e6 100644 --- a/autoload/polyglot/detect.vim +++ b/autoload/polyglot/detect.vim @@ -134,6 +134,18 @@ func! polyglot#detect#Fs(...) set ft=forth | return endfunc +func! polyglot#detect#Frag(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '\s*\(#version\|precision\|uniform\|varying\|vec[234]\)' + set ft=glsl | return + endif + endfor +endfunc + func! polyglot#detect#Re(...) if a:0 != 1 && did_filetype() return -- cgit v1.2.3