local buf = vim.fn.bufnr('server/src/search.rs') if buf == -1 then vim.cmd('e server/src/search.rs') buf = vim.api.nvim_get_current_buf() end vim.api.nvim_buf_set_lines(buf, 216, 222, false, { ' &self,', ' entities: &[Entity],', ' tasks: &[Task],', ' snippets: &[Snippet],', ' adrs: &[Adr],' }) -- We need to change the loop variables inside the task from values to clones if they are passed as slices -- Actually we can just clone the slice data before moving it into spawn_blocking vim.api.nvim_buf_set_lines(buf, 222, 223, false, { ' ) -> tokio::task::JoinHandle> {', ' let entities = entities.to_vec();', ' let tasks = tasks.to_vec();', ' let snippets = snippets.to_vec();', ' let adrs = adrs.to_vec();' }) vim.cmd('write') require('notify')('Updated search index_batch signature', 'info', { title = 'Antigravity' }) return 'ok'