Interactive refactoring in gopls
gopls now supports interactive refactoring through a proposed Language Server Protocol extension, co-designed with the Dart team, that lets language servers ask the user for input before computing edits. Previously, LSP code actions were effectively parameterless, so gopls had to guess, for example always emitting camelCase json struct tags, or skip a refactoring entirely. The new mechanism enables configurable Add/Remove struct tags, Implement Interface with workspace symbol search and type-argument prompts, and a previewed Move Declaration that carries dependent helpers and fixes imports. It ships in gopls v0.24.0 and vscode-go v0.56.0, with Change Signature, conflict resolution and interactive test/benchmark configuration on the roadmap.
Related posts
- Zed Weekly: #26
Zed mediumAdeptZed's team reports progress porting the editor to GPUI 2, including a new action- and key-context-based keyboard handling API shown with a Rust menu example. Other updates: tsserver integration broke when an upstream LSP wrapper removed deprecated CLI flags, a reminder to track changes in unpinnable dependencies. The theme system now models user themes as overlays on a base theme, and a Cargo feature flag breaks the circular dependency between the theme importer and the generated themes it emits. Smaller notes cover Prettier and diagnostics fixes, component stories, telemetry, and passing 1000 weekly active installs.
- Copilot x Zed
Zed mediumAdeptGitHub Copilot is now available in Zed v0.82, integrated by reusing the undocumented, minified Copilot LSP server shipped in the Neovim plugin, which Zed's built-in LSP support could drive directly. Supporting it required a new modal UI for Copilot's device-code OAuth flow and a 'suggestions' layer in Zed's DisplayMap that splices styled multi-line text into the buffer alongside folding and wrapping, covered by randomized testing. To keep it from being intrusive, Zed added per-language disable settings and a 75ms debounce, and gives the language's real LSP autocomplete priority over Copilot on conflicts.
- Zed Weekly: #23
Zed mediumAdeptZed's weekly team update covers a fix for typing lag with autocomplete. Completion re-filtering was offloaded to background workers, but a higher-level callsite blocked the UI thread waiting on that future, so the re-filter now runs without blocking and races the re-request to the language server. Other items: UI components migrated to the latest GPUI with stories now living beside each component, GPUI 2's stateless element model requiring IDs on stateful elements such as click handlers, prettier and Vue.js integration in the next preview, Universal Links, channel permissions and a notifications panel.
- Enabling low-latency, syntax-aware editing using Tree-sitter
Zed mediumAdeptZed builds its syntax-aware features on Tree-sitter, a GLR-based incremental parsing framework with error recovery that produces concrete syntax trees. Syntax-aware selection uses the CST directly. Highlighting, symbol outlines, auto-indentation and language injections are each driven by declarative Tree-sitter queries, which compile to state machines matched in a single depth-first walk, so adding a language needs only a grammar and query files. Injected trees, such as JavaScript inside HTML or Rust macro arguments, are kept in a copy-on-write B-tree called a sum tree, which lets edits be re-parsed incrementally on a background thread while the main thread keeps reading the previous snapshot.
- Zed Weekly: #17
Zed easyNoviceWeekly team update from the Zed editor team covering AI features, channels, language support and UI work. Highlights include an inline assistant that needed a custom incremental diff algorithm to apply GPT's token-by-token stream as edit hunks, an eager/lazy operation queue for the semantic index, and per-language and per-syntax-scope word-character configuration so PHP `$` variables and kebab-case Tailwind classes inside JSX autocomplete correctly. Other items cover vim relative line numbers and `.` repeat, collaborative markdown channel notes, Taffy-based layout with Tailwind-style Rust helpers, inlay hint resolve work that could shrink rust-analyzer responses by over 50%, and a version-string sorting bug that appeared when versions rolled from 0.99 to 0.100.