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

Copilot doesn't work after loading a session #68

Open
D00mch opened this issue Dec 28, 2022 · 1 comment
Open

Copilot doesn't work after loading a session #68

D00mch opened this issue Dec 28, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@D00mch
Copy link

D00mch commented Dec 28, 2022

Bug description

Copilot doesn't wokin after loading a session.

Created an issue in copilot:

When I open Neovim and run the :Copilot auth command, I see the output [Copilot] Authenticated as GitHub user: D00mch. I can still see the same output if I open a file with :e <path> after loading the session.

However, if I load a session with Neovim Session Manager and run the same command, I see the output [Copilot] Not running.

Recommended to go here:

Looks like Neovim lost track of the LSP server that Copilot starts. You should probably ask about this problem on neovim-session-manager, since they'll have better idea why this might happen.

Steps to reproduce

Minimal configuration

Disable autoload_mode

local sconf, sessions = require("session_manager.config"), require("session_manager")
sessions.setup({autoload_mode = sconf.AutoloadMode.Disabled})

Setup Copilot:

use {
  "zbirenbaum/copilot.lua",
  event = "VimEnter",
  config = function()
    vim.defer_fn(function()
      require("copilot").setup()
    end, 100)
  end,
}

Expected behavior
After I load a session, Copilot continues working.

Environment

  • OS: OSX
  • Plugins commit hash: f8c85da

Workaround

Have a keymap to setup copilot manually after loading a session.

@D00mch D00mch added the bug Something isn't working label Dec 28, 2022
@Shatur
Copy link
Owner

Shatur commented Dec 28, 2022

Hi! This could happen because we shutdown all LSP servers. You probably should ask copilot.lua to re-enable copilot after restarting LSP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants