nvim-telescope / telescope-ui-select.nvim

MIT License
774 stars 18 forks source link

won't work with code actions that will open up a new floating window #13

Open milanglacier opened 2 years ago

milanglacier commented 2 years ago

nvim -v

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@HMBRW-A-001-M1-004.local

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'
rebelot commented 2 years ago

same issue, but it's sporadic.

urmzd commented 2 years ago

Similar issue but with efm-langserver when vim.lsp.buf.formatting is called.

geril2207 commented 11 months ago

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