Skip to content

LSP error with telescope pickers while using augment.vim #11

@FelixLisczyk

Description

@FelixLisczyk

I get an LSP error when using Telescope pickers while augment.vim is installed. I first noticed this issue while using pickers in the xcodebuild.nvim plugin, but the problem occurs even without that plugin. The error goes away when I uninstall augment.vim.

Steps to Reproduce:

  1. Install augment.vim plugin
  2. Add the minimal reproduction code to your Neovim config (see below)
  3. Trigger the telescope picker with <leader>q
  4. Observe the error (see below)

Expected Behavior:
The picker should work normally without LSP-related errors while augment.vim is installed.

Actual Behavior:
The following error occurs:

Error executing lua callback: .../neovim/0.10.4_1/share/nvim/runtime/lua/vim/lsp/sync.lua:180: attempt to get length of local 'prev_line' (a nil value)
stack traceback:
        .../neovim/0.10.4_1/share/nvim/runtime/lua/vim/lsp/sync.lua:180: in function 'compute_start_range'
        .../neovim/0.10.4_1/share/nvim/runtime/lua/vim/lsp/sync.lua:416: in function 'compute_diff'
        ...0.4_1/share/nvim/runtime/lua/vim/lsp/_changetracking.lua:106: in function 'incremental_changes'
        ...0.4_1/share/nvim/runtime/lua/vim/lsp/_changetracking.lua:311: in function 'send_changes_for_group'
        ...0.4_1/share/nvim/runtime/lua/vim/lsp/_changetracking.lua:348: in function 'send_changes'
        ...ellar/neovim/0.10.4_1/share/nvim/runtime/lua/vim/lsp.lua:580: in function <...ellar/neovim/0.10.4_1/share/nvim/runtime/lua/vim/lsp.lua:574>

Minimal Reproduction:

local function show_minimal_picker()
  local pickers = require("telescope.pickers")
  local finders = require("telescope.finders")
  local conf = require("telescope.config").values

  local picker = pickers.new({}, {
    prompt_title = "Minimal Picker",
    finder = finders.new_table({
      results = { "Test" },
    }),
    sorter = conf.generic_sorter(),
  })

  picker:find()

  -- Trigger LSP change tracking
  vim.api.nvim_buf_set_lines(0, 0, -1, false, { "Triggering LSP changes..." })
end

return {
  {
    "augmentcode/augment.vim",
    config = function()
      vim.keymap.set("n", "<leader>q", show_minimal_picker, { desc = "Show Minimal Picker" })
    end,
  },
}

Environment:

  • Neovim version: 0.10.4
  • Telescope version: 0.1.8
  • augment.vim version: 0.21.0
  • Operating System: macOS 15.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions