diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-02 18:51:14 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-02 18:53:06 +0100 |
commit | 5d95ae4d2c4a47589412fafd1572eaaaff15622d (patch) | |
tree | 6e95a463c0830602933aee3dee61370150c176b0 /modules/home.legacy/conf/nvim/plgs/telescope/extensions/rooter | |
parent | feat(flake/treefmt.nix): Specify lua formatter settings (diff) | |
download | nixos-config-5d95ae4d2c4a47589412fafd1572eaaaff15622d.tar.gz nixos-config-5d95ae4d2c4a47589412fafd1572eaaaff15622d.zip |
style(modules/legacy/conf/nvim): Format
Diffstat (limited to 'modules/home.legacy/conf/nvim/plgs/telescope/extensions/rooter')
-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 |