Closed mosheavni closed 2 months ago
I think that's not super ugly and fixes the issue, although we can do a small improvement and reuse our builder, so what about this variant? It at the same spot your code is currently:
-- Filter suggestions based on input
local filtered_suggestions = {}
self.data = M.cached_api_resources.values
self:splitData():decodeJson()
I think that's not super ugly and fixes the issue, although we can do a small improvement and reuse our builder, so what about this variant? It at the same spot your code is currently:
-- Filter suggestions based on input local filtered_suggestions = {} self.data = M.cached_api_resources.values self:splitData():decodeJson()
Excellent! it's working! do you want me to open a PR? it's your code after all..
Merged it to main!
When I open the plugin, and click \ really fast, the completions retrieved from
kubectl api-resources
did not load yet.Instead of closing and reopening the aliases float, we can reassign mapping
self.data
withM.cached_api_resources.values
inside the \The problem when I tried to solve it, that even after I define it, sometimes it's still a string instead of table. This UGLY hack that I got working is:
right after this one: https://github.com/Ramilito/kubectl.nvim/blob/a47aea3e9c55a584bad9c3df76a5f5b8a8a3ac07/lua/kubectl/views/init.lua#L120
code
this BS is still a string
is always printed on the second try of \Demo of the completion working after
api-resources
were loaded:Any suggestions?