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

Indentation(AutolistTab) is not same with tabstop option #87

Open
Jaehaks opened this issue Jun 6, 2024 · 0 comments
Open

Indentation(AutolistTab) is not same with tabstop option #87

Jaehaks opened this issue Jun 6, 2024 · 0 comments

Comments

@Jaehaks
Copy link

Jaehaks commented Jun 6, 2024

Thank you for your efforts

I set options tabstop and shiftwidth to 4. It works when I disable autolist plugin.
But the first indentation's tabstop is 3 and this behavior is invoked when I erase the tab.
After first indentation, the other indent with TAB does work normally ( 4 spaces )

It is my configuraiton

config = function ()
  local autolist = require('autolist')
  autolist.setup({
  
  })
  
  local User_markdown = vim.api.nvim_create_augroup('User_markdown', {clear = true})
  vim.api.nvim_create_autocmd('FileType',{
    group = User_markdown,
    pattern = {'markdown', 'text'},
    callback = function ()
      local opts = {noremap = true, buffer = 0}
      vim.keymap.set('i', '<TAB>'     , '<Cmd>AutolistTab<CR>'             , opts)
      vim.keymap.set('i', '<S-TAB>'   , '<Cmd>AutolistShiftTab<CR>'        , opts)
      vim.keymap.set('i', '<CR>'      , '<CR><Cmd>AutolistNewBullet<CR>'   , opts)
      vim.keymap.set('n', 'o'         , 'o<Cmd>AutolistNewBullet<CR>'      , opts)
      vim.keymap.set('n', 'O'         , 'O<Cmd>AutolistNewBulletBefore<CR>', opts)
      vim.keymap.set('n', '<leader>mn', '<Cmd>AutolistCycleNext<CR>'       , opts)
      vim.keymap.set('n', '<leader>mr', '<Cmd>AutolistRecalculate<CR>'     , opts)
      vim.keymap.set('n', 'dd'        , 'dd<Cmd>AutolistRecalculate<CR>'   , opts)
      vim.keymap.set('v', 'd'         , 'd<Cmd>AutolistRecalculate<CR>'    , opts)
    end
  })

end
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

1 participant