Skip to content

Commit 5105e04

Browse files
Enable IDE support in emacs.
1 parent d4d6a4d commit 5105e04

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

WORKSPACE

+33
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,36 @@ git_repository(
1111
remote = "https://github.com/google/googletest",
1212
shallow_since = "1631811621 -0400",
1313
)
14+
15+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
16+
17+
#####
18+
# Hedron's tools are needed to enable some kinds of IDE support in emacs.
19+
20+
# Hedron's Compile Commands Extractor for Bazel
21+
# https://github.com/hedronvision/bazel-compile-commands-extractor
22+
http_archive(
23+
name = "hedron_compile_commands",
24+
25+
# Replace the commit hash (0e990032f3c5a866e72615cf67e5ce22186dcb97) in both places (below) with the latest (https://github.com/hedronvision/bazel-compile-commands-extractor/commits/main), rather than using the stale one here.
26+
# Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
27+
url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/a14ad3a64e7bf398ab48105aaa0348e032ac87f8.tar.gz",
28+
strip_prefix = "bazel-compile-commands-extractor-a14ad3a64e7bf398ab48105aaa0348e032ac87f8",
29+
# When you first run this tool, it'll recommend a sha256 hash to put here with a message like: "DEBUG: Rule 'hedron_compile_commands' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = ..."
30+
)
31+
32+
load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
33+
34+
hedron_compile_commands_setup()
35+
36+
load("@hedron_compile_commands//:workspace_setup_transitive.bzl", "hedron_compile_commands_setup_transitive")
37+
38+
hedron_compile_commands_setup_transitive()
39+
40+
load("@hedron_compile_commands//:workspace_setup_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive")
41+
42+
hedron_compile_commands_setup_transitive_transitive()
43+
44+
load("@hedron_compile_commands//:workspace_setup_transitive_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive_transitive")
45+
46+
hedron_compile_commands_setup_transitive_transitive_transitive()

0 commit comments

Comments
 (0)