Skip to content

Agent service not initialized #321

Description

@karamanliev

Hello, I get this error every time I attach to a buffer for the first time after entering neovim, then entering insert mode and starting to write immediately:

RPC[Error] code_name = ServerNotInitialized, message = "Agent service not initialized."

It's consistent and it happens 100% of the time. I'm pretty much using a default config:

  {
    'zbirenbaum/copilot.lua',
    enabled = true,
    cmd = 'Copilot',
    event = { 'InsertEnter' },
    config = function()
      local colors = require('tokyonight.colors').setup()
      vim.api.nvim_set_hl(0, 'CopilotSuggestion', { fg = colors.fg_dark })

      require('copilot').setup({
        panel = {
          enabled = true,
          keymap = {
            open = '<M-p>',
          },
        },
        suggestion = {
          enabled = true,
          auto_trigger = true,
          keymap = {
            accept = false,
            next = '<M-]>',
            prev = '<M-[>',
            dismiss = '<C-c>',
          },
        },
        filetypes = {
          yaml = false,
          markdown = false,
          help = false,
          gitcommit = false,
          gitrebase = false,
          hgcommit = false,
          svn = false,
          cvs = false,
          ['.'] = false,
        },
      })

      -- Enable <Tab> to indent if no suggestions are available
      vim.keymap.set('i', '<Tab>', function()
        if require('copilot.suggestion').is_visible() then
          require('copilot.suggestion').accept()
        else
          vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Tab>', true, false, true), 'n', false)
        end
      end, { desc = 'Super Tab', silent = true })
    end,
  },

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions