Skip to content

fix(lists): tabs handling to use default neovim tab handling#198

Merged
YousefHadder merged 4 commits intoYousefHadder:mainfrom
ten3roberts:fix/list-indent
Jan 3, 2026
Merged

fix(lists): tabs handling to use default neovim tab handling#198
YousefHadder merged 4 commits intoYousefHadder:mainfrom
ten3roberts:fix/list-indent

Conversation

@ten3roberts
Copy link
Copy Markdown
Contributor

Description

Fixes the handle_tab function to let Nvim handle tab insertion itself, rather than replicating the text edit.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring
  • Performance improvement

Related Issues

#197

Testing

  • Tested manually
  • Added/updated tests (if applicable)

Checklist

  • Code follows project style
  • Self-reviewed my code
  • Commented complex logic (reduces amount of code)
  • Updated documentation (unsure if needed, only external behavior change is if user overrides , they will now see that mapping fire as it used to do before using this plugin)
  • No new warnings generated

@YousefHadder YousefHadder changed the title Fixes tab handling to use default neovim tab handling Fix(format): tabs handling to use default neovim tab handling Jan 3, 2026
@YousefHadder YousefHadder changed the title Fix(format): tabs handling to use default neovim tab handling fix(lists): tabs handling to use default neovim tab handling Jan 3, 2026
@YousefHadder YousefHadder marked this pull request as ready for review January 3, 2026 01:58
Copilot AI review requested due to automatic review settings January 3, 2026 01:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where pressing Tab on non-list lines would incorrectly insert spaces at the cursor position, splitting text unexpectedly. The fix simplifies the code by delegating to Neovim's default Tab behavior instead of manually replicating text insertion logic.

Key Changes:

  • Replaced manual tab/space insertion logic with nvim_feedkeys to invoke Neovim's native Tab handling for non-list lines
  • Applied the same approach to both handle_tab() and handle_shift_tab() functions

@YousefHadder YousefHadder merged commit 1a06bd8 into YousefHadder:main Jan 3, 2026
15 checks passed
@ten3roberts ten3roberts deleted the fix/list-indent branch January 4, 2026 08:50
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

Successfully merging this pull request may close these issues.

3 participants