docs(news): fix inconsistencies (#29381)

This commit is contained in:
zeertzjq
2024-06-18 07:00:32 +08:00
committed by GitHub
parent 7363b695de
commit a46991e1c6
3 changed files with 14 additions and 17 deletions

View File

@ -4330,7 +4330,7 @@ vim.snippet.active({filter}) *vim.snippet.active()*
You can use this function to navigate a snippet as follows: >lua
vim.keymap.set({ 'i', 's' }, '<Tab>', function()
if vim.snippet.active({ direction = 1 }) then
return '<cmd>lua vim.snippet.jump(1)<cr>'
return '<Cmd>lua vim.snippet.jump(1)<CR>'
else
return '<Tab>'
end
@ -4364,7 +4364,7 @@ vim.snippet.jump({direction}) *vim.snippet.jump()*
For example, map `<Tab>` to jump while a snippet is active: >lua
vim.keymap.set({ 'i', 's' }, '<Tab>', function()
if vim.snippet.active({ direction = 1 }) then
return '<cmd>lua vim.snippet.jump(1)<cr>'
return '<Cmd>lua vim.snippet.jump(1)<CR>'
else
return '<Tab>'
end

View File

@ -90,27 +90,28 @@ API
DEFAULTS
Keymaps:
- |grn| in Normal mode maps to |vim.lsp.buf.rename()|
- |grr| in Normal mode maps to |vim.lsp.buf.references()|
- |gra| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|
- CTRL-S in Insert mode maps to |vim.lsp.buf.signature_help()|
Mappings:
|grn| in Normal mode maps to |vim.lsp.buf.rename()|
|grr| in Normal mode maps to |vim.lsp.buf.references()|
|gra| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|
CTRL-S in Insert mode maps to |vim.lsp.buf.signature_help()|
• Snippet:
- `<Tab>` in Insert and Select mode maps to |vim.snippet.jump({ direction = 1 })|
`<Tab>` in Insert and Select mode maps to `vim.snippet.jump({ direction = 1 })`
when a snippet is active and jumpable forwards.
- `<S-Tab>` in Insert and Select mode maps to |vim.snippet.jump({ direction = -1 })|
`<S-Tab>` in Insert and Select mode maps to `vim.snippet.jump({ direction = -1 })`
when a snippet is active and jumpable backwards.
EDITOR
* On Windows, filename arguments on the command-line prefixed with "~\" or
On Windows, filename arguments on the command-line prefixed with "~\" or
"~/" are now expanded to the user's profile directory, not a relative path
to a literal "~" directory.
EVENTS
TODO
|CompleteDone| now sets the `reason` key in `v:event` which specifies the reason
for completion being done.
LSP
@ -158,10 +159,6 @@ UI
• TODO
• |CompleteDone| now sets the `reason` key in `v:event` which specifies the reason
for completion being done.
==============================================================================
CHANGED FEATURES *news-changed*

View File

@ -609,7 +609,7 @@ end
--- ```lua
--- vim.keymap.set({ 'i', 's' }, '<Tab>', function()
--- if vim.snippet.active({ direction = 1 }) then
--- return '<cmd>lua vim.snippet.jump(1)<cr>'
--- return '<Cmd>lua vim.snippet.jump(1)<CR>'
--- else
--- return '<Tab>'
--- end
@ -661,7 +661,7 @@ end
--- ```lua
--- vim.keymap.set({ 'i', 's' }, '<Tab>', function()
--- if vim.snippet.active({ direction = 1 }) then
--- return '<cmd>lua vim.snippet.jump(1)<cr>'
--- return '<Cmd>lua vim.snippet.jump(1)<CR>'
--- else
--- return '<Tab>'
--- end