From da18fe6851e95e146016f7abd2f799056e074cd9 Mon Sep 17 00:00:00 2001 From: Dawid Potocki Date: Tue, 17 Nov 2020 15:58:46 +0000 Subject: Fix neovim :Tutor filetype detection (#631) --- README.md | 2 +- autoload/polyglot/sleuth.vim | 1 + ftdetect/polyglot.vim | 4 ++++ packages.yaml | 6 ++++++ tests/filetypes.vim | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 29a54536..0aa5a16f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A collection of language packs for Vim. > One to rule them all, one to find them, one to bring them all and in the darkness bind them. - It **won't affect your startup time**, as scripts are loaded only on demand\*. -- It **installs and updates 120+ times faster** than the 598 packages it consists of. +- It **installs and updates 120+ times faster** than the 599 packages it consists of. - It is also more secure (scripts loaded for every filetype are generated by vim-polyglot) - Best syntax and indentation support (no other features). Hand-selected language packs. - Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled) diff --git a/autoload/polyglot/sleuth.vim b/autoload/polyglot/sleuth.vim index a23a2ab5..ca4f0d5a 100644 --- a/autoload/polyglot/sleuth.vim +++ b/autoload/polyglot/sleuth.vim @@ -560,6 +560,7 @@ let s:globs = { \ 'tssop': '*.tssop', \ 'tt2': '*.tt2', \ 'tt2html': '*.tt2', + \ 'tutor': '*.tutor', \ 'typescript': '*.ts', \ 'typescriptreact': '*.tsx', \ 'uc': '*.uc', diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index edfba1d7..5fa6bde3 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -1856,6 +1856,10 @@ if !has_key(g:polyglot_is_disabled, 'twig') au BufNewFile,BufRead *.xml.twig setf xml.twig endif +if !has_key(g:polyglot_is_disabled, 'tutor') + au BufNewFile,BufRead *.tutor setf tutor +endif + if !has_key(g:polyglot_is_disabled, 'tptp') au BufNewFile,BufRead *.ax,*.p,*.tptp setf tptp endif diff --git a/packages.yaml b/packages.yaml index d7c23f94..b6721e05 100644 --- a/packages.yaml +++ b/packages.yaml @@ -1672,6 +1672,12 @@ filetypes: - tptp - ax --- +name: tutor +filetypes: +- name: tutor + extensions: + - tutor +--- name: twig remote: lumiliet/vim-twig filetypes: diff --git a/tests/filetypes.vim b/tests/filetypes.vim index c3bb9931..5a1838b5 100644 --- a/tests/filetypes.vim +++ b/tests/filetypes.vim @@ -176,6 +176,7 @@ call TestFiletype('sql') call TestFiletype('cql') call TestFiletype('php') call TestFiletype('blade') +call TestFiletype('pest') call TestFiletype('plantuml') call TestFiletype('pony') call TestFiletype('ps1') @@ -224,6 +225,7 @@ call TestFiletype('thrift') call TestFiletype('tmux') call TestFiletype('toml') call TestFiletype('tptp') +call TestFiletype('tutor') call TestFiletype('html.twig') call TestFiletype('xml.twig') call TestFiletype('typescript') -- cgit v1.2.3