diff options
Diffstat (limited to '')
-rw-r--r-- | modules/home.legacy/conf/nvim/plgs/telescope/extensions/rooter/lua/rooter.lua | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/modules/home.legacy/conf/nvim/plgs/telescope/extensions/rooter/lua/rooter.lua b/modules/home.legacy/conf/nvim/plgs/telescope/extensions/rooter/lua/rooter.lua index 7235c5a3..48a8588d 100644 --- a/modules/home.legacy/conf/nvim/plgs/telescope/extensions/rooter/lua/rooter.lua +++ b/modules/home.legacy/conf/nvim/plgs/telescope/extensions/rooter/lua/rooter.lua @@ -25,17 +25,13 @@ local config = { patterns = { ".git" }, enable = true, debug = false } vim.g["Telescope#rooter#enabled"] = vim.F.if_nil(config.enable, true) -- redefine log if debug enabled -if vim.F.if_nil(config.debug, false) then - log = plenary.log.new({ plugin = "telescope_rooter", level = "debug" }) -end +if vim.F.if_nil(config.debug, false) then log = plenary.log.new({ plugin = "telescope_rooter", level = "debug" }) end local group = vim.api.nvim_create_augroup("TelescopeRooter", { clear = true }) vim.api.nvim_create_autocmd({ "DirChangedPre" }, { callback = function() - if vim.g["Telescope#rooter#enabled"] ~= true then - return - end + if vim.g["Telescope#rooter#enabled"] ~= true then return end if vim.g["Telescope#rooter#oldpwd"] == nil then vim.g["Telescope#rooter#oldpwd"] = vim.loop.cwd() @@ -47,9 +43,7 @@ vim.api.nvim_create_autocmd({ "DirChangedPre" }, { vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { callback = function() - if vim.g["Telescope#rooter#enabled"] ~= true then - return - end + if vim.g["Telescope#rooter#enabled"] ~= true then return end vim.schedule(function() if vim.bo.filetype == "TelescopePrompt" then @@ -66,9 +60,7 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { vim.api.nvim_create_autocmd({ "BufWinLeave" }, { callback = function() - if vim.g["Telescope#rooter#enabled"] ~= true then - return - end + if vim.g["Telescope#rooter#enabled"] ~= true then return end vim.schedule(function() if vim.bo.filetype ~= "TelescopePrompt" then |