style: formatting

This commit is contained in:
NotAShelf 2023-03-31 18:47:17 +03:00
parent 3e4d409041
commit 2899981c1e
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
11 changed files with 43 additions and 65 deletions

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./alpha ./alpha
./dashboard-nvim ./dashboard-nvim

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./config.nix ./config.nix
./git.nix ./git.nix

View file

@ -21,43 +21,41 @@ in {
config = config =
mkIf cfg.enable mkIf cfg.enable
( {
{ vim.startPlugins =
vim.startPlugins = if (cfg.gitsigns.enable)
if (cfg.gitsigns.enable) then ["gitsigns-nvim"]
then ["gitsigns-nvim"] else [];
else [];
vim.luaConfigRC.gitsigns = mkIf (cfg.gitsigns.enable) (nvim.dag.entryAnywhere '' vim.luaConfigRC.gitsigns = mkIf (cfg.gitsigns.enable) (nvim.dag.entryAnywhere ''
-- GitSigns setup -- GitSigns setup
require('gitsigns').setup { require('gitsigns').setup {
keymaps = { keymaps = {
noremap = true, noremap = true,
['n <leader>gn'] = { expr = true, "&diff ? \'\' : '<cmd>Gitsigns next_hunk<CR>'"}, ['n <leader>gn'] = { expr = true, "&diff ? \'\' : '<cmd>Gitsigns next_hunk<CR>'"},
['n <leader>gp'] = { expr = true, "&diff ? \'\' : '<cmd>Gitsigns prev_hunk<CR>'"}, ['n <leader>gp'] = { expr = true, "&diff ? \'\' : '<cmd>Gitsigns prev_hunk<CR>'"},
['n <leader>gs'] = '<cmd>Gitsigns stage_hunk<CR>', ['n <leader>gs'] = '<cmd>Gitsigns stage_hunk<CR>',
['v <leader>gs'] = ':Gitsigns stage_hunk<CR>', ['v <leader>gs'] = ':Gitsigns stage_hunk<CR>',
['n <leader>gu'] = '<cmd>Gitsigns undo_stage_hunk<CR>', ['n <leader>gu'] = '<cmd>Gitsigns undo_stage_hunk<CR>',
['n <leader>gr'] = '<cmd>Gitsigns reset_hunk<CR>', ['n <leader>gr'] = '<cmd>Gitsigns reset_hunk<CR>',
['v <leader>gr'] = ':Gitsigns reset_hunk<CR>', ['v <leader>gr'] = ':Gitsigns reset_hunk<CR>',
['n <leader>gR'] = '<cmd>Gitsigns reset_buffer<CR>', ['n <leader>gR'] = '<cmd>Gitsigns reset_buffer<CR>',
['n <leader>gp'] = '<cmd>Gitsigns preview_hunk<CR>', ['n <leader>gp'] = '<cmd>Gitsigns preview_hunk<CR>',
['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line{full=true}<CR>', ['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line{full=true}<CR>',
['n <leader>gS'] = '<cmd>Gitsigns stage_buffer<CR>', ['n <leader>gS'] = '<cmd>Gitsigns stage_buffer<CR>',
['n <leader>gU'] = '<cmd>Gitsigns reset_buffer_index<CR>', ['n <leader>gU'] = '<cmd>Gitsigns reset_buffer_index<CR>',
['n <leader>gts'] = ':Gitsigns toggle_signs<CR>', ['n <leader>gts'] = ':Gitsigns toggle_signs<CR>',
['n <leader>gtn'] = ':Gitsigns toggle_numhl<CR>', ['n <leader>gtn'] = ':Gitsigns toggle_numhl<CR>',
['n <leader>gtl'] = ':Gitsigns toggle_linehl<CR>', ['n <leader>gtl'] = ':Gitsigns toggle_linehl<CR>',
['n <leader>gtw'] = ':Gitsigns toggle_word_diff<CR>', ['n <leader>gtw'] = ':Gitsigns toggle_word_diff<CR>',
-- Text objects -- Text objects
['o ih'] = ':<C-U>Gitsigns select_hunk<CR>', ['o ih'] = ':<C-U>Gitsigns select_hunk<CR>',
['x ih'] = ':<C-U>Gitsigns select_hunk<CR>' ['x ih'] = ':<C-U>Gitsigns select_hunk<CR>'
}, },
} }
''); '');
} };
);
} }

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
# nvim lsp support # nvim lsp support
./config.nix ./config.nix

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./glow ./glow
./config.nix ./config.nix

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./minimap-vim ./minimap-vim
./codewindow ./codewindow

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./lualine ./lualine
]; ];

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./theme.nix ./theme.nix
./config.nix ./config.nix

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./tidal.nix ./tidal.nix
./config.nix ./config.nix

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./treesitter.nix ./treesitter.nix
./context.nix ./context.nix

View file

@ -1,6 +1,4 @@
{ {...}: {
...
}: {
imports = [ imports = [
./config.nix ./config.nix
./visuals.nix ./visuals.nix