Ramilito / kubectl.nvim

⎈ Streamline your Kubernetes management within Neovim—control and monitor your cluster seamlessly, all without leaving your coding environment.
Apache License 2.0
316 stars 9 forks source link

refactor: extract UI components and make it reusable to other use cases #129

Open LintaoAmons opened 2 months ago

LintaoAmons commented 2 months ago

I found this buffer UI and the way to interact with the UI is very desired for other scenarios like docker or any other CLI tools.

Hope there's standalone version of this ui components which can easily adapt to other use cases, and be used by others plugin authors

Ramilito commented 2 months ago

Interesting idea, haven't thought along those lines but that should be feasible. The code already is a bit split up into different responsibilities and it should handle any json data.

mosheavni commented 2 months ago

i think it is possible but there are already plugins that provide some of the UI principles in this one. as this is open source code, anyone can copy the logic freely, no @Ramilito ?

Ramilito commented 2 months ago

Yeah some of the UI things are already solved, what I took from this though is basically extract the table.lua and some of the buffer.lua stuff into it's own plugin (similar to plenary.lua). Being able to take json data and just get out a column based table basically and not having to maintain or understand the code.