feat: config option to disable lsp file methods (#477)

* added config option to enable or disable lsp_file_methods

* refactor: rename enable -> enabled

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
This commit is contained in:
csponge 2024-09-11 22:41:46 -04:00 committed by GitHub
parent 665bf2edc9
commit f60bb7f793
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 2 deletions

View file

@ -40,6 +40,8 @@ local default_config = {
-- Note that the cleanup process only starts when none of the oil buffers are currently displayed
cleanup_delay_ms = 2000,
lsp_file_methods = {
-- Enable or disable LSP file operations
enabled = true,
-- Time to wait for LSP file operations to complete before skipping
timeout_ms = 1000,
-- Set to true to autosave buffers that are updated with LSP willRenameFiles
@ -247,10 +249,12 @@ local M = {}
---@field keymaps_help? oil.SetupSimpleWindowConfig Configuration for the floating keymaps help window
---@class (exact) oil.LspFileMethods
---@field enabled boolean
---@field timeout_ms integer
---@field autosave_changes boolean|"unmodified" Set to true to autosave buffers that are updated with LSP willRenameFiles. Set to "unmodified" to only save unmodified buffers.
---@class (exact) oil.SetupLspFileMethods
---@field enabled? boolean Enable or disable LSP file operations
---@field timeout_ms? integer Time to wait for LSP file operations to complete before skipping.
---@field autosave_changes? boolean|"unmodified" Set to true to autosave buffers that are updated with LSP willRenameFiles. Set to "unmodified" to only save unmodified buffers.