Skip to content

Fix session picker module import and formatting #122

Description

@nakhan98

Summary

  • change the session picker to require opencode.api instead of the nonexistent lua.opencode.api
  • ensure vim.ui.select receives strings so its formatter no longer raises a concat error

Environment

  • vim-plug used for plugin management
  • Local checkout via Plug '~/dev/github/opencode.nvim' in init.vim
  • macOS 15.7.2 with Neovim 0.11.5
  • Opencode version 1.0.65

Snippets

-- lua/opencode/ui/session_picker.lua
-local api = require('lua.opencode.api')
+local api = require('opencode.api')
-- lua/opencode/ui/ui.lua
-local parts = { { session.id } }
+local parts = { session.id }

Error Logs

Error executing Lua callback: .../lua/opencode/ui/session_picker.lua:5: module 'lua.opencode.api' not found
  no file './lua/opencode/api.lua' ...
  ?
Error executing Lua callback: .../lua/vim/ui.lua:48: invalid value (table) at index 1 in table for 'concat'
Stack traceback: ...

Testing

  • not run (per agent instructions)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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