From 59ea8fa322c946183631233ae546e3e8b0c37e30 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Fri, 14 Jan 2022 14:20:17 -0700 Subject: fix(filetype): expand tildes in filetype patterns (#17091) This allows patterns like ["~/.config/foo"] = "fooscript" to work. --- test/functional/lua/filetype_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/lua') diff --git a/test/functional/lua/filetype_spec.lua b/test/functional/lua/filetype_spec.lua index 1b2cb61cc2..729ebc601b 100644 --- a/test/functional/lua/filetype_spec.lua +++ b/test/functional/lua/filetype_spec.lua @@ -72,10 +72,10 @@ describe('vim.filetype', function() local root = ... vim.filetype.add({ pattern = { - [root .. '/blog/.*%.txt'] = 'markdown', + ['~/blog/.*%.txt'] = 'markdown', } }) - vim.filetype.match(root .. '/blog/why_neovim_is_awesome.txt') + vim.filetype.match('~/blog/why_neovim_is_awesome.txt') return vim.bo.filetype ]], root)) end) -- cgit