-
Notifications
You must be signed in to change notification settings - Fork 83
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
refactor(ui)!: replace (some) custom ui with vim.ui.*
#221
Conversation
Can this be opt-in? |
@sidlatau I'd rather not have telescope become a hard requirement of this plugin because to be honest I personally am continually on the fence about if I'm going to continue to use it. Your point actually makes me realise that I can actually simplify things a bit using Answering @fitrh using nui for the complex UI won't be optional since the trade off is maintaining a bunch of increasingly outdated UI code or improving the maintainability of this plugin by offloading this burden. I'm not sure what the opposition to adding this is but it will make things easier for me as the maintainer. I'll see about doing it in a way where any place it's used will just not work without it but things won't crash or error (graceful degradation) |
As far as I understand, anything other than outline tree can use built-in I may be biased as I'm more of nvim-dap nvim-jdtls guy Besides outline tree, what other components require nui.nvim? |
@fitrh whilst I appreciate the input I'm really not looking to box myself in on the basis of one person's preferences. Especially given the effort that myself and others have put into this project. The goal of this project isn't to be hyperminimalist. Something which I think is evident from the existing feature set. I don't intend to just add dependencies just because, but where and if I think necessary. If there's a It might be the case that there aren't many places where nui is needed, we will see as this PR is still in draft |
9014957
to
7281334
Compare
@sidlatau can you have a look at the most recent version of this PR when you have a chance I've moved all the I prefer this direction but I think a lot of new people trying out nvim dev coming from android studio and vscode will definitely stumble on |
vim.ui.*
vim.ui.*
vim.ui.*
I'm likely going to boot rewriting the outline to |
7281334
to
c3c6c49
Compare
vim.ui.*
vim.ui.*
users of dressing.nvim will be able to use the full custom configuration for the telescope menu
@akinsho, thanks, I think this is a good approach, I actually get what I wanted: But the selection does not work - I select ios simulator, press ENTER and nothing happens. |
@sidlatau thanks for testing it out. I should have mentioned I was still wrangling with the picker behaviour but was more looking to see if the UI was ok. I've fixed it now and refactored the telescope integration a bit so now the select menu if using telescope for selection via dressing should look the same as the plugin and the other menus should still work 🤞🏿 |
Now selection works, LGTM 🚀 |
When this plugin was first created almost none of the cool new APIs for making plugins existed. So I hand rolled a bunch of things like the menus, the tree layout etc. This stuff now accounts for like 40% of all the code in this repository if not more and there are now well implemented and tested libraries like nui.nvim which provide components for inputs, menus, trees, splits and other complex layouts.
To simplify maintenance this PR removes all the custom logic for in favour of using nui.nvim for as much/all the custom UI.