Git Product home page Git Product logo

Comments (5)

shamindras avatar shamindras commented on August 11, 2024 1

I realized that getting a similar issue to @Fau818, per the discussion I'd started here.

from tabout.nvim.

abecodes avatar abecodes commented on August 11, 2024 1

Hi @Fau818

well, it is not that unexpected, since the [] should not be at that place in lua...therefore treesitter does not mark it as it would a correct node and thus tabout does not work (related to @shamindras discussion.

There is a branch to have a fallback for this, let me know if it fixes your issue

use({
    'abecodes/tabout.nvim',
    branch = 'feature/tabout-md',
    wants = { 'nvim-treesitter' }, -- or require if not used so far
    after = { 'nvim-cmp' }, -- if a completion plugin is using tabs load it before
  })

from tabout.nvim.

shamindras avatar shamindras commented on August 11, 2024 1

Just posting a quick update here for posterity, from the related discussion with @abecodes.

In short, this is working for me now by simply testing valid lua autopairs syntax, i.e. checking tabout against (), {} pairs worked for me inside tabout.lua, as opposed to []. This was also interestingly @Fau818's failing test case 😄 . I also did a quick check in python for tabout inside () for a python function definition, and it worked. I will do more extensive testing over time, and report back if there are any issues.

I did not check the tabout-md branch, since I will like to go with the treesitter config, though I do think it would be cool to toggle between the 2 modes as needed. Assuming of course that having it as a toggle is not an intense maintenance chore.

In either case, thanks @abecodes for your package and help here.

from tabout.nvim.

Fau818 avatar Fau818 commented on August 11, 2024 1

Thank you both for your enthusiastic help! And I also checked out this discussion.
This made me realize that tabout works based on treesitter, and made me understand why I couldn't jump out correctly.


But there is still one thing that needs to be addressed, it doesn't work well in gitcommit filetype. If I want to use tabout in the gitcommit filetype, I have to set the ignore_beginning = true.
(Even if I switch to the feature/tabout-md branch, this still doesn't work well.)

tabout-gitcommit.mov

But if I turn on the ignore_beginning = true option, there are some unexpected behaviors .

tabout-ignore_beginning.mov

Based on the problems I've encountered, I think it might be nice to have a way to get out of the treesitter.
For example, like ijimiji/tabout.nvim.

In the end, I think it's beyond the scope of this issue to discuss further.
Perhaps a follow-up discussion would be better here.

from tabout.nvim.

abecodes avatar abecodes commented on August 11, 2024 1

Hi @Fau818,

I am not against removing treesitter...at the time of writing this plugin is was the hottest 💩 and I didn't know better 🤣 I was concerned about parsing and treesitter seemed to be abstracting that all away.

But since most of the issues are related to treesitter one way or another, maybe it would make sense to remove it completely.

@Fau818 @shamindras if anyone of you wants to prepare a PR, feel free, otherwise I will give it a shot the upcoming weekend.

Thanks for your input and reporting issues, really appreciated 😊

from tabout.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.