diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-11-14 05:15:45 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 05:15:45 -0800 |
commit | b73a829837bbc05840ae00cbe514fb1786695614 (patch) | |
tree | be21628b373bbec5c6dc2fe42d24eb2dd3b125b5 | |
parent | 5b45efbee6ebb64269469b636baac5248e83421f (diff) | |
download | rneovim-b73a829837bbc05840ae00cbe514fb1786695614.tar.gz rneovim-b73a829837bbc05840ae00cbe514fb1786695614.tar.bz2 rneovim-b73a829837bbc05840ae00cbe514fb1786695614.zip |
refactor: vim.ui.clipboard #26040
Problem:
Platform-specific UI providers should live in `vim.ui.*`. #24164
Solution:
- Move `vim.clipboard.osc52` module to `vim.ui.clipboard.osc52`.
- TODO: move all of `clipboard.vim` to `vim.ui.clipboard`.
ref #25872
-rw-r--r-- | runtime/doc/api.txt | 3 | ||||
-rw-r--r-- | runtime/doc/lsp.txt | 2 | ||||
-rw-r--r-- | runtime/doc/provider.txt | 8 | ||||
-rw-r--r-- | runtime/lua/vim/ui/clipboard/osc52.lua (renamed from runtime/lua/vim/clipboard/osc52.lua) | 0 | ||||
-rw-r--r-- | src/nvim/api/ui.c | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index b38524bd55..6970479a78 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3598,7 +3598,8 @@ nvim_ui_set_option({name}, {value}) *nvim_ui_set_option()* |RPC| only nvim_ui_term_event({event}, {value}) *nvim_ui_term_event()* - Tells Nvim when a terminal event has occurred. + Tells Nvim when a terminal event has occurred: sets |v:termresponse| and + fires |TermResponse|. The following terminal events are supported: diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index d70c24bb54..3cbadb9bdb 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1484,7 +1484,7 @@ get({filter}) *vim.lsp.inlay_hint.get()* vim.lsp.util.apply_text_edits(resolved_hint.textEdits, 0, client.encoding) location = resolved_hint.label[1].location - client.request("textDocument/hover", { + client.request('textDocument/hover', { textDocument = { uri = location.uri }, position = location.range.start, }) diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt index 1b49ee3a3d..23bde05072 100644 --- a/runtime/doc/provider.txt +++ b/runtime/doc/provider.txt @@ -269,12 +269,12 @@ into explicitly by setting the following |g:clipboard| definition: >lua vim.g.clipboard = { name = 'OSC 52', copy = { - ['+'] = require('vim.clipboard.osc52').copy, - ['*'] = require('vim.clipboard.osc52').copy, + ['+'] = require('vim.ui.clipboard.osc52').copy, + ['*'] = require('vim.ui.clipboard.osc52').copy, }, paste = { - ['+'] = require('vim.clipboard.osc52').paste, - ['*'] = require('vim.clipboard.osc52').paste, + ['+'] = require('vim.ui.clipboard.osc52').paste, + ['*'] = require('vim.ui.clipboard.osc52').paste, }, } < diff --git a/runtime/lua/vim/clipboard/osc52.lua b/runtime/lua/vim/ui/clipboard/osc52.lua index 035a6abb86..035a6abb86 100644 --- a/runtime/lua/vim/clipboard/osc52.lua +++ b/runtime/lua/vim/ui/clipboard/osc52.lua diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c index e6d9035b0d..c898925af8 100644 --- a/src/nvim/api/ui.c +++ b/src/nvim/api/ui.c @@ -512,7 +512,7 @@ void nvim_ui_pum_set_bounds(uint64_t channel_id, Float width, Float height, Floa ui->pum_pos = true; } -/// Tells Nvim when a terminal event has occurred. +/// Tells Nvim when a terminal event has occurred: sets |v:termresponse| and fires |TermResponse|. /// /// The following terminal events are supported: /// |