Skip to content
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

truncated language server suggestions - missing parameters (clangd) #16057

Open
1 task done
Emc2356 opened this issue Aug 10, 2024 · 5 comments · May be fixed by #25405
Open
1 task done

truncated language server suggestions - missing parameters (clangd) #16057

Emc2356 opened this issue Aug 10, 2024 · 5 comments · May be fixed by #25405
Labels
autocompletions Feedback for code completions in the editor bug [core label] c++ C++ programming language support language server An umbrella label for all language servers linux

Comments

@Emc2356
Copy link

Emc2356 commented Aug 10, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

as the title said zed kept suggesting mVertBin over and over again for some reason

image

Environment

Zed: v0.147.2 (Zed Preview)
OS: Linux X11 endeavouros unknown
Memory: 7.6 GiB
Architecture: x86_64
GPU: Intel(R) UHD Graphics 620 (WHL GT2) || Intel open-source Mesa driver || Mesa 24.1.5-arch1.1
@Emc2356 Emc2356 added admin read bug [core label] labels Aug 10, 2024
@notpeter
Copy link
Member

Which language / language server are you using that is triggering this?
Can you provide a minimal file/repo which demonstrates this issue?

@Emc2356
Copy link
Author

Emc2356 commented Aug 13, 2024

@notpeter sorry just saw your message

#include <string>


class VulkanShader {
public:
    VulkanShader(const std::string& vert, const std::string& frag) :
private:
    std::string mVertBin;
    std::string mFragBin;
};

after the semicolon in like 6 when i type the letter m the problem appears.
i am using clangd

@notpeter
Copy link
Member

notpeter commented Aug 13, 2024

The suggestion that I'm getting is similar, but appears to include more context as how the multiple suggestions differ:
Screenshot 2024-08-13 at 17 47 18

Which version of clangd are you using? Mine is: Apple clangd version 15.0.0 (clang-1500.3.9.4)

@notpeter notpeter changed the title zed is suggesting the same thing over and over agaig duplicate language server suggestions - missing parameters (clangd) Aug 13, 2024
@notpeter notpeter added c++ C++ programming language support language server An umbrella label for all language servers autocompletions Feedback for code completions in the editor and removed triage labels Aug 13, 2024
@Emc2356
Copy link
Author

Emc2356 commented Aug 14, 2024

[emc@Vroom ~]$ clangd --version
clangd version 18.1.8
Features: linux
Platform: x86_64-pc-linux-gnu

if it is using the clangd that i have installed in my system, not sure how to check it from zed

@notpeter
Copy link
Member

I can reproduce. Running Ubuntu Linux 22. Current Zed Nightly. Zed clangd.

# ~/.local/share/zed/languages/clangd/clangd_18.1.3/bin/clangd --version
clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0)
Features: linux+grpc
Platform: x86_64-unknown-linux-gnu

Screenshot_20240814_142449

Works on MacOS, broken on Linux.
Great reproduction steps @Emc2356! Thanks!

@notpeter notpeter added the linux label Aug 14, 2024
@notpeter notpeter changed the title duplicate language server suggestions - missing parameters (clangd) truncated language server suggestions - missing parameters (clangd) Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocompletions Feedback for code completions in the editor bug [core label] c++ C++ programming language support language server An umbrella label for all language servers linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants