diff options
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r-- | runtime/doc/lua.txt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 089cf0ce9d..aeb1699908 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2029,30 +2029,30 @@ add({filetypes}) *vim.filetype.add()* vim.filetype.add({ extension = { - foo = "fooscript", + foo = 'fooscript', bar = function(path, bufnr) if some_condition() then - return "barscript", function(bufnr) + return 'barscript', function(bufnr) -- Set a buffer variable vim.b[bufnr].barscript_version = 2 end end - return "bar" + return 'bar' end, }, filename = { - [".foorc"] = "toml", - ["/etc/foo/config"] = "toml", + ['.foorc'] = 'toml', + ['/etc/foo/config'] = 'toml', }, pattern = { - [".*‍/etc/foo/.*"] = "fooscript", + ['.*/etc/foo/.*'] = 'fooscript', -- Using an optional priority - [".*‍/etc/foo/.*%.conf"] = { "dosini", { priority = 10 } }, - ["README.(%a+)$"] = function(path, bufnr, ext) - if ext == "md" then - return "markdown" - elseif ext == "rst" then - return "rst" + ['.*/etc/foo/.*%.conf'] = { 'dosini', { priority = 10 } }, + ['README.(a+)$'] = function(path, bufnr, ext) + if ext == 'md' then + return 'markdown' + elseif ext == 'rst' then + return 'rst' end end, }, |