aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-08-13 15:11:03 +0200
committerGitHub <noreply@github.com>2022-08-13 15:11:03 +0200
commit33b49d5f55423a1a3174ad0ce42c4454871aa9f8 (patch)
tree8fa71bd8a0ba9590a9333edd21636c7cbee2c76f
parent9dec3815d2b8d768ae9d3a8c2a0d3a1e806157e5 (diff)
downloadrneovim-33b49d5f55423a1a3174ad0ce42c4454871aa9f8.tar.gz
rneovim-33b49d5f55423a1a3174ad0ce42c4454871aa9f8.tar.bz2
rneovim-33b49d5f55423a1a3174ad0ce42c4454871aa9f8.zip
vim-patch:9.0.0197: astro files are not detected (#19755)
Problem: Astro files are not detected. Solution: Add a pattern to match Astro files. (Emilia Zapata, closes vim/vim#10904) https://github.com/vim/vim/commit/6a76e84f555da6d9ee57db80143e1e5eb85535ff
-rw-r--r--runtime/filetype.vim3
-rw-r--r--runtime/lua/vim/filetype.lua1
-rw-r--r--src/nvim/testdir/test_filetype.vim1
3 files changed, 5 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index f744714aa2..52a20d5c10 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -173,6 +173,9 @@ au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
" Assembly - Macro (VAX)
au BufNewFile,BufRead *.mar setf vmasm
+" Astro
+au BufNewFile,BufRead *.astro setf astro
+
" Atlas
au BufNewFile,BufRead *.atl,*.as setf atlas
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 3cfc4e288a..872106b20d 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -142,6 +142,7 @@ local extension = {
asp = function(path, bufnr)
return require('vim.filetype.detect').asp(bufnr)
end,
+ astro = 'astro',
atl = 'atlas',
as = 'atlas',
ahk = 'autohotkey',
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index fd0c095365..e3a8370661 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -71,6 +71,7 @@ let s:filename_checks = {
\ 'asciidoc': ['file.asciidoc', 'file.adoc'],
\ 'asn': ['file.asn', 'file.asn1'],
\ 'asterisk': ['asterisk/file.conf', 'asterisk/file.conf-file', 'some-asterisk/file.conf', 'some-asterisk/file.conf-file'],
+ \ 'astro': ['file.astro'],
\ 'atlas': ['file.atl', 'file.as'],
\ 'autohotkey': ['file.ahk'],
\ 'autoit': ['file.au3'],