Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Lua error when try to open help for selected word #62

Closed
kobzar opened this issue Oct 27, 2023 · 2 comments
Closed

Lua error when try to open help for selected word #62

kobzar opened this issue Oct 27, 2023 · 2 comments

Comments

@kobzar
Copy link

kobzar commented Oct 27, 2023

Make Fetch and install python3.11
Run DevOpsOpen(any variant)
Find needed method - for example pathlib.Path.mkdir
press Enter key and got the error

E5108: Error executing lua: ...e/nvim/lazy/nvim-devdocs/lua/nvim-devdocs/operations.lua:279: Expected Lua number
stack traceback:
	[C]: in function 'nvim_buf_set_option'
	...e/nvim/lazy/nvim-devdocs/lua/nvim-devdocs/operations.lua:279: in function 'open'
	...hare/nvim/lazy/nvim-devdocs/lua/nvim-devdocs/pickers.lua:79: in function 'open_doc'
	...hare/nvim/lazy/nvim-devdocs/lua/nvim-devdocs/pickers.lua:168: in function 'run_replace_or_original'
	...re/nvim/lazy/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
	...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:257: in function <...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:256>
@luckasRanarison
Copy link
Owner

luckasRanarison commented Oct 27, 2023

Did you set a custom value to row or col in float_win? Also could you provide your neovim version and the config used?

@kobzar
Copy link
Author

kobzar commented Oct 27, 2023

I am use LazyVim
https://www.lazyvim.org/configuration/plugins

Neovim: 0.9.4

I was try with different configuration like default e.t.c

return {
  "luckasRanarison/nvim-devdocs",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-telescope/telescope.nvim",
    "nvim-treesitter/nvim-treesitter",
  },
  config = function()
    require("nvim-devdocs").setup()
  end,
}

and the same with

return {
  "luckasRanarison/nvim-devdocs",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-telescope/telescope.nvim",
    "nvim-treesitter/nvim-treesitter",
  },
  config = function()
    require("nvim-devdocs").setup({

      dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory
      telescope = {}, -- passed to the telescope picker
      float_win = { -- passed to nvim_open_win(), see :h api-floatwin
        relative = "editor",
        height = 25,
        width = 100,
        border = "rounded",
      },
      wrap = false, -- text wrap, only applies to floating window
      previewer_cmd = nil, -- for example: "glow"
      cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" }
      cmd_ignore = {}, -- ignore cmd rendering for the listed docs
      picker_cmd = false, -- use cmd previewer in picker preview
      picker_cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "50" }
      after_open = function(bufnr)
        vim.api.nvim_buf_set_keymap(bufnr, "n", "<Esc>", ":close<CR>", {})
      end,
    })
  end,
}

Open with/without Float
image

After Enter error is present

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants