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

Conflict with s1n7ax/nvim-window-picker related to here or not ? #38

Closed
DrummyFloyd opened this issue Dec 3, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@DrummyFloyd
Copy link

DrummyFloyd commented Dec 3, 2024

hi , i finnaly found the culpit haha

seems that your plugins do some conflicting stuff with s1n7ax/nvim-window-picker
once i activate smear i got some nil values upon windows picker

tbh, dunno where i should put the issue , so i'll try first here coz you are the new comer ^^

                     E5108: Error executing lua: ...ker/lua/window-picker/hints/floating-big-letter-hint.lua:130: attempt to index local 'char' (a nil value)
stack traceback:
	...ker/lua/window-picker/hints/floating-big-letter-hint.lua:130: in function 'draw'
	...indow-picker/lua/window-picker/pickers/window-picker.lua:63: in function 'pick_window'
	...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:854: in function 'open_file'
	...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:731: in function 'open'
	...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:755: in function 'open_with_cmd'
	...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:870: in function 'open_with_window_picker'
	...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:209: in function <...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:208>

Environment

OK config

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system "curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua")()

require("lazy.minit").repro({
    spec = {
        { "LazyVim/LazyVim", import = "lazyvim.plugins" },
        -- add any other plugins here
        {
            "nvim-neo-tree/neo-tree.nvim",
            dependencies = {
                "s1n7ax/nvim-window-picker",
                opts = {
                    hint = "floating-big-letter",
                    show_prompt = false,
                    filter_rules = {
                        autoselect_one = true,
                    },
                },
            },
        },
    },
})

NOT OK with smear

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system "curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua")()

require("lazy.minit").repro({
    spec = {
        { "LazyVim/LazyVim", import = "lazyvim.plugins" },
        { import = "lazyvim.plugins.extras.ui.smear-cursor" },
        -- add any other plugins here
        -- tested with vanilla integration too
        -- {
         --   "sphamba/smear-cursor.nvim",
        -- },

        {
            "nvim-neo-tree/neo-tree.nvim",
            dependencies = {
                "s1n7ax/nvim-window-picker",
                opts = {
                    hint = "floating-big-letter",
                    show_prompt = false,
                    filter_rules = {
                        autoselect_one = true,
                    },
                },
            },
        },
    },
})
  • OS:
    image

  • Terminal:
    ❯ kitty --version
    kitty 0.37.0 created by Kovid Goyal

  • Neovim version:
    ❯ nvim --version
    NVIM v0.10.2
    Build type: Release
    LuaJIT 2.1.1713484068
    Run "nvim -V1 -v" for more info

  • Smear-cursor version/commit:
    main:29a2c0e

@DrummyFloyd DrummyFloyd added the bug Something isn't working label Dec 3, 2024
@sphamba
Copy link
Owner

sphamba commented Dec 5, 2024

Fixed by #45

I added a way to filter out the floating windows created by smear-cursor. You can add this to the window-picker config:

require("window-picker").setup({
  filter_rules = {
    bo = {
      filetype = { "smear-cursor" }
    }
  }
})

@sphamba sphamba closed this as completed Dec 5, 2024
@DrummyFloyd
Copy link
Author

thank you !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants