Skip to content

feat(ai): sidekick.nvim Copilot Next Edit Suggestions (NES) - #69

Open
arif-assistant wants to merge 1 commit into
nightlyfrom
feat/sidekick-nes-copilot
Open

feat(ai): sidekick.nvim Copilot Next Edit Suggestions (NES)#69
arif-assistant wants to merge 1 commit into
nightlyfrom
feat/sidekick-nes-copilot

Conversation

@arif-assistant

Copy link
Copy Markdown
Collaborator

Summary

Adds folke/sidekick.nvim for Copilot Next Edit Suggestions (NES), alongside the existing copilot.vim inline completion (complementary, not a replacement).

Changes

  • keymaps: normal-mode <Tab> = jump/apply pending NES else request one; <Esc> = dismiss pending NES else original :noh. Replaces the rarely-used FlipPinnedTab.
  • ai.lua: folke/sidekick.nvim spec (NES only; nes.clear.esc=false so the central <Esc> owns the key).
  • lsp.lua: remove treesitter incremental-selection <Tab>/<S-Tab> (frees <Tab>); document that copilot.vim already provides the copilot vim.lsp client sidekick uses (no dedicated client needed).
  • lazy-lock: pin sidekick.nvim.
  • docs/sidekick-nes-investigation.md: full writeup.

Investigation / findings (why NES shows nothing yet)

Verified end-to-end on an authenticated instance:

  • auth OK; network OK (inline completion returns items); NES feature flag on (ide_enable_copilot_nes_nonfree_enabled = true); client attaches; request shape matches copilot-lsp & sidekick.
  • textDocument/copilotInlineEdit returns edits: [] (empty) across: copilot.vim's client and a dedicated latest-server (1.520) client; triggerKind none/1/2; nextEditSuggestions.enabled=true+didChangeConfiguration; real typed edits polled 6×; didFocus sent; editor identity Neovim/vscode/copilot.vim.

Conclusion: the Neovim/sidekick/copilot config is correct and complete. have()==false faithfully reflects that the Copilot backend returns no Next-Edit for this account/context — a server-side/account matter (compare with VS Code NES on the same account; check Copilot settings/policy). When the backend returns edits, sidekick surfaces them via the <Tab>/<Esc> maps automatically.

Note: excludes unrelated concurrent working-tree edits (ai.lua all_theirsaccept_theirs, lazy-lock rustaceanvim branch flip).

- keymaps: normal-mode <Tab> (jump/apply NES, else request one) and layered
  <Esc> (dismiss pending NES, else original :noh). Replaces FlipPinnedTab.
- ai.lua: folke/sidekick.nvim spec (NES only, nes.clear.esc=false); complements
  copilot.vim inline completion, which coexists by mode.
- lsp.lua: remove treesitter incremental-selection <Tab>/<S-Tab> (frees <Tab>
  for NES); document that copilot.vim already supplies the copilot LSP client
  sidekick uses (no dedicated client needed).
- lazy-lock: pin sidekick.nvim.
- docs: full integration + NES investigation writeup.

Investigation: verified end-to-end (auth, network, NES feature flag
ide_enable_copilot_nes_nonfree_enabled=true, request shape matches
copilot-lsp/sidekick). textDocument/copilotInlineEdit still returns empty edits
while inlineCompletion works -> server-side/account limitation, not a config
bug. Details in docs/sidekick-nes-investigation.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant