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

pressing TAB on an old empty line sometimes jumps to a random line. #322

Open
ostap-tymchenko opened this issue Oct 3, 2023 · 6 comments

Comments

@ostap-tymchenko
Copy link
Contributor

I've had this issue for at least a year now where sometimes when being on an empty line that was entered using and pressing tab, jumps to a seemingly random part of the open document. I have not been able to recreate it whilst recording, but the issue is really annoying.

Ill send in an update if I manage to record it.

My dots are found here: https://github.com/ostap-tymchenko/nvim-dots/

@ostap-tymchenko
Copy link
Contributor Author

RECORDING>> https://youtu.be/JdqCMqTvmkM

@laris
Copy link

laris commented Oct 8, 2023

ditto.

I also don't know why and cannot figure out how to locate issue.

@laris
Copy link

laris commented Nov 12, 2023

did you figure out why? @ostap-tymchenko

@ostap-tymchenko
Copy link
Contributor Author

did you figure out why? @ostap-tymchenko

It was some extension. I turned them on and off until I found the broken one. I can't remember which one it is now, and I stopped using neovim-from-scratch, and just made a custom one similar to it.

@laris
Copy link

laris commented Nov 18, 2023

Thanks for your tips.

@laris
Copy link

laris commented Nov 25, 2023

I guess it should be these lines:
LuaSnip should have Tab multiple functions.
https://github.com/L3MON4D3/LuaSnip

    -- Accept currently selected item. If none selected, `select` first item.
    -- Set `select` to `false` to only confirm explicitly selected items.
    ["<CR>"] = cmp.mapping.confirm { select = true },
    ["<Tab>"] = cmp.mapping(function(fallback)
      if cmp.visible() then
        cmp.select_next_item()
      elseif luasnip.expandable() then
        luasnip.expand()
      elseif luasnip.expand_or_jumpable() then
        luasnip.expand_or_jump()
      elseif check_backspace() then
        fallback()
      else
        fallback()
      end
    end, {
      "i",
      "s",
    }),

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

2 participants