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

No completion results #256

Open
Vacate9643 opened this issue Jul 28, 2024 · 0 comments
Open

No completion results #256

Vacate9643 opened this issue Jul 28, 2024 · 0 comments

Comments

@Vacate9643
Copy link

Vacate9643 commented Jul 28, 2024

Hi, thanks for your work.

I've unfortunately not been able to get any completions from Cody with good healthchecks and even manually set up environment variables. Forcing Cody to give a completions results in {}.

    {
      "sourcegraph/sg.nvim",
      dependencies = { "nvim-lua/plenary.nvim",
        {
          "hrsh7th/nvim-cmp",
          opts = function(_, opts)
            table.insert(opts.sources, {
              name = "cody",
            })
          end
        }
      },

      event = "VeryLazy",

      config = function()
        require("sg").setup({})

        local cody = require("sg.cody.commands")

        local map = function(mode, keys, func, desc)
          if desc then
            desc = "CODY: " .. desc
          end
          vim.keymap.set(mode, keys, func, { desc = desc })
        end

        map("n", "<leader>ac", function()
          local request = {}
          request.row, request.col = unpack(vim.api.nvim_win_get_cursor(0))
          request.filename = vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf())
          cody.autocomplete(request, function(data)
            vim.print(data)
          end)
        end, "[a]sk cody to auto[c]omplete")
      end,
    },

May be related:
#207

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

No branches or pull requests

1 participant