mirror of
https://github.com/neovim/neovim.git
synced 2026-01-03 09:56:25 +10:00
docs: misc, editorconfig
fix https://github.com/neovim/neovim/issues/36858
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
--- @brief
|
||||
--- Nvim supports EditorConfig. When a file is opened, after running |ftplugin|s
|
||||
--- and |FileType| autocommands, Nvim searches all parent directories of that file
|
||||
--- for ".editorconfig" files, parses them, and applies any properties that match
|
||||
--- the opened file. Think of it like 'modeline' for an entire (recursive)
|
||||
--- directory. For more information see https://editorconfig.org/.
|
||||
--- EditorConfig is like 'modeline' for an entire (recursive) directory. When a file is opened,
|
||||
--- after running |ftplugin|s and |FileType| autocommands, the EditorConfig feature searches all
|
||||
--- parent directories of that file for `.editorconfig` files, parses them, and applies their
|
||||
--- properties. For more information see https://editorconfig.org/.
|
||||
---
|
||||
--- Example `.editorconfig` file:
|
||||
--- ```ini
|
||||
--- root = true
|
||||
---
|
||||
--- [*]
|
||||
--- charset = utf-8
|
||||
--- end_of_line = lf
|
||||
--- indent_size = 4
|
||||
--- indent_style = space
|
||||
--- max_line_length = 42
|
||||
--- trim_trailing_whitespace = true
|
||||
---
|
||||
--- [*.{diff,md}]
|
||||
--- trim_trailing_whitespace = false
|
||||
--- ```
|
||||
|
||||
--- @brief [g:editorconfig]() [b:editorconfig]()
|
||||
---
|
||||
|
||||
@@ -94,11 +94,12 @@ function vim.empty_dict() end
|
||||
--- @param ...? any
|
||||
function vim.rpcnotify(channel, method, ...) end
|
||||
|
||||
--- Sends a request to {channel} to invoke {method} via |RPC| and blocks until
|
||||
--- a response is received.
|
||||
--- Invokes |RPC| `method` on `channel` and blocks until a response is received.
|
||||
---
|
||||
--- Note: Msgpack NIL values in the response are represented as |vim.NIL|.
|
||||
---
|
||||
--- Example: see [nvim_exec_lua()]
|
||||
---
|
||||
--- Note: NIL values as part of the return value is represented as |vim.NIL|
|
||||
--- special value
|
||||
--- @param channel integer
|
||||
--- @param method string
|
||||
--- @param ...? any
|
||||
|
||||
@@ -249,7 +249,9 @@ local function check_enabled_configs()
|
||||
ipairs(v --[[@as string[] ]])
|
||||
do
|
||||
if not vim.list_contains(valid_filetypes, filetype) then
|
||||
report_warn(("Unknown filetype '%s'."):format(filetype))
|
||||
report_warn(
|
||||
("Unknown filetype '%s' (Hint: filename extension != filetype)."):format(filetype)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -717,6 +717,7 @@ end
|
||||
--- vim.tbl_get({ key = { nested_key = true }}, 'key', 'nested_key') == true
|
||||
--- vim.tbl_get({ key = {}}, 'key', 'nested_key') == nil
|
||||
--- ```
|
||||
---@see |unpack()|
|
||||
---
|
||||
---@param o table Table to index
|
||||
---@param ... any Optional keys (0 or more, variadic) via which to index the table
|
||||
|
||||
Reference in New Issue
Block a user