Skip to content
Discussion options

You must be logged in to vote

pick_win does not work if there's no splits, i manage to solve it by using

picker = {
	actions = {
		smart_open = function(picker, item)
			if not item.dir then
				local ok = picker:action({ "pick_win", "jump" })
				if ok then return end
			end
			picker:action({ "confirm" })
		end
	},
	win = {
		input = {
			keys = {
				["<CR>"] = { { "smart_open" }, mode = { "n", "i" } },
			},
		},
		list = {
			keys = {
				["<CR>"] = { "smart_open" }
			},
		},
	},
	enabled = true,
	sources = {
		explorer = {
			auto_close = true,
			win = {
				list = {
					keys = {
						["<CR>"] = "smart_open"
					}
				}
			}
		},
	},
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nautilor
Comment options

@drowning-cat
Comment options

@nautilor
Comment options

Answer selected by nautilor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants