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

feat(lsp): document highlight #14898

Merged
merged 4 commits into from
Jan 23, 2025
Merged

feat(lsp): document highlight #14898

merged 4 commits into from
Jan 23, 2025

Conversation

blindFS
Copy link
Contributor

@blindFS blindFS commented Jan 23, 2025

Description

This is a minor feature that highlights all occurrences of current variable/command in current file:

image

Since this kind of request happens a lot with fixed document content, to avoid unnecessary parsing, this PR caches the StateDelta to the server.

User-Facing Changes

Can be disabled on the client side.

Tests + Formatting

Implementation is directly borrowed from references, only one simple test case added.

After Submitting

@fdncred fdncred merged commit f0f6b3a into nushell:main Jan 23, 2025
15 checks passed
@github-actions github-actions bot added this to the v0.102.0 milestone Jan 23, 2025
@fdncred
Copy link
Collaborator

fdncred commented Jan 23, 2025

Thanks. Let's try it. The change StateDelta seemed pretty benign.

@fdncred fdncred added the LSP Language Server Protocol (nu-lsp) label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LSP Language Server Protocol (nu-lsp)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants