Comments (5)
I realized that getting a similar issue to @Fau818, per the discussion I'd started here.
from tabout.nvim.
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.
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.
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.
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)
- Feature request: jump to next argument HOT 1
- How can I disable jumping from open bracket HOT 3
- Why doesn't it tab out of square brackets? HOT 7
- Standalone setup file HOT 3
- `ignore_beginning` works differently between `(` and `"` HOT 5
- <Tab> doesn't move out of parens () HOT 2
- Can't get plugin to work HOT 7
- Feature request: cmdline support HOT 1
- How to prevent keybind from being overwritten? HOT 1
- Tabout stops working after save HOT 1
- Tabout doesn't work at all HOT 3
- Won't tab multiple times? HOT 1
- Luasnip? HOT 6
- Tubout inside Rust macro HOT 1
- Could you add a lazy.vim example for installation HOT 2
- Feature: support for non-treesitter enabled buffers HOT 2
- Feature request: support nvim-treesitter next version HOT 2
- Is the example mappings wrong with "replace_termcodes"? HOT 1
- Recent change disables TAB key in shell files (bash, zsh, etc.) ... (and possibly others?) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tabout.nvim.