nomnivore / ollama.nvim

A plugin for managing and integrating your ollama workflows in neovim.
MIT License
311 stars 22 forks source link

macos: vim.schedule error #14

Closed alankritjoshi closed 6 months ago

alankritjoshi commented 6 months ago

sorry, i am new to nvim (using lazy.nvim).

Getting this after trying to run any of the plugin's commands. Any idea on how to get around this issue?

   Error  23:50:59 msg_show.lua_error Error executing vim.schedule lua callback: ...i/.local/share/nvim/lazy/ollama.nvim/lua/ollama/init.lua:173: start_col must be less than end_col
stack traceback:
    [C]: in function 'nvim_buf_get_text'
    ...i/.local/share/nvim/lazy/ollama.nvim/lua/ollama/init.lua:173: in function 'parse_prompt'
    ...i/.local/share/nvim/lazy/ollama.nvim/lua/ollama/init.lua:249: in function 'callback'
    ...i/.local/share/nvim/lazy/ollama.nvim/lua/ollama/init.lua:205: in function 'on_choice'
    ...are/nvim/lazy/dressing.nvim/lua/dressing/select/init.lua:78: in function ''
    vim/_editor.lua: in function <vim/_editor.lua:0>
nomnivore commented 6 months ago

Can you describe the exact steps to reproduce this error? Specifically, I want to know:

Are you using a prompt that includes a $sel (selection) token? How are you running the prompt command? Are you selecting text using visual mode before running the command?

Thanks!

alankritjoshi commented 6 months ago

Thanks for the help! In my usage, my key bindings were unselecting the selected tokens when executing the plug-in functions. Works!