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

Any colored hydra fails due to authentication error. #49

Open
matu3ba opened this issue Sep 18, 2024 · 5 comments
Open

Any colored hydra fails due to authentication error. #49

matu3ba opened this issue Sep 18, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@matu3ba
Copy link

matu3ba commented Sep 18, 2024

Might be neovim regression and/or breaking change, see https://neovim.io/doc/user/news.html:

LUA
API functions now consistently return an empty dictionary as [vim.empty_dict()](https://neovim.io/doc/user/lua.html#vim.empty_dict()). Earlier, a [lua-special-tbl](https://neovim.io/doc/user/lua.html#lua-special-tbl) was sometimes used.
$ nvim --version
NVIM v0.11.0-dev-789+g0ba388847
Build type: RelWithDebInfo
LuaJIT 2.1.1724512491
Run "nvim -V1 -v" for more info

Minimal reproduction inspired by gitsigns bug tracker:

for name, url in pairs{
  hydralink = 'https://github.com/nvimtools/hydra.nvim',
} do
  local install_path = vim.fn.fnamemodify('hydra_issue/'..name, ':p')
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
  end
  vim.opt.runtimepath:append(install_path)
end

local Hydra = require('hydra')

-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

Hydra {
  name = 'Side scroll',
  config = {
    color = 'pink', -- without color pink it works
    -- invoke_on_body = true, -- does not matter if inside or not.
  },
  mode = 'n',
  body = 'z',
  heads = {
    { 'h', '5zh' },
    { 'l', '5zl', { desc = '←/→' } },
    { 'H', 'zH' },
    { 'L', 'zL', { desc = 'half screen ←/→' } },
  },
}

Error:

Fehler beim Ausführen von "/home/misterspoon/dev/try/trylua/minhydra.lua":
E5113: Error while calling lua chunk: vim/shared.lua:0: s: expected string, got number (1)
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        vim/shared.lua: in function 'startswith'
        vim/_init_packages.lua: in function '__index'
        vim/shared.lua: in function 'islist'
        vim/shared.lua: in function ''
        vim/shared.lua: in function 'tbl_deep_extend'
        ...y/trylua/hydra_issue/hydralink//lua/hydra/layer/init.lua:116: in function 'initialize'
        ...ry/trylua/hydra_issue/hydralink//lua/hydra/lib/class.lua:14: in function 'Layer'
        ...dev/try/trylua/hydra_issue/hydralink//lua/hydra/init.lua:440: in function '_setup_pink_hydra'
        ...dev/try/trylua/hydra_issue/hydralink//lua/hydra/init.lua:282: in function 'initialize'
        ...ry/trylua/hydra_issue/hydralink//lua/hydra/lib/class.lua:14: in function 'Hydra'
        /home/misterspoon/dev/try/trylua/minhydra.lua:15: in main chunk
@miversen33
Copy link
Collaborator

Please provide the version of neovim you are running.

This smells like nightly, in which case, see #47 for details on why we aren't addressing these issues yet.

@miversen33 miversen33 added the question Further information is requested label Sep 18, 2024
@matu3ba
Copy link
Author

matu3ba commented Sep 18, 2024

I have edited the issue text to include the version information and yes, that is on nightly.

@miversen33
Copy link
Collaborator

Thanks :) Ya for the time being we are not addressing nightly issues. At least not until the vim.table work is stabilized.

@miversen33 miversen33 added bug Something isn't working and removed question Further information is requested labels Sep 18, 2024
@Ajaymamtora
Copy link

Is there a workaround for this? I want to use the nightly but can't because of this issue

@miversen33
Copy link
Collaborator

I haven't looked at nightly in a bit, but unfortunately the answer currently is "don't use nightly" or "don't use hydra".

We will not be maintaining multiple branches of this plugin, so until vim.table stabilizes (something that probably wont happen until the next stable release), IMO we are best off just waiting.

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

3 participants