+3
-3
lines changedFilter options
+3
-3
lines changed Original file line number Diff line number Diff line change
@@ -1398,7 +1398,7 @@ local pattern_sorted = sort_by_priority(pattern)
1398
1398
1399
1399
---@private
1400
1400
local function normalize_path(path)
1401
-
return (path:gsub("\\", "/"))
1401
+
return (path:gsub("\\", "/"):gsub("^~", vim.env.HOME))
1402
1402
end
1403
1403
1404
1404
--- Add new filetype mappings.
Original file line number Diff line number Diff line change
@@ -72,10 +72,10 @@ describe('vim.filetype', function()
72
72
local root = ...
73
73
vim.filetype.add({
74
74
pattern = {
75
-
[root .. '/blog/.*%.txt'] = 'markdown',
75
+
['~/blog/.*%.txt'] = 'markdown',
76
76
}
77
77
})
78
-
vim.filetype.match(root .. '/blog/why_neovim_is_awesome.txt')
78
+
vim.filetype.match('~/blog/why_neovim_is_awesome.txt')
79
79
return vim.bo.filetype
80
80
]], root))
81
81
end)
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4