Resolved! I'm not exactly sure what fixed it, but notably I enabled sandbox 
access and reinstalled Brew (and, by extension, its packages and npm's 
packages).

Thanks!
Tom
On Tuesday, July 4, 2023 at 7:20:55 AM UTC-7 Rich Siegel wrote:

> I have no reason to believe that compile_commands.json is at issue. 
>
> You may need to turn on additional logging in clangd via the command line 
> options.
>
> What if you put the project somewhere on your home directory, rather than 
> in /tmp?
>
> R.
>
> On Jul 4, 2023, at 1:29 PM, Tom M <[email protected]> wrote:
>
> Hello Rich,
>
>
> Thanks for the response.
>
> I don't believe that the compile_commands.json file is the (main) issue. I 
> tried generating the file[1] using cmake[2], but even after restarting 
> BBEdit continues to display a gray dot in the editor (and a green circle in 
> the "Installed Languages" list). The same thing happens for Python 
> (jedi-language-server), Go (gopls), and Fortran (fortran-language-server). 
> Again, these all work after installing the proper extensions in VS Code. 
> BBEdit's logs do list errors for Go and Fortran though; see attached files.
>
> Thanks,
> Tom
>
>
> [1] compile_commands.json contents:
> [
> {
>   "directory": "/tmp/a",
>   "command": 
> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
>  
>    -isysroot 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk
>  
> -mmacosx-version-min=11.7 -o CMakeFiles/a.dir/a.c.o -c /tmp/a/a.c",
>   "file": "/tmp/a/a.c",
>   "output": "CMakeFiles/a.dir/a.c.o"
> }
> ]
>
>
> [2] version 3.26.4; CMakeLists.txt contents:
> cmake_minimum_required (VERSION 2.6)
> project(A)
> set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
> add_executable(a a.c)
>
> On Thursday, June 29, 2023 at 12:08:14 PM UTC-7 Rich Siegel wrote:
>
>> 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 <[email protected]> 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 
>> <https://www.barebones.com/support/bbedit/lsp-notes.html>, 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 "[email protected]" 
>> 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 [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/9bb070f7-ab9d-49fd-9980-fd5f0d3bd7f6n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/bbedit/9bb070f7-ab9d-49fd-9980-fd5f0d3bd7f6n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>> <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 "[email protected]" 
> 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 [email protected].
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/bfb3fb44-2ed9-4223-a1c9-254e037cfc63n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/bfb3fb44-2ed9-4223-a1c9-254e037cfc63n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> <LanguageServerProtocol-Go.txt>
> <LanguageServerProtocol-Python.txt>
> <LanguageServerProtocol-Fortran 9x.txt>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/2ea75547-9e4b-4e5e-9f78-76b4840cf40cn%40googlegroups.com.

Reply via email to