AckslD / nvim-neoclip.lua

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

I need help, cannot see history in :Telescope neoclip #43

Closed kun-codes closed 2 years ago

kun-codes commented 2 years ago

I cannot see history in :Telescope neoclip even after yanking some lines here is my telescope.lua config

https://gist.github.com/throwaway69420-69420/5a5b41b9102b4a2277f385596e3fb085

I am using packer.nvim btw

AckslD commented 2 years ago

Hi @throwaway69420-69420, are you calling

require('neoclip').setup()

in your setup?

kun-codes commented 2 years ago

@AckslD nope, where do I need to add this in use { "AckslD/nvim-neoclip.lua", -- for neovim clipboard history requires = { {'nvim-telescope/telescope.nvim'}, }, } can you please give me the edited part of the code? here is my plugins.lua https://gist.github.com/throwaway69420-69420/319a498f34407092cfc4bb9f63a8d18d

kun-codes commented 2 years ago

update: I added the line in the plugins.lua and it works now

thanks for the help you may close the issue now

kun-codes commented 2 years ago

btw I am new at using plugins what does require('neoclip').setup() do?

AckslD commented 2 years ago

Good that it works now :)

Most plugins written in lua have a setup function you need to call to initialize the plugin. This usually sets any needed keybindings/autocmds etc and acts much like vimscript files in a plugin folder, but gives more freedom to the user to choose when to initialize the plugin. Useful if you want to fo example lazy load plugins.

In the case of neoclip the setup simply adds some autocmds which listens to events triggered when you yank. So if you don't call setup these are never triggered.

Hope that helps :)

kun-codes commented 2 years ago

thanks :)