-
Notifications
You must be signed in to change notification settings - Fork 140
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
Also Add argument names on completing lsp snippets for functions. #479
Comments
This is up to the LSP so you may be missing the LSP capabilities section from the installation section. Blink doesn't do anything special here |
Can you please elaborate this? This what I set my client capabilities to be: M.client_capabilities = function()
return {
textDocument = {
completion = {
dynamicRegistration = false,
completionItem = {
snippetSupport = true,
commitCharactersSupport = true,
deprecatedSupport = true,
preselectSupport = true,
tagSupport = {
valueSet = {
1, -- Deprecated
},
},
insertReplaceSupport = true,
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
"sortText",
"filterText",
"insertText",
"textEdit",
"insertTextFormat",
"insertTextMode",
},
},
insertTextModeSupport = {
valueSet = {
1, -- asIs
2, -- adjustIndentation
},
},
labelDetailsSupport = true,
},
contextSupport = true,
insertTextMode = 1,
completionList = {
itemDefaults = {
"commitCharacters",
"editRange",
"insertTextFormat",
"insertTextMode",
"data",
},
},
},
},
}
end Its been the same with |
If I am getting you right, I do not think the capabilities part has anything to do with this, as I have explicitly setup my client capabilities in a separate file. Please correct me if I am wrong |
Hmm your capabilities seem fine, although you should use the capabilities from blink since some of the settings (i.e. some of the keys in |
Sorry for the late response, I was trying to figure out how to do this?
I tried printing |
Haha that's not your fault, I shouldn't have been so vague. You'll want to use |
Damn!, I totally forgot about So here's what it spewed: {- INSERT --
data = {
id = 195,
uri = "file:///home/dex/.config/nvim/init.lua"
},
detail = "function",
documentation = {
kind = "markdown",
value = '```lua\nfunction _G.require(modname: any)\n -> unknown\n 2. unknown|nil\n 3. unknown|nil\n 4. unkn
own|nil\n 5. unknown|nil\n 6. unknown|nil\n 7. unknown|nil\n 8. unknown|nil\n 9. unknown|nil\n 10. unknown|nil
\n```\n\n---\n\n```lua\nfunction require(modname: string)\n -> unknown\n```\n\n---\n\n\nLoads the given module, re
turns any value returned by the given module(`true` when `nil`).\n\n[View documents](http://www.lua.org/manual/5.4/
manual.html#pdf-require)\n\n---\n\n```lua\n _G.require = function(modname)\n local Util = package.loaded["lazy.
core.util"]\n if Util and not done[modname] then\n done[modname] = true\n Util.track({ require = modna
me })\n\n```'
},
insertText = "require",
insertTextFormat = 2,
kind = 3,
label = "require(modname)",
sortText = "0014" |
I'm not sure why but your LSP is returning just the
It's possible that |
Yeah , got it now.
No problem, not something super important but in some cases it helps me to tab my way out of the function if the parameter and argument name are same. Atleast I learned something new today, thanks |
Feature Description
The title is pretty self explanatory.
blink-cmp
does not add default argument names on completing an lsp snippet as shown below:This is how
nvim-cmp
behaves on accepting an lsp snippet from completion menu:The text was updated successfully, but these errors were encountered: