Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
milanglacier opened this issue May 1, 2022 · 3 comments

Comments

@milanglacier
Copy link

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
Copy link

rebelot commented May 5, 2022

same issue, but it's sporadic.

@urmzd
Copy link

urmzd commented Jun 2, 2022

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

@geril2207
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants