diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-18 07:00:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 07:00:32 +0800 |
commit | a46991e1c6ff769d2381d87886ac4f7397ab25c3 (patch) | |
tree | 71b47168faa561b1ae0821647791fc459d593211 | |
parent | 7363b695debf6341b75337f99accfa7fcc9dbe1d (diff) | |
download | rneovim-a46991e1c6ff769d2381d87886ac4f7397ab25c3.tar.gz rneovim-a46991e1c6ff769d2381d87886ac4f7397ab25c3.tar.bz2 rneovim-a46991e1c6ff769d2381d87886ac4f7397ab25c3.zip |
docs(news): fix inconsistencies (#29381)
-rw-r--r-- | runtime/doc/lua.txt | 4 | ||||
-rw-r--r-- | runtime/doc/news.txt | 23 | ||||
-rw-r--r-- | runtime/lua/vim/snippet.lua | 4 |
3 files changed, 14 insertions, 17 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 3bfd1d1885..39a047cbab 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -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 diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 848a642774..4f9f0248df 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -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* diff --git a/runtime/lua/vim/snippet.lua b/runtime/lua/vim/snippet.lua index 8cd454b908..98a7a79ce0 100644 --- a/runtime/lua/vim/snippet.lua +++ b/runtime/lua/vim/snippet.lua @@ -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 |