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

attempt to index field 'uv' (a nil value) #12

Open
fakeharxy opened this issue Jun 12, 2024 · 8 comments
Open

attempt to index field 'uv' (a nil value) #12

fakeharxy opened this issue Jun 12, 2024 · 8 comments
Labels
bug Something isn't working compat: legacy nvim Compatibility with older versions of Neovim compat: macos Compatibility with macOS

Comments

@fakeharxy
Copy link

Really attempting to use this but it's... not easy!

I've added use { "voxelprismatic/rabbit.nvim"} to packer.lua, then copied the default config exactly in a file called rabbit.lua.

(for the record:

require("rabbit").setup({
    colors = {
        title = {               -- Title text
            fg = "#000000",     -- Grabs from :hi Normal
            bold = true,
        },
        index = {               -- Index numbers
            fg = "#000000",     -- Grabs from :hi Comment
            italic = true,
        },
        dir = "#000000",        -- Folders; Grabs from :hi NonText

        file = "#000000",       -- File name; Grabs from :hi Normal

        term = {                -- Addons, eg :term or :Oil
            fg = "#000000",     -- Grabs from :hi Constant
            italic = true,
        },
        noname = {              -- No buffer name set
            fg = "#000000",     -- Grabs from :hi Function
            italic = true,
        },
        message = {
            fg = "#000000",     -- Grabs from :hi Identifier
            italic = true,
        },
    },

    window = {
        -- If `box_style` is specified, it will overwrite anything set in `box`
        box_style = "round",    -- One of "round", "square", "thick", "double"
        box = {
            top_left = "╭",     -- Top left corner of box
            top_right = "╮",    -- Top right corner of box
            bottom_left = "╰",  -- Bottom left corner of box
            bottom_right = "╯", -- Bottom right corner of box
            vertical = "│",     -- Vertical wall
            horizontal = "─",   -- Horizontal ceiling
            emphasis = "═",     -- Emphasis around title, like `──══ Rabbit ══──`
        },

        width = 64,             -- Width, in columns
        height = 24,            -- Height, in rows

        -- Where the plugin name should be displayed.
        -- * "bottom" means in the bottom left corner, but not displayed in full screen
        -- * "title" means next to rabbit, eg `──══ Rabbit History ══──`
        -- * "hide" means to not display it at all
        plugin_name_position = "bottom",

        title = "Rabbit",       -- Title text, eg: `──══ Rabbit ══──` or `──══ NotHarpoon ══──`

        emphasis_width = 8,     -- Eg: `──────══ Rabbit ══──────` or `──══════ Rabbit ══════──`


        float = true,           -- Plain `true` means use bottom right corner
        float = "center",       -- Aligns to center
        float = {
            top = 10000,        -- Top offset in lines
            left = 10000,       -- Left offset in columns
        },
        float = {
            "bottom",           -- "top" or "bottom;" MUST BE FIRST
            "right",            -- "left" or "right;" MUST BE LAST
        },


        -- When using split screen, it will try to use the width and height provided earlier.
        -- Eg, when splitting left or right: height = 100%; width = `width`
        -- Eg, when splitting above or below: height = `height`; width = 100%
        -- NOTE: `float` must be explicitly set to false in order to split
        -- NOTE: If both `float` and `split` are false, a new buffer will open, "fullscreen"
        split = true,           -- Plain `true` means use the right side
        split = "right",        -- One of "left", "right", "above", "below"

        overflow = ":::",       -- String to display when folders overflow
        path_len = 12,          -- How many characters to display in folder name before cutting off
    },

    default_keys = {
        close = {               -- Default bindings to close Rabbit
            "<Esc>",
            "q",
            "<leader>",
        },

        select = {              -- Default bindings to select a buffer
            "<CR>",
        },

        open = {                -- Default bindings to open Rabbit
            "<leader>r",
        },

        file_add = {            -- Default bindings to add current buffer to persistent history
            "a",                -- This would act like Prime's Harpoon, but it isn't implemented yet
        },

        file_del = {            -- Default bindings to remove current buffer from persistent history
            "d",                -- This would act like Prime's Harpoon, but it isn't implemented yet
        },
    },

    plugin_opts = {             -- Plugin specific options you'd like to set
        history = {
            color = "#d7827e",  -- Border color
            switch = "r",       -- Keybind to switch to the history window from within Rabbit
            keys = {},          -- See the API for more details
            opts = {},          -- See the API for more details
        },
        reopen = {
            color = "#907aa9",  -- Border color
            switch = "o",       -- Keybind to switch to the reopen window from within Rabbit
            keys = {},          -- See the API for more details
            opts = {},          -- See the API for more details
        },
    },

    enable = {                  -- Builtin plugins to enable immediately
        "history",              -- The plugin shown when opening Rabbit
        "reopen",
        "oxide",
    },
})

Now I get this error on nvim startup: .site/pack/packer/start/rabbit.nvim/lua/rabbit/compat.lua:49: attempt to index field 'uv' (a nil value)

Not sure what's needed from here, thanks!

@VoxelPrismatic
Copy link
Owner

What version of neovim are you using?

@fakeharxy
Copy link
Author

NVIM v0.9.5

@VoxelPrismatic
Copy link
Owner

And what platform?

@VoxelPrismatic
Copy link
Owner

(i ask because vim.uv is not nil on neovim v0.9.5 on termux)

@fakeharxy
Copy link
Author

macos, using alacritty as a terminal, packer to install

@VoxelPrismatic
Copy link
Owner

before you set up packer, what happens if you add vim.uv = vim.loop?

@VoxelPrismatic
Copy link
Owner

can you try the latest update? v4.0.0 should resolve to vim.loop if vim.uv is not available

@VoxelPrismatic VoxelPrismatic added bug Something isn't working compat: macos Compatibility with macOS compat: legacy nvim Compatibility with older versions of Neovim labels Jun 20, 2024
@VoxelPrismatic
Copy link
Owner

@fakeharxy ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compat: legacy nvim Compatibility with older versions of Neovim compat: macos Compatibility with macOS
Projects
None yet
Development

No branches or pull requests

2 participants