nvim: more Go and Odin keys

This commit is contained in:
2026-03-12 22:26:24 +01:00
parent 389dbe5c9d
commit 34fd4bd6c9

View File

@@ -155,12 +155,18 @@ if ok then
set("n", "<leader>GF", function() set("n", "<leader>GF", function()
fzf.files({ cwd = go_mod(), cmd = "fd --type f -e go" }) fzf.files({ cwd = go_mod(), cmd = "fd --type f -e go" })
end, { desc = "FzfLua Go mod files" }) end, { desc = "FzfLua Go mod files" })
set("n", "<leader>Gl", function()
fzf.files({ cmd = "fd --type f -e go" })
end, { desc = "FzfLua Go current dir files" })
set("n", "<leader>Gs", function() set("n", "<leader>Gs", function()
go_grep(go_root()) go_grep(go_root())
end, { desc = "FzfLua Go grep declarations" }) end, { desc = "FzfLua Go grep declarations" })
set("n", "<leader>GS", function() set("n", "<leader>GS", function()
go_grep(go_mod()) go_grep(go_mod())
end, { desc = "FzfLua Go grep mod declarations" }) end, { desc = "FzfLua Go grep mod declarations" })
set("n", "<leader>Gd", function()
go_grep(nil)
end, { desc = "FzfLua Go current dir grep declarations" })
set("n", "<leader>Gm", function() set("n", "<leader>Gm", function()
go_grep(go_mod_pkg or go_mod()) go_grep(go_mod_pkg or go_mod())
end, { desc = "FzfLua Go grep mod declarations" }) end, { desc = "FzfLua Go grep mod declarations" })
@@ -193,9 +199,15 @@ if ok then
set("n", "<leader>of", function() set("n", "<leader>of", function()
fzf.files({ cwd = "~/cloned/Odin", cmd = "fd --type f -e odin" }) fzf.files({ cwd = "~/cloned/Odin", cmd = "fd --type f -e odin" })
end, { desc = "FzfLua Odin files" }) end, { desc = "FzfLua Odin files" })
set("n", "<leader>ol", function()
fzf.files({ cmd = "fd --type f -e odin" })
end, { desc = "FzfLua Odin current dir files" })
set("n", "<leader>os", function() set("n", "<leader>os", function()
odin_grep("~/cloned/Odin") odin_grep("~/cloned/Odin")
end, { desc = "FzfLua Odin grep declarations" }) end, { desc = "FzfLua Odin grep declarations" })
set("n", "<leader>od", function()
odin_grep(nil)
end, { desc = "FzfLua Odin grep declarations" })
set("n", "<leader>op", function() set("n", "<leader>op", function()
odin_grep(odin_pkg) odin_grep(odin_pkg)
end, { desc = "FzfLua Odin grep package declarations" }) end, { desc = "FzfLua Odin grep package declarations" })