You will probably need to do some additional configuration. The LSP notes discuss this a bit.

The clangd configuration page describes how to manually configure compile flags and other behaviors using a ".clangd" YAML file at the root level of the directory.

A suitably configured `.clangd` file might have a `CompileFlags:` section which specifies include directories and other things that will help make clangd behave more usefully for you.

The configuration page is here: <https://clangd.llvm.org/config>.

R.

On Jun 29, 2023, at 7:42 PM, Tom M <tom...@themorfords.com> wrote:

Hello,

I have installed the clangd language server and symlinked it to /usr/local/bin[1]. The server is also clearly found and “ready to start” according to Preferences:

<Screen Shot 2023-06-29 at 10.41.35 AM.png>


 When I open a C file in BBEdit, the language server does start, as shown by `pgrep clangd` and by the log file[2]. However, it only shows a gray circle:

<Screen Shot 2023-06-29 at 10.44.53 AM.png>


According to the BBEdit LSP documentation, this means that “the server has not (yet) returned any diagnostics information for this file.” The problem is that I’m not sure how to get it to produce any such info. I get the same issue with every other language server that I’ve tried, including Python (jedi-language-server) and Go (gopls). All three language servers “just work” in VS Code.

Any help would be much appreciated!


[1] Using the following commands:

brew install llvm
for f in /usr/local/opt/llvm/bin/*; do ln -s "$f" "/usr/local/bin/${f##*/}"; done

`which clangd` shows /usr/local/bin/clangd.


[2] The contents of “~/Library/Containers/com.barebones.bbedit/Data/Library/Logs/BBEdit/LanguageServerProtocol-ANSI C.txt” (via the BBEdit/Folders/Logs menu) from the most recent invocation are shown below. The latter three lines were added when I quit BBEdit.

================================================================================
2023-06-28 23:11:05.536: Application startup: 14.6.6 (14D78), r29014
2023-06-28 23:11:05.536: macOS version: 11.7.7 (20G1345)
2023-06-28 23:11:05.540: Waiting for server startup to complete...
2023-06-28 23:11:05.835: ...completed server startup.
2023-06-29 09:59:52.994: Stopped language server for ANSI C
2023-06-29 09:59:52.994: Cleaning up after normal server shutdown.
2023-06-29 10:00:11.010: CLanguageModule.mm:2607: calling _StartLSPServer.

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/9bb070f7-ab9d-49fd-9980-fd5f0d3bd7f6n%40googlegroups.com.
<Screen Shot 2023-06-29 at 10.41.35 AM.png>
<Screen Shot 2023-06-29 at 10.44.53 AM.png>

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/8E08AEE8-88FF-462D-974F-FADE6249ECD3%40barebones.com.

Reply via email to