Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
RedrawDeco -> ToggleDeco
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshgupta137 committed Apr 9, 2023
1 parent 03f4b6e commit 446b647
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,9 @@ return {
end,
})

vim.api.nvim_create_user_command("RedrawDeco", function()
vim.cmd "TSDisable rainbow"
vim.api.nvim_create_user_command("ToggleDeco", function()
vim.cmd "IndentBlanklineToggle"
vim.cmd "IndentBlanklineToggle"
vim.cmd "TSEnable rainbow"
end, { desc = "Refresh indents & rainbow" })
vim.cmd "TSToggle rainbow"
end, { desc = "Toggle indents & rainbow" })
end,
}
2 changes: 1 addition & 1 deletion mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ return {
["<leader>r"] = { ":%sno/<C-r><C-w>/<C-r><C-w>/gI<Left><Left><Left>", desc = "Search & Replace word" },
["<leader>R"] = { function() require("ssr").open() end, desc = "Structural Search & Replace" },
["<M-w>"] = { "<cmd>Inspect<cr>", desc = "Inspect" },
["<M-r>"] = { "<cmd>RedrawDeco<cr>", desc = "Refresh indents & rainbow" },
["<M-r>"] = { "<cmd>ToggleDeco<cr>", desc = "Toggle indents & rainbow" },
["<M-C>"] = { "C", desc = "Replace to end" },
["<M-D>"] = { "D", desc = "Cut to end" },
["<M-c><M-c>"] = { "dd", desc = "Replace line" },
Expand Down

0 comments on commit 446b647

Please sign in to comment.