refactor(plugins/astrocore): move some settings out of plugin

This commit is contained in:
Nicolas Goudry 2024-06-07 22:51:48 +02:00
parent 2b6a512de0
commit 1677fceed9
No known key found for this signature in database
GPG key ID: 5FC434D9FFD1DF44
15 changed files with 720 additions and 778 deletions

164
config/keymaps/toggles.nix Normal file
View file

@ -0,0 +1,164 @@
# UI/UX toggles
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_mappings.lua#L128-L145
[
{
key = "<Leader>uA";
options.desc = "Toggle rooter autochdir";
action.__raw = ''
function()
require("astrocore.toggles").autochdir()
end
'';
}
{
key = "<Leader>ub";
options.desc = "Toggle background";
action.__raw = ''
function()
require("astrocore.toggles").background()
end
'';
}
{
key = "<Leader>ud";
options.desc = "Toggle diagnostics";
action.__raw = ''
function()
require("astrocore.toggles").diagnostics()
end
'';
}
{
key = "<Leader>ug";
options.desc = "Toggle signcolumn";
action.__raw = ''
function()
require("astrocore.toggles").signcolumn()
end
'';
}
{
key = "<Leader>u>";
options.desc = "Toggle foldcolumn";
action.__raw = ''
function()
require("astrocore.toggles").foldcolumn()
end
'';
}
{
key = "<Leader>ui";
options.desc = "Change indent setting";
action.__raw = ''
function()
require("astrocore.toggles").indent()
end
'';
}
{
key = "<Leader>ul";
options.desc = "Toggle statusline";
action.__raw = ''
function()
require("astrocore.toggles").statusline()
end
'';
}
{
key = "<Leader>un";
options.desc = "Change line numbering";
action.__raw = ''
function()
require("astrocore.toggles").number()
end
'';
}
{
key = "<Leader>uN";
options.desc = "Toggle Notifications";
action.__raw = ''
function()
require("astrocore.toggles").notifications()
end
'';
}
{
key = "<Leader>up";
options.desc = "Toggle paste mode";
action.__raw = ''
function()
require("astrocore.toggles").paste()
end
'';
}
{
key = "<Leader>us";
options.desc = "Toggle spellcheck";
action.__raw = ''
function()
require("astrocore.toggles").spell()
end
'';
}
{
key = "<Leader>uS";
options.desc = "Toggle conceal";
action.__raw = ''
function()
require("astrocore.toggles").conceal()
end
'';
}
{
key = "<Leader>ut";
options.desc = "Toggle tabline";
action.__raw = ''
function()
require("astrocore.toggles").tabline()
end
'';
}
{
key = "<Leader>uu";
options.desc = "Toggle URL highlight";
action.__raw = ''
function()
require("astrocore.toggles").url_match()
end
'';
}
{
key = "<Leader>uw";
options.desc = "Toggle wrap";
action.__raw = ''
function()
require("astrocore.toggles").wrap()
end
'';
}
{
key = "<Leader>uy";
options.desc = "Toggle syntax highlight";
action.__raw = ''
function()
require("astrocore.toggles").buffer_syntax()
end
'';
}
]