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
Parameter hints for call to overloaded function #172
Comments
Once you put parentheses, you should get a signature help showing both. Also you can change the behaviour by passing |
I tried this, but I get the same result ( |
I can confirm that using |
I am using VSCode as a client. Does this suggest that clangd is expecting VSCode to do something more helpful, that it's not doing? |
Ok, I see: VSCode has a separate command ("Trigger Parameter Hints", shortcut Ctrl+Shift+Space) which shows the individual signatures when activated. I was expecting that to activate automatically when the completion entry is selected, but it looks like it doesn't. I think this is just a case of sub-optimal usability on the client side then. I still prefer the |
How can I set --completion-style=detailed on Ubuntu? Where is conf file? |
It's a command-line argument to clangd. The method of setting it depends on the client. For vscode, it can be added to |
Thanks, I use neovim and installed clangd using by |
It's not going to be a clangd config file, it's going to be a neovim-related config file. I'm not really familiar with neovim, but a quick read of the nvim-lspconfig readme suggests the file to specify the language server setup is "init.vim". |
Looking at example config snippets in e.g. this issue, it looks like the snippet you'll want is something like:
|
Thanks, tried it. Don't have any errors, but still not expand overloaded methods. |
Can you share clangd logs? That should at least allow us to confirm that clangd is seeing the command-line parameter. |
I am afraid my system doesn't have clangd logs, cause I installed clangd not from repos, but via |
I found where is clangd log on my machine. It was in ~/.cache/nvim/lsp.log |
Ok, so the important line is this one near the top:
Clangd is being started with the So, whatever you did to configure |
Thanks HighCommander4.
to my ~/.config/nvim/init.lua file, but it looks like there isn't any effect. |
Yup, I understand. I tried to figure out how to configure neovim to provide a command-line argument to clangd based on their documentation, and that's what I came up with, but clearly I'm missing something. I suggest you ask for further help from people who are actually familar with neovim, such as in the https://github.com/neovim/nvim-lspconfig issue tracker. |
In the following code:
If I invoke completion with the cursor at the indicated location, I get a single entry that says
It would be nicer to show the two overloads as separate entries, so I can see the signature for each, pick the one I want to call, and then get parameter hints for the selected function's parameters.
The text was updated successfully, but these errors were encountered: