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

refactor(lsp): remove useless logging & methods #16

Merged
merged 1 commit into from
Dec 15, 2024
Merged

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Dec 15, 2024

What does this change?

Just some small changes, using existing methods instead of new ones, renamed settings etc.

How is it tested?

N/A

How is it documented?

N/A

@github-actions github-actions bot added crt:weblsp Changes in the WEBlsp crate. pkg:vscode Changes in the VScode extension. labels Dec 15, 2024
let _init_params: InitializeParams = serde_json::from_value(init_params).unwrap();

for msg in &connection.receiver {
// TODO: Handle trace levels and notifications instead of just printing them to stderr.
eprintln!("new msg: {:?}", msg);
Copy link
Member Author

@Princesseuh Princesseuh Dec 15, 2024

Choose a reason for hiding this comment

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

This log is unnecessary, you can set weblsp.trace.server to either messages or verbose for the client to output what messages you received / sent

// Handle the rest of the messages.
match msg {
Message::Request(req) => {
let request =
requests::handle_request(req, &mut css_language_service, &connection)?;
match connection.handle_shutdown(&req) {
Copy link
Member Author

Choose a reason for hiding this comment

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

didn't know this existed when I made the initial shutdown support, turns out this does the same as what I did manually. We still need a global state eventually

Copy link

codspeed-hq bot commented Dec 15, 2024

CodSpeed Performance Report

Merging #16 will improve performances by ×2.2

Comparing refactor/lsp (77081a1) with main (e4880c7)

Summary

⚡ 1 improvements
✅ 11 untouched benchmarks

Benchmarks breakdown

Benchmark main refactor/lsp Change
weblsp - Folding Ranges 1,901.7 µs 877.9 µs ×2.2

@goulvenclech goulvenclech changed the title refactor(lsp): LSP refactor refactor(lsp): remove useless logging & methods Dec 15, 2024
@goulvenclech goulvenclech merged commit 4237fdc into main Dec 15, 2024
7 checks passed
@goulvenclech goulvenclech deleted the refactor/lsp branch December 15, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crt:weblsp Changes in the WEBlsp crate. pkg:vscode Changes in the VScode extension.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants