telescope-ui-select.nvim
telescope-ui-select.nvim copied to clipboard
won't work with code actions that will open up a new floating window
nvim -v
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.7.0/share/nvim"
Run :checkhealth for more info
To be specific, null-ls.nvim + gitsigns.nvim wouldn't work for code action preview hunk
minimal config
require('packer').startup(function()
use 'nvim-telescope/telescope.nvim'
use 'nvim-telescope/telescope-ui-select.nvim'
use 'lewis6991/gitsigns.nvim'
use 'jose-elias-alvarez/null-ls.nvim'
end
)
require 'telescope'.setup {}
require('telescope').load_extension 'ui-select'
vim.keymap.set('n', 'gca', vim.lsp.buf.code_action, {})
require 'null-ls'.setup {
sources = {
null_ls.builtins.code_actions.gitsigns,
}
}
Then open any file that has any unstaged changes, put cursor at the place where changes make, type gca, and select preview hunk, and it will show nothing.
However, if comment out this line, using default ui of code_action(), then preview_hunk works just fine
-- require('telescope').load_extension 'ui-select'
same issue, but it's sporadic.
Similar issue but with efm-langserver when vim.lsp.buf.formatting is called.
I think i found the cause of the problem from dressing.nvim. You can take my fork or try dressing.nvim which also provides the same select(telescope).
https://github.com/stevearc/dressing.nvim/blob/c1e1d5fa44fe08811b6ef4aadac2b50e602f9504/lua/dressing/select/telescope.lua#L73C10-L73C10