From e924fced276e08c1e31c124a0f23854cb83504aa Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 9 Aug 2023 23:44:42 +0200 Subject: Fixed ToggleHiddenAll() from not working --- lua/user/keys.lua | 94 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 77 insertions(+), 17 deletions(-) (limited to 'lua/user/keys.lua') diff --git a/lua/user/keys.lua b/lua/user/keys.lua index 36f7fbd..2a4fa6c 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -193,13 +193,29 @@ map("n", "o", ":!xdg-open %") -- URL handling if vim.fn.has("mac") == 1 then - map("", "gx", 'call jobstart(["open", expand("")], {"detach": v:true})', {}) + map( + "", + "gx", + 'call jobstart(["open", expand("")], {"detach": v:true})', + {} + ) elseif vim.fn.has("unix") == 1 then - map("", "gx", 'call jobstart(["xdg-open", expand("")], {"detach": v:true})', {}) + map( + "", + "gx", + 'call jobstart(["xdg-open", expand("")], {"detach": v:true})', + {} + ) elseif vim.fn.has("wsl") == 1 then - map("", "gx", 'call jobstart(["wslview", expand("")], {"detach": v:true})', {}) + map( + "", + "gx", + 'call jobstart(["wslview", expand("")], {"detach": v:true})', + {} + ) else - map[""].gx = { 'lua print("Error: gx is not supported on this OS!")' } + map[""].gx = + { 'lua print("Error: gx is not supported on this OS!")' } end -- Substitute globally and locally in the selected region. @@ -246,7 +262,7 @@ map("n", "z", ":call utils#ZoomToggle()") map("n", "z", "|_") -- Toggle statusline -map("n", "", ":call ToggleHiddenAll()") +map("n", "", ":call utils#ToggleHiddenAll()") -- Open last closed buffer map("n", "", ":call OpenLastClosed()") @@ -314,19 +330,55 @@ map("n", "fg", "lua require('telescope.builtin').live_grep()") map("n", "fb", "lua require('telescope.builtin').buffers()") map("n", "fh", "lua require('telescope.builtin').help_tags()") map("n", "fc", "lua require('telescope.builtin').commands()") -map("n", "ffc", "lua require('telescope.builtin').current_buffer_fuzzy_find()") +map( + "n", + "ffc", + "lua require('telescope.builtin').current_buffer_fuzzy_find()" +) map("n", "cf", "Telescope changed_files") map("n", "fp", "Telescope pickers") -map("n", "fr", "lua require('telescope.builtin').registers({})") -- registers picker -map("n", "fd", "lua require('telescope.builtin').diagnostics()") +map( + "n", + "fr", + "lua require('telescope.builtin').registers({})" +) -- registers picker +map( + "n", + "fd", + "lua require('telescope.builtin').diagnostics()" +) map("n", "fk", "lua require('telescope.builtin').keymaps()") -map("n", "fn", [[lua require'plugins.telescope'.find_notes()]]) -- find notes -map("n", "fgn", [[lua require'plugins.telescope'.grep_notes()]]) -- search notes -map("n", "f.", [[lua require'plugins.telescope'.find_configs()]]) -- find configs -map("n", "fs", [[lua require'plugins.telescope'.find_scripts()]]) -- find scripts -map("n", "fw", [[lua require'plugins.telescope'.find_projects()]]) -- find projects -map("n", "fm", "lua require('telescope').extensions.media_files.media_files({})") -- find media files -map("n", "fi", "lua require('telescope').extensions.notify.notify({})") -- find notifications +map("n", "fn", [[lua require'plugins.telescope'.find_notes()]]) -- find notes +map( + "n", + "fgn", + [[lua require'plugins.telescope'.grep_notes()]] +) -- search notes +map( + "n", + "f.", + [[lua require'plugins.telescope'.find_configs()]] +) -- find configs +map( + "n", + "fs", + [[lua require'plugins.telescope'.find_scripts()]] +) -- find scripts +map( + "n", + "fw", + [[lua require'plugins.telescope'.find_projects()]] +) -- find projects +map( + "n", + "fm", + "lua require('telescope').extensions.media_files.media_files({})" +) -- find media files +map( + "n", + "fi", + "lua require('telescope').extensions.notify.notify({})" +) -- find notifications --map("n", "f/", "lua require('plugins.telescope').curbuf()") -- find files with hidden option map( "n", @@ -352,7 +404,11 @@ map("n", "mg", "Glow") map("n", "ww", "lua require('user.mods').Toggle_autopairs()") -- Zen-mode toggle -map("n", "zm", "ZenMode | :echom ('Zen Mode') | :sl! | echo ('')") +map( + "n", + "zm", + "ZenMode | :echom ('Zen Mode') | :sl! | echo ('')" +) -- Vim-rooter map( @@ -401,7 +457,11 @@ vim.fn.sign_define("DapBreakpoint", { text = "🐞" }) map("n", "ds", function() dap.continue() ui.toggle({}) - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("=", false, true, true), "n", false) -- Spaces buffers evenly + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes("=", false, true, true), + "n", + false + ) -- Spaces buffers evenly end) -- Set breakpoints, get variable values, step into/out of functions, etc. -- cgit v1.2.3