Comments (8)
You've put "~/.local/bin" on your path instead of "/Users/<MY_USERNAME>/.local/bin".
This is nonstandard - PATH should contain real paths. Bash supports it as an extension (on my system, when invoked as bash
but not when invoked as sh
) but not all tools do. In particular the npm-which
library used by coc to find the binary doesn't support this.
You can fix this by unquoting the ~ so the shell will expand it:
[[ ":$PATH:" != *:~/.local/bin/:* ]] && PATH=~/.local/bin/:"${PATH}"
from coc-clangd.
What's the output which clangd
?
from coc-clangd.
So which clangd
doesn't output anything which I find strange. Could this be related? I am definitely accessing clangd through the symlink at ~/.local/bin/clangd
because when I change its name I get a No such file or directory
.
from coc-clangd.
which clangd
will find clangd
from your $PATH, no output means we can't find it from $PATH. How do you add ~/.local/bin/
to your $PATH?
from coc-clangd.
echo $PATH
contains ~/.local/bin/
. I added it with [[ ":$PATH:" != *":~/.local/bin/:"* ]] && PATH="~/.local/bin/:${PATH}"
in my .bashrc
.
When I run ~/.local/bin/clangd
it works as normal. Does which work with symlinks? I am very confused... Thank you for your help
from coc-clangd.
What's the output do you run clangd
directly? Without ~/.local/bin/
.
from coc-clangd.
Maybe this series of commands will be of help. This was done in a fresh new terminal.
$ hash
hash: hash table empty
$ type clangd
clangd is /Users/<MY_USERNAME>/.local/bin/clangd
$ which clangd
$ clangd
clangd is a language server that provides IDE-like features to editors.
It should be used via an editor plugin rather than invoked directly. For more information, see:
https://clang.llvm.org/extra/clangd/
https://microsoft.github.io/language-server-protocol/
clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment variable.
I[12:13:51.794] clangd version 10.0.0
I[12:13:51.794] PID: 37985
I[12:13:51.795] Working directory: /Users/<MY_USERNAME>
I[12:13:51.795] argv[0]: clangd
I[12:13:51.795] Starting LSP over stdin/stdout
**I pressed Ctrl-C to kill it**
^CE[12:13:54.356] Transport error: Got signal, shutting down
I[12:13:54.356] LSP finished, exiting with status 1
$ type clangd
clangd is hashed (/Users/<MY_USERNAME>/.local/bin/clangd)
$ hash
hits command
1 /usr/bin/which
1 /Users/<MY_USERNAME>/.local/bin/clangd
$ readlink -f /Users/<MY_USERNAME>/.local/bin/clangd
/usr/local/Cellar/llvm/10.0.0_3/bin/clangd
I understand this may not be coc-clangd's problem and I appreciate the help.
from coc-clangd.
ln -s /usr/local/bin/clangd /$HOME/.config/coc/extensions/coc-clangd-data/install/10.0.0/clangd_10.0.0/bin/clangd
from coc-clangd.
Related Issues (20)
- stdint.h Library error HOT 1
- Question: navigate to conflicting item/item causing error? HOT 4
- clangd don't start on windows HOT 1
- Unable to locate C/C++ header files (stdio.h, etc.) HOT 1
- coc-clangd still use c++03 to diagnose HOT 1
- some error flag but the code can running HOT 1
- How do I remove the automatically added parameter label in parentheses? HOT 1
- An issue of including libraries HOT 9
- Duplicate references HOT 2
- Command CocCommand clangd.install fails with error 'Failed to install clangd language server' HOT 5
- 这个插件如何在补全头文件比如#include<iostream>时,光标在>的右边,否则每次都多跳过这个符号一次 HOT 1
- [coc.nvim] Connection to server got closed. Server will not be restarted. HOT 4
- 'iostream' file not found (clang pp_file_not_found) HOT 1
- Connection to server got closed HOT 1
- coc-clangd没有输入头文件的情况下也能补全 HOT 4
- Header file not found, even though autocompletion works and include path is added correctly HOT 5
- MinGW issue HOT 1
- MinGW issue
- It can support like [c-mantic] feature? HOT 1
- Env include path not working in header files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-clangd.