abecodes/tabout.nvim

Can't get plugin to work

reDpz opened this issue · 7 comments

reDpz commented

I'm using nvchad with this in my plugins.lua

  {
    'abecodes/tabout.nvim',
    lazy = false,
    config = function()
      require('tabout').setup {
      tabkey = '<Tab>', -- key to trigger tabout, set to an empty string to disable
      backwards_tabkey = '<S-Tab>', -- key to trigger backwards tabout, set to an empty string to disable
      act_as_tab = true, -- shift content if tab out is not possible
      act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports <S-Tab>)
      default_tab = '<C-t>', -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
      default_shift_tab = '<C-d>', -- reverse shift default action,
      enable_backwards = true, -- well ...
      completion = true, -- if the tabkey is used in a completion pum
      tabouts = {
        {open = "'", close = "'"},
        {open = '"', close = '"'},
        {open = '`', close = '`'},
        {open = '(', close = ')'},
        {open = '[', close = ']'},
        {open = '{', close = '}'}
      },
      ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]]
      exclude = {} -- tabout will ignore these filetypes
  }
    end,
    wants = {'nvim-treesitter'}, -- or require if not used so far
    after = {'nvim-cmp'} -- if a completion plugin is using tabs load it before
  },

Lazy installs the plugin after neovim is started and then afterwards I can press ctrl + t to indent the entire line one row but I can't seem to be able to use tab to get out of quotes as that just seems to add a tab spacing.

If you are using lazy.nvim, the plugin spec doesn't support after and wants keys.
You can use the key dependencies
In my config this works:

    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "L3MON4D3/LuaSnip",
      "hrsh7th/nvim-cmp",
    },
reDpz commented

Then autofill/suggestions come up when tab is pressed now

I am not using lazy, so no idea how it works.

You need to make sure that nvim-treesitter and your autofill plugin are loaded before tabout.
Sounds like your suggestions plugin loads after and overwrites the tab keybinding

reDpz commented

Fair, I switched to astro so I'll go ahead and create a thread on their discord to try fix it and close this thread

Fair, I switched to astro so I'll go ahead and create a thread on their discord to try fix it and close this thread

any luck on fix that?

reDpz commented

I've made a thread on their discord but I've gotten no answers any help is appreciated

reDpz commented

got it to work by building a neovim config from scratch