Skip to content

Instantly share code, notes, and snippets.

@runiq
Last active March 16, 2021 18:16
Show Gist options
  • Save runiq/5e27d06ad5add45f3e49b4608880b5ab to your computer and use it in GitHub Desktop.
Save runiq/5e27d06ad5add45f3e49b4608880b5ab to your computer and use it in GitHub Desktop.
Sanity check
-- 1. Clone https://github.com/neovim/neovim/pull/12720
-- 2. Run with `nvim -u NONE fix-floating-preview.lua '+luafile %'`
-- 3. press F7 twice.
-- 4. Does it echo your current line (including line numbers!) to the :messages
-- pane before switching into the floating window?
function __beep() return vim.lsp.util.open_floating_preview({'foo', 'boo'}, 'lua', {focus_id='beep'}) end
vim.api.nvim_buf_set_keymap(0, '', '<f7>', '<cmd>lua __beep()<cr>', {silent = true, noremap = true})
vim.wo.number = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment