-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore/ingress-additions #315
Conversation
ftplugin/k8s_ingresses.lua
Outdated
@@ -13,6 +14,58 @@ local function set_keymap(bufnr) | |||
overview_view.View() | |||
end, | |||
}) | |||
api.nvim_buf_set_keymap(bufnr, "n", "gx", "", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add a plug function like this:
api.nvim_buf_set_keymap(bufnr, "n", "<Plug>(kubectl.browse)", "", {
Tell me when you feel ready to merge! |
the keymap doesn't appear on hints. mind stepping in here? |
@@ -5,6 +5,9 @@ local M = { | |||
display_name = "Ingresses", | |||
ft = "k8s_ingresses", | |||
url = { "{{BASE}}/apis/networking.k8s.io/v1/{{NAMESPACE}}ingresses?pretty=false" }, | |||
hints = { | |||
{ key = "<Plug>(kubectl.browse)", desc = "browse", long_desc = "Open host in browser" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and also add a hint here ☝️ (did an edit on the file since I couldn't comment without any changes)
local ingresses_view = require("kubectl.views.ingresses") | ||
local loop = require("kubectl.utils.loop") | ||
local overview_view = require("kubectl.views.overview") | ||
local mappings = require("kubectl.mappings") | ||
|
||
mappings.map_if_plug_not_set("n", "gx", "<Plug>(kubectl.browse)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then the actual mapping here ☝️
I did some ninja commits, but haven't verified that they actually work |
oh this stupid |
ready! |
Awesome idea about the browse to host btw 👏 |
fix nil on
hosts
fix ingress class, from annotation or from class property
open an ingress link in the browser