Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the language server into toolchain's busybox. #4469

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Nov 1, 2024

Removes the separate language server binary; I'm not sure we need to provide it. Instead, carbon language-server is added as a subcommand.

Moves //language_server to //toolchain/language_server. Splits into a trivial language_server.h, and a substantive server.h. I wasn't sure about a better name, but wanted the split similar to check/check.h, lex/lex.h, etc. At the same time, the class is probably going to be a little big so not a good fit to through into just a cpp file.

This fixes some style issues with the language server class, but generally I'm trying to not address things here in order to keep it simpler.

@github-actions github-actions bot added infrastructure toolchain utilities Utilities for working with Carbon code: syntax highlighting, editor plugins, etc. labels Nov 1, 2024

const std::unique_ptr<clang::clangd::Transport> transport_;
// content of files managed by the language client.
std::unordered_map<std::string, std::string> files_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you removed the include of <unordered_map> but kept the map. Can that be fixed somehow? (Also we should include <memory> for unique_ptr.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added includes

clang::clangd::DocumentSymbolParams const& params,
clang::clangd::Callback<std::vector<clang::clangd::DocumentSymbol>> cb);
clang::clangd::Callback<std::vector<clang::clangd::DocumentSymbol>> cb)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to include <vector> for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added includes

@jonmeow jonmeow added this pull request to the merge queue Nov 1, 2024
Merged via the queue into carbon-language:trunk with commit 145c44b Nov 1, 2024
8 checks passed
@jonmeow jonmeow deleted the busybox-lsp branch November 1, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure toolchain utilities Utilities for working with Carbon code: syntax highlighting, editor plugins, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants