feat: rename experimental_watch_for_changes -> watch_for_changes
I've been using this for a while now and haven't seen any issues. We can take "experimental" out of the name.
This commit is contained in:
parent
65c53dbe4f
commit
c7c7ce5bd4
5 changed files with 10 additions and 5 deletions
|
|
@ -175,7 +175,7 @@ require("oil").setup({
|
||||||
-- Set to `false` to disable, or "name" to keep it on the file names
|
-- Set to `false` to disable, or "name" to keep it on the file names
|
||||||
constrain_cursor = "editable",
|
constrain_cursor = "editable",
|
||||||
-- Set to true to watch the filesystem for changes and reload oil
|
-- Set to true to watch the filesystem for changes and reload oil
|
||||||
experimental_watch_for_changes = false,
|
watch_for_changes = false,
|
||||||
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
||||||
-- Additionally, if it is a string that matches "actions.<name>",
|
-- Additionally, if it is a string that matches "actions.<name>",
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ CONFIG *oil-confi
|
||||||
-- Set to `false` to disable, or "name" to keep it on the file names
|
-- Set to `false` to disable, or "name" to keep it on the file names
|
||||||
constrain_cursor = "editable",
|
constrain_cursor = "editable",
|
||||||
-- Set to true to watch the filesystem for changes and reload oil
|
-- Set to true to watch the filesystem for changes and reload oil
|
||||||
experimental_watch_for_changes = false,
|
watch_for_changes = false,
|
||||||
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
||||||
-- Additionally, if it is a string that matches "actions.<name>",
|
-- Additionally, if it is a string that matches "actions.<name>",
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ local default_config = {
|
||||||
-- Set to `false` to disable, or "name" to keep it on the file names
|
-- Set to `false` to disable, or "name" to keep it on the file names
|
||||||
constrain_cursor = "editable",
|
constrain_cursor = "editable",
|
||||||
-- Set to true to watch the filesystem for changes and reload oil
|
-- Set to true to watch the filesystem for changes and reload oil
|
||||||
experimental_watch_for_changes = false,
|
watch_for_changes = false,
|
||||||
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
||||||
-- Additionally, if it is a string that matches "actions.<name>",
|
-- Additionally, if it is a string that matches "actions.<name>",
|
||||||
|
|
@ -207,6 +207,11 @@ M.setup = function(opts)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- This option was renamed because it is no longer experimental
|
||||||
|
if new_conf.experimental_watch_for_changes then
|
||||||
|
new_conf.watch_for_changes = true
|
||||||
|
end
|
||||||
|
|
||||||
for k, v in pairs(new_conf) do
|
for k, v in pairs(new_conf) do
|
||||||
M[k] = v
|
M[k] = v
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
---@field cleanup_delay_ms? integer Oil will automatically delete hidden buffers after this delay. You can set the delay to false to disable cleanup entirely. Note that the cleanup process only starts when none of the oil buffers are currently displayed.
|
---@field cleanup_delay_ms? integer Oil will automatically delete hidden buffers after this delay. You can set the delay to false to disable cleanup entirely. Note that the cleanup process only starts when none of the oil buffers are currently displayed.
|
||||||
---@field lsp_file_methods? oil.LspFileMethods Configure LSP file operation integration.
|
---@field lsp_file_methods? oil.LspFileMethods Configure LSP file operation integration.
|
||||||
---@field constrain_cursor? false|"name"|"editable" Constrain the cursor to the editable parts of the oil buffer. Set to `false` to disable, or "name" to keep it on the file names.
|
---@field constrain_cursor? false|"name"|"editable" Constrain the cursor to the editable parts of the oil buffer. Set to `false` to disable, or "name" to keep it on the file names.
|
||||||
---@field experimental_watch_for_changes? boolean Set to true to watch the filesystem for changes and reload oil.
|
---@field watch_for_changes? boolean Set to true to watch the filesystem for changes and reload oil.
|
||||||
---@field keymaps? table<string, any>
|
---@field keymaps? table<string, any>
|
||||||
---@field use_default_keymaps? boolean Set to false to disable all of the above keymaps
|
---@field use_default_keymaps? boolean Set to false to disable all of the above keymaps
|
||||||
---@field view_options? oil.ViewOptions Configure which files are shown and how they are shown.
|
---@field view_options? oil.ViewOptions Configure which files are shown and how they are shown.
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ M.initialize = function(bufnr)
|
||||||
if
|
if
|
||||||
adapter
|
adapter
|
||||||
and adapter.name == "files"
|
and adapter.name == "files"
|
||||||
and config.experimental_watch_for_changes
|
and config.watch_for_changes
|
||||||
and not session[bufnr].fs_event
|
and not session[bufnr].fs_event
|
||||||
then
|
then
|
||||||
local fs_event = assert(uv.new_fs_event())
|
local fs_event = assert(uv.new_fs_event())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue