From 5d95ae4d2c4a47589412fafd1572eaaaff15622d Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 2 Nov 2024 18:51:14 +0100 Subject: style(modules/legacy/conf/nvim): Format --- .../nvim/plgs/telescope/extensions/rooter/lua/rooter.lua | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'modules/home.legacy/conf/nvim/plgs/telescope') 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 -- cgit 1.4.1