Skip to content

Commit

Permalink
Make common lsp-libraries, useful to build a language server, public.
Browse files Browse the repository at this point in the history
This makes it easier to integrate in other projects that would like
to use these without having to mess with the visibility.
  • Loading branch information
hzeller committed Nov 23, 2024
1 parent a2dc303 commit a9fd791
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions verible/common/lsp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# LSP is using JSON-PRC [2] for the RPC protocol, the transport layer chunks
# messages with header+body blocks, similar to HTTP.
#
# All libraries needed to build a language server have the public visibility
# as they are very useful in itself to build language servers in other projects.
#
# [1]: https://microsoft.github.io/language-server-protocol/specification
# [2]: https://www.jsonrpc.org/specification

Expand All @@ -20,6 +23,7 @@ cc_library(
name = "message-stream-splitter",
srcs = ["message-stream-splitter.cc"],
hdrs = ["message-stream-splitter.h"],
visibility = ["//visibility:public"],
deps = [
"//verible/common/util:status-macros",
"@com_google_absl//absl/status",
Expand Down Expand Up @@ -50,6 +54,7 @@ cc_library(
"//conditions:default": ["-fexceptions"],
}),
features = ["-use_header_modules"], # precompiled headers incompatible with -fexceptions.
visibility = ["//visibility:public"],
deps = [
"//verible/common/util:logging",
"@com_google_absl//absl/strings:string_view",
Expand Down Expand Up @@ -85,17 +90,20 @@ genrule(
cc_library(
name = "lsp-protocol",
hdrs = ["lsp-protocol.h"],
visibility = ["//visibility:public"],
deps = ["@jsonhpp//:singleheader-json"],
)

cc_library(
name = "lsp-protocol-enums",
hdrs = ["lsp-protocol-enums.h"],
visibility = ["//visibility:public"],
)

cc_library(
name = "lsp-protocol-operators",
hdrs = ["lsp-protocol-operators.h"],
visibility = ["//visibility:public"],
deps = [":lsp-protocol"],
)

Expand All @@ -114,6 +122,7 @@ cc_library(
name = "lsp-text-buffer",
srcs = ["lsp-text-buffer.cc"],
hdrs = ["lsp-text-buffer.h"],
visibility = ["//visibility:public"],
deps = [
":json-rpc-dispatcher",
":lsp-protocol",
Expand Down Expand Up @@ -142,6 +151,7 @@ cc_library(
name = "lsp-file-utils",
srcs = ["lsp-file-utils.cc"],
hdrs = ["lsp-file-utils.h"],
visibility = ["//visibility:public"],
deps = [
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
Expand Down

0 comments on commit a9fd791

Please sign in to comment.