aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 80c1f58323..77f1dad6c7 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -17,9 +17,9 @@ an idea of what lurks beneath: >
:lua print(vim.inspect(package.loaded))
Nvim includes a "standard library" |lua-stdlib| for Lua. It complements the
-"editor stdlib" (|functions| and Ex commands) and the |API|, all of which can
-be used from Lua code. A good overview of using Lua in neovim is given by
-https://github.com/nanotee/nvim-lua-guide.
+"editor stdlib" (|builtin-functions| and Ex commands) and the |API|, all of
+which can be used from Lua code. A good overview of using Lua in neovim is
+given by https://github.com/nanotee/nvim-lua-guide.
Module conflicts are resolved by "last wins". For example if both of these
are on 'runtimepath':
@@ -1872,6 +1872,15 @@ add({filetypes}) *vim.filetype.add()*
{filetypes} table A table containing new filetype maps
(see example).
+match({name}, {bufnr}) *vim.filetype.match()*
+ Set the filetype for the given buffer from a file name.
+
+ Parameters: ~
+ {name} string File name (can be an absolute or relative
+ path)
+ {bufnr} number|nil The buffer to set the filetype for.
+ Defaults to the current buffer.
+
==============================================================================
Lua module: keymap *lua-keymap*