Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkhealth not working #52

Open
Fireond opened this issue May 17, 2023 · 2 comments
Open

Checkhealth not working #52

Fireond opened this issue May 17, 2023 · 2 comments

Comments

@Fireond
Copy link

Fireond commented May 17, 2023

I use lazy.nvim to install the plugin, the setup is

{
    "ekickx/clipboard-image.nvim",
    opts = { -- Default configuration for all filetype
      default = {
        img_dir = { "%:p:h", "img" },
        img_name = function()
          local name = os.date("%y-%m-%d-%H-%M-%S")

          vim.ui.input({ prompt = "Name: ", default = name }, function(input)
            name = input
          end)
          return name
        end,
        affix = "<\n  %s\n>", -- Multi lines affix
      },
      -- You can create configuration for ceartain filetype by creating another field (markdown, in this case)
      -- If you're uncertain what to name your field to, you can run `lua print(vim.bo.filetype)`
      -- Missing options from `markdown` field will be replaced by options from `default` field
      markdown = {
        img_dir = { "src", "assets", "img" }, -- Use table for nested dir (New feature form PR #20)
        img_dir_txt = "/assets/img",
        img_handler = function(img) -- New feature from PR #22
          local script = string.format('./image_compressor.sh "%s"', img.path)
          os.execute(script)
        end,
      },
    },
    ft = { "tex", "markdown" },
    keys = {
      { "<leader>i", "<cmd>PasteImg<cr>", desc = "Paste image" },
    },
  }

which just copy the example settings and add ft and keys for lazy.nvim.
When I run checkhealth cliclipboard-image it output:

==============================================================================
clipboard-image: require("clipboard-image.health").check()

- ERROR Failed to run healthcheck for "clipboard-image" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua ...lazy/clipboard-image.nvim/lua/clipboard-image/health.lua:3: module 'health' not found:
  no field package.preload['health']
  cache_loader: module health not found
  cache_loader_lib: module health not found
  no file './health.lua'
  no file '/opt/homebrew/share/luajit-2.1.0-beta3/health.lua'
  no file '/usr/local/share/lua/5.1/health.lua'
  no file '/usr/local/share/lua/5.1/health/init.lua'
  no file '/opt/homebrew/share/lua/5.1/health.lua'
  no file '/opt/homebrew/share/lua/5.1/health/init.lua'
  no file './health.so'
  no file '/usr/local/lib/lua/5.1/health.so'
  no file '/opt/homebrew/lib/lua/5.1/health.so'
  no file '/usr/local/lib/lua/5.1/loadall.so'
  stack traceback:
  [C]: in function 'require'
  ...lazy/clipboard-image.nvim/lua/clipboard-image/health.lua:3: in main chunk
  [C]: in function 'require'
  [string "luaeval()"]:1: in main chunk

Other plugin's checkhealth can run correctly. And also when I run PasteImg it has error

E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'clipboard-image.paste'
stack traceback:
	[C]: in function 'require'
	[string ":lua"]:1: in main chunk

Can you help me? Thanks

@jamezwhocares
Copy link

Already discussed in #50

@dfendr
Copy link

dfendr commented Jun 13, 2023

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

No branches or pull requests

3 participants