google / google/tensorstore

Document process for configuring clangd language server for use with tensorstore code base

Open
#279 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.5k
Forks
145
PR merge metrics
No merged PRs in 30d

Description

- Editing tensorstore in vscode in conjunction with clangd language server is useful, especially for automatically resolving IWYU issues in `#includes`. The following process worked for me most recently in https://github.com/google/tensorstore/pull/277

1. Install [bazel-compile-commands-extractor](https://github.com/hedronvision/bazel-compile-commands-extractor) with this [patch](https://github.com/hedronvision/bazel-compile-commands-extractor/issues/199#issuecomment-2171801086), using the WORKSPACE install method to obtain `compile_commands.json`
2. Then install clangd for language server functionality (dependent on `compile_commands.json`)
3. Add the following to `.clangd`
```
Diagnostics:
UnusedIncludes: Strict
MissingIncludes: Strict
```

The above has been quickly noted for future use. Probably a good place for it would be in the `Building and Installing` section of the docs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.