docs: lsp, ui events, dev guidance, osc7

fix #34981
This commit is contained in:
Justin M. Keyes
2025-07-11 08:33:29 -04:00
parent dc67ba948e
commit 56a4ef3c21
32 changed files with 228 additions and 222 deletions

View File

@@ -466,12 +466,14 @@ error:
/// Replaces terminal codes and |keycodes| ([<CR>], [<Esc>], ...) in a string with
/// the internal representation.
///
/// @note Lua can use |vim.keycode()| instead.
/// @see replace_termcodes
/// @see cpoptions
///
/// @param str String to be converted.
/// @param from_part Legacy Vim parameter. Usually true.
/// @param do_lt Also translate [<lt>]. Ignored if `special` is false.
/// @param special Replace |keycodes|, e.g. [<CR>] becomes a "\r" char.
/// @see replace_termcodes
/// @see cpoptions
String nvim_replace_termcodes(String str, Boolean from_part, Boolean do_lt, Boolean special)
FUNC_API_SINCE(1) FUNC_API_RET_ALLOC
{

View File

@@ -2405,35 +2405,35 @@ M.funcs = {
done like for the |cmdline-special| variables with their
associated modifiers. Here is a short overview:
% current file name
# alternate file name
#n alternate file name n
<cfile> file name under the cursor
<afile> autocmd file name
<abuf> autocmd buffer number (as a String!)
<amatch> autocmd matched name
% Current file name
# Alternate file name
#n Alternate file name n
<cfile> File name under the cursor
<afile> Autocmd file name
<abuf> Autocmd buffer number (as a String!)
<amatch> Autocmd matched name
<cexpr> C expression under the cursor
<sfile> deprecated, use <script> or <stack>
<slnum> sourced script line number or function
<sfile> Deprecated, use <script> or <stack>
<slnum> Sourced script line number or function
line number
<sflnum> script file line number, also when in
<sflnum> Script file line number, also when in
a function
<SID> "<SNR>123_" where "123" is the
current script ID |<SID>|
<script> sourced script file, or script file
<script> Sourced script file, or script file
where the current function was defined.
Use |debug.getinfo()| in Lua scripts.
<stack> call stack
<cword> word under the cursor
For Lua see |lua-script-location|.
<stack> Call stack
<cword> Word under the cursor
<cWORD> WORD under the cursor
<client> the {clientid} of the last received
<client> The {clientid} of the last received
message
Modifiers:
:p expand to full path
:h head (last path component removed)
:t tail (last path component only)
:r root (one extension removed)
:e extension only
:p Expand to full path
:h Head (last path component removed)
:t Tail (last path component only)
:r Root (one extension removed)
:e Extension only
Example: >vim
let &tags = expand("%:p:h") .. "/tags"

View File

@@ -421,20 +421,20 @@ EXTERN int sc_col; // column for shown command
// First NO_SCREEN, then NO_BUFFERS, then 0 when startup finished.
EXTERN int starting INIT( = NO_SCREEN);
// true when planning to exit. Might keep running if there is a changed buffer.
// Planning to exit. Might keep running if there is a changed buffer.
EXTERN bool exiting INIT( = false);
// true when planning to restart.
// Planning to restart.
EXTERN bool restarting INIT( = false);
// internal value of v:dying
// Internal value of v:dying
EXTERN int v_dying INIT( = 0);
// is stdin a terminal?
// Is stdin a terminal?
EXTERN bool stdin_isatty INIT( = true);
// is stdout a terminal?
// Is stdout a terminal?
EXTERN bool stdout_isatty INIT( = true);
// is stderr a terminal?
// Is stderr a terminal?
EXTERN bool stderr_isatty INIT( = true);
/// filedesc set by embedder for reading first buffer like `cmd | nvim -`
/// Filedesc set by embedder for reading first buffer like `cmd | nvim -`.
EXTERN int stdin_fd INIT( = -1);
// true when doing full-screen output, otherwise only writing some messages.

View File

@@ -2847,7 +2847,8 @@ local options = {
Unset 'exrc' to stop further searching of 'exrc' files in parent
directories, similar to |editorconfig.root|.
To get its own location, Lua exrc files can use |debug.getinfo()|.
To get its own location, a Lua exrc file can use |debug.getinfo()|.
See |lua-script-location|.
Compare 'exrc' to |editorconfig|:
- 'exrc' can execute any code; editorconfig only specifies settings.
@@ -2857,7 +2858,7 @@ local options = {
1. Enable 'exrc'.
2. Place LSP configs at ".nvim/lsp/*.lua" in your project root.
3. Create ".nvim.lua" in your project root directory with this line: >lua
vim.cmd[[set runtimepath+=.nvim]]
vim.cmd[[set runtimepath+=.nvim]]
<
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.