SIGN IN SIGN UP

input: add InputState::refresh to apply runtime LSP provider changes (#2491)

Closes #2476

## Description

The `InputState.lsp` provider fields are public, but assigning them at
runtime does not refresh the editor until the text next changes.

This adds `InputState::refresh(cx)`, which flags a pending update so the
next render re-runs syntax highlighting and the LSP providers (not just
a redraw).

```rust
input.update(cx, |state, cx| {
    state.lsp.hover_provider = Some(provider);
    state.refresh(cx);
});
```

## How to Test

Create an InputState, assign an `lsp` provider at runtime, then call
`refresh` and watch the input update without editing text.

- Attach an LSP provider (hover / document color / semantic tokens) at
runtime, call `refresh`, confirm it takes effect without editing text
- Swap providers at runtime and `refresh`; confirm old results clear and
the new provider runs

## Checklist

- [x] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document and
followed the guidelines.
- [x] Reviewed the changes in this PR and confirmed AI generated code
(If any) is accurate.
- [x] Passed `cargo run` for story tests related to the changes.
- [ ] Tested macOS, Windows and Linux platforms performance (if the
change is platform-specific)

Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: ScottCUSA <ScottCUSA@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
S
Scott Cummings committed
11399efc26a6357a8de2c1dd474643099feabdad
Parent: 3bb6965
Committed by GitHub <noreply@github.com> on 7/6/2026, 8:07:09 AM