summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawid Potocki <dawid@dawidpotocki.com>2020-11-17 15:58:46 +0000
committerGitHub <noreply@github.com>2020-11-17 16:58:46 +0100
commitda18fe6851e95e146016f7abd2f799056e074cd9 (patch)
tree2e2213e98e0d50a0adb226cdbd432da9a34f3654
parent4af1321588c7dcb718022226cb27ec325973c2f0 (diff)
downloadvim-polyglot-da18fe6851e95e146016f7abd2f799056e074cd9.tar.gz
vim-polyglot-da18fe6851e95e146016f7abd2f799056e074cd9.zip
Fix neovim :Tutor filetype detection (#631)
-rw-r--r--README.md2
-rw-r--r--autoload/polyglot/sleuth.vim1
-rw-r--r--ftdetect/polyglot.vim4
-rw-r--r--packages.yaml6
-rw-r--r--tests/filetypes.vim2
5 files changed, 14 insertions, 1 deletions
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 <!--Package Count-->598<!--/Package Count--> packages it consists of.
+- It **installs and updates 120+ times faster** than the <!--Package Count-->599<!--/Package Count--> 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')