diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2022-01-01 18:34:50 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2022-01-01 18:34:50 +0100 |
commit | c96947b1c64c56f70125a9bac9c006f69e45d5d3 (patch) | |
tree | e15e44698144fdd94d00a28697708f03df7fa431 /autoload/polyglot/detect.vim | |
parent | f621f6c1eeadf73780ff7a7929a025a25a66702a (diff) | |
download | vim-polyglot-c96947b1c64c56f70125a9bac9c006f69e45d5d3.tar.gz vim-polyglot-c96947b1c64c56f70125a9bac9c006f69e45d5d3.zip |
Update
Diffstat (limited to 'autoload/polyglot/detect.vim')
-rw-r--r-- | autoload/polyglot/detect.vim | 12 |
1 files changed, 12 insertions, 0 deletions
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 |