Rename bookmark_file_pick_mode option to file_pick_mode
This commit is contained in:
@@ -85,7 +85,7 @@ require("bookmarks"):setup({
|
|||||||
last_directory = { enable = false, persist = false },
|
last_directory = { enable = false, persist = false },
|
||||||
persist = "none",
|
persist = "none",
|
||||||
desc_format = "full",
|
desc_format = "full",
|
||||||
bookmark_file_pick_mode = "hover",
|
file_pick_mode = "hover",
|
||||||
notify = {
|
notify = {
|
||||||
enable = false,
|
enable = false,
|
||||||
timeout = 1,
|
timeout = 1,
|
||||||
@@ -136,7 +136,7 @@ There are two possible values for this option:
|
|||||||
| `full` | The default, it shows the full path of the bookmark, i.e., the parent folder + the hovered file |
|
| `full` | The default, it shows the full path of the bookmark, i.e., the parent folder + the hovered file |
|
||||||
| `parent` | Only shows the parent folder of the bookmark |
|
| `parent` | Only shows the parent folder of the bookmark |
|
||||||
|
|
||||||
### `bookmark_file_pick_mode`
|
### `file_pick_mode`
|
||||||
|
|
||||||
The mode for choosing which directory to bookmark.
|
The mode for choosing which directory to bookmark.
|
||||||
|
|
||||||
|
|||||||
8
init.lua
8
init.lua
@@ -36,7 +36,7 @@ end)
|
|||||||
local _get_bookmark_file = ya.sync(function(state)
|
local _get_bookmark_file = ya.sync(function(state)
|
||||||
local folder = cx.active.current
|
local folder = cx.active.current
|
||||||
|
|
||||||
if state.bookmark_file_pick_mode == "parent" or not folder.hovered then
|
if state.file_pick_mode == "parent" or not folder.hovered then
|
||||||
return { url = folder.cwd, is_cwd = true }
|
return { url = folder.cwd, is_cwd = true }
|
||||||
end
|
end
|
||||||
return { url = folder.hovered.url, is_cwd = false }
|
return { url = folder.hovered.url, is_cwd = false }
|
||||||
@@ -247,10 +247,10 @@ return {
|
|||||||
state.desc_format = "full"
|
state.desc_format = "full"
|
||||||
end
|
end
|
||||||
|
|
||||||
if args.bookmark_file_pick_mode == "parent" then
|
if args.file_pick_mode == "parent" then
|
||||||
state.bookmark_file_pick_mode = "parent"
|
state.file_pick_mode = "parent"
|
||||||
else
|
else
|
||||||
state.bookmark_file_pick_mode = "hover"
|
state.file_pick_mode = "hover"
|
||||||
end
|
end
|
||||||
|
|
||||||
state.notify = {
|
state.notify = {
|
||||||
|
|||||||
Reference in New Issue
Block a user