AckslD / nvim-neoclip.lua

Clipboard manager neovim plugin with telescope integration
994 stars 20 forks source link

`:telescope neoclip` does nothign #103

Closed NormTurtle closed 1 year ago

NormTurtle commented 1 year ago

hey, when I try to run :Telescope neoclipnothing happen, no telescope window opens.

i use lazy not packer, this is in lazy.nvim

{ -- register
  'AckslD/nvim-neoclip.lua',
  dependencies = {
    {'kkharji/sqlite.lua', module = 'sqlite'},
    {'nvim-telescope/telescope.nvim'},
  }
  },

in init.lua

require("telescope")
require('neoclip').setup()

here is my telescope config telescope.txt

i dont know much of telescope, since i just copied just this one from someones, code ! :(

NormTurtle commented 1 year ago

i have tried https://github.com/AckslD/nvim-neoclip.lua/issues/4 https://github.com/AckslD/nvim-neoclip.lua/issues/43 but thsi ^^ aren't my case i guess

AckslD commented 1 year ago

Hi @omaru-ok!

Could you try if

:lua require('telescope').extensions.neoclip.default()

works?

NormTurtle commented 1 year ago
:lua require('telescope').extensions.neoclip.default()

yes yes , how why this work , not above?!

AckslD commented 1 year ago

Weird, and doing

:lua require('telescope').load_extension('neoclip')

and then

:Telescope neoclip

does not work?

Does

:Telescope neoclip neoclip

work?

NormTurtle commented 1 year ago

@AckslD ^^ these upper one , work fine ,

now tell me what i need to change in init.lua , to get it workign properly as Author is trying to i have tried copying the whole configs to my init.lua no work

do i just need to call ? require('telescope').load_extension('neoclip') ? or your thinking something better!?

NormTurtle commented 1 year ago

looks like image neeraj319 had the same issue! , so im confident to say, its not my config faults

my telescope config is

local icons = require("nvim-nonicons")

require("telescope").setup({
  defaults = {
    prompt_prefix = "  " .. icons.get("telescope") .. "  ",
    selection_caret = " ❯ ",
    entry_prefix = "   ",
  },
})

Only

AckslD commented 1 year ago

@omaru-ok, sorry I'm not completely sure why it's not working for you to be honest. I don't have to manually load the extension before. But if that makes it work for you then maybe just use that? Otherwise feel free to try to share a minimal config reproducing the issue you're having.

artfulrobot commented 1 year ago

I've hit this too. Still not figured it, but on load, I have to type

:Telescope neoclip neoclip

which works, then next time I can just type

:Telescope neoclip

EDIT: this config seems to sort it out:

use { 'AckslD/nvim-neoclip.lua',
  requires = { 'nvim-telescope/telescope.nvim' },
  config = function()
    require('neoclip').setup()
    require('telescope').load_extension('neoclip')
  end,
}
AckslD commented 1 year ago

Thanks @artfulrobot, I'm not sure why it behaves like that. Maybe I've implemented the telescope extension wrong somehow? Do you use other extensions and do they behave the same?

artfulrobot commented 1 year ago

Actually I think this is right: I do use other extensions e.g. the telescope fzf extension, and that needs: require('telescope').load_extension('fzf')

So might just need the docs updating?

samnj commented 1 year ago

I just installed this and also had to use telescope to load the extention. +1 to updating the docs.

AckslD commented 1 year ago

There's already a note on this under Troubleshooting but I added a comment about it under Installation. Why I like to not call the loading of the extension is that I then don't need to load telescope at all until I need it. But seems it's at least all working now so that's good :)