hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.47k stars 370 forks source link

Please consider not using global variables #1810

Closed JosefLitos closed 5 months ago

JosefLitos commented 5 months ago

I've recently noticed many of the plugins I use make unnecessary variables in the global namespace. I see that cmp is using it for a function call. I wanted to ask, if it would be possible to replace it with something like <Cmd>lua require'cmp.utils.feedkeys'.run(%s)<CR> moving the global function to the module, where it comes from.

hrsh7th commented 5 months ago

PR welcome.

JosefLitos commented 4 months ago

I am not sure I fully understand why this issue is closed.

Shougo commented 4 months ago

He don't want to add the feature, but you can make the PR for it.

JosefLitos commented 4 months ago

I see. I suppose it's just me but it seems weird that I'm linking this issue in my PR as a fix to it, despite this being closed, which would signify this already being 'solved'.