[Plugin] snacks-coc.nvim: A telescope-coc alternative for snacks.picker #5572
xinghe98
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The Pain Point
For those of us who still rely heavily on
coc.nvimfor our LSP setup, the nativeCocListUI feels quite dated. For a long time, the go-to solution wastelescope-coc.nvim. However, as projects grow larger, pulling workspace symbols or extensive references via telescope-coc often causes severe UI blocking and freezing, primarily because old bridge plugins typically trap the main thread with synchronousvim.waitcalls.snacks-coc.mp4
The Solution: snacks-coc.nvim
I couldn't stand the micro-stutters anymore when jumping between files, so I built snacks-coc.nvim.
By directly hooking into
CocActionAsyncand mapping it to the beautifulsnacks.pickerasync workers, all the blocking issues are completely eliminated. The data fetching is done silently in the background, and the UI remains buttery smooth with near-zero latency.What's included out of the box? 🚀
I've covered over 15 high-frequency coc sources with native-feeling snacks formats (like
lsp_symbol,diagnostic, andfilewith Treesitter previews):coc_definitions/coc_references/coc_implementationsetc.coc_symbols(Document symbols)coc_workspace_symbols(Live full-project symbol search)coc_diagnostics/coc_workspace_diagnosticscoc_commands,coc_mru,coc_links, and more.A quick snippet for
lazy.nvimusers{ "xinghe98/snacks-coc.nvim", dependencies = { "folke/snacks.nvim", "neoclide/coc.nvim" }, event = "VeryLazy", config = function(_, opts) require("snacks-coc").setup(opts) end, keys = { { "gd", function() Snacks.picker.pick("coc_definitions") end, desc = "Coc Definitions" }, { "gr", function() Snacks.picker.pick("coc_references") end, desc = "Coc References" }, { "<leader>ss", function() Snacks.picker.pick("coc_symbols") end, desc = "Coc Document Symbols" }, { "<leader>sS", function() Snacks.picker.pick("coc_workspace_symbols") end, desc = "Coc Workspace Symbols" }, }, }If anyone here shares the exact same OCD for a visually pleasing and lag-free code reading experience on a legacy coc setup, I hope this plugin cures it. Feedback and PRs are highly welcome!
🔗 Repo link: https://github.com/xinghe98/snacks-coc.nvim
Beta Was this translation helpful? Give feedback.
All reactions