fmt: alejandra
This commit is contained in:
parent
a6a7676c4e
commit
537828c2e9
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
# General configuration.
|
# General configuration.
|
||||||
./keymaps.nix
|
./keymaps.nix
|
||||||
|
@ -39,4 +37,3 @@
|
||||||
./plugins/utils/whichkey.nix
|
./plugins/utils/whichkey.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
config.opts = {
|
config.opts = {
|
||||||
# General
|
# General
|
||||||
number = true; # Display line numbers.
|
number = true; # Display line numbers.
|
||||||
|
@ -15,4 +13,3 @@
|
||||||
expandtab = true; # Convert tabs to spaces.
|
expandtab = true; # Convert tabs to spaces.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# Autocompletion plugin
|
# Autocompletion plugin
|
||||||
plugins.cmp = {
|
plugins.cmp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -8,8 +6,8 @@
|
||||||
settings = {
|
settings = {
|
||||||
# The sources to use
|
# The sources to use
|
||||||
sources = [
|
sources = [
|
||||||
{ name = "nvim_lsp"; } # LSP source for cmp
|
{name = "nvim_lsp";} # LSP source for cmp
|
||||||
{ name = "luasnip"; } # Snippets source for cmp
|
{name = "luasnip";} # Snippets source for cmp
|
||||||
];
|
];
|
||||||
# The snippet expansion function.
|
# The snippet expansion function.
|
||||||
snippet.expand = ''
|
snippet.expand = ''
|
||||||
|
@ -35,4 +33,3 @@
|
||||||
autoEnableSources = true;
|
autoEnableSources = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.bufdelete = {
|
plugins.bufdelete = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -20,4 +18,3 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.comment = {
|
plugins.comment = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -30,4 +28,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.neo-tree = {
|
plugins.neo-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -14,4 +12,3 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# Tree-sitter is a parser generator tool and an incremental parsing library.
|
# Tree-sitter is a parser generator tool and an incremental parsing library.
|
||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -21,4 +19,3 @@
|
||||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.fugitive = {
|
plugins.fugitive = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.gitsigns = {
|
plugins.gitsigns = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{
|
{
|
||||||
mode = [ "n" "v" ];
|
mode = ["n" "v"];
|
||||||
key = "<leader>hs";
|
key = "<leader>hs";
|
||||||
action = "<cmd>Gitsigns stage_hunk<cr>";
|
action = "<cmd>Gitsigns stage_hunk<cr>";
|
||||||
options = {
|
options = {
|
||||||
|
@ -17,7 +15,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
mode = [ "n" "v" ];
|
mode = ["n" "v"];
|
||||||
key = "<leader>hr";
|
key = "<leader>hr";
|
||||||
action = "<cmd>Gitsigns reset_hunk<cr>";
|
action = "<cmd>Gitsigns reset_hunk<cr>";
|
||||||
options = {
|
options = {
|
||||||
|
@ -107,4 +105,3 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.lazygit = {
|
plugins.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -29,4 +27,3 @@
|
||||||
require("telescope").load_extension("lazygit")
|
require("telescope").load_extension("lazygit")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{pkgs, ...}:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.conform-nvim = {
|
plugins.conform-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.lsp = {
|
plugins.lsp = {
|
||||||
enable = true; # Enable neovim's built-in LSP.
|
enable = true; # Enable neovim's built-in LSP.
|
||||||
|
|
||||||
|
@ -54,4 +52,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.luasnip = {
|
plugins.luasnip = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
|
@ -9,4 +7,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
gruvbox-material
|
gruvbox-material
|
||||||
];
|
];
|
||||||
|
@ -12,4 +10,3 @@
|
||||||
vim.cmd.colorscheme('gruvbox-material')
|
vim.cmd.colorscheme('gruvbox-material')
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.lualine = {
|
plugins.lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
globalstatus = true;
|
globalstatus = true;
|
||||||
|
@ -12,14 +10,20 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Icons for our separators
|
# Icons for our separators
|
||||||
componentSeparators = { left = ""; right = ""; };
|
componentSeparators = {
|
||||||
sectionSeparators = { left = ""; right = ""; };
|
left = "";
|
||||||
|
right = "";
|
||||||
|
};
|
||||||
|
sectionSeparators = {
|
||||||
|
left = "";
|
||||||
|
right = "";
|
||||||
|
};
|
||||||
|
|
||||||
# Display components in tabline
|
# Display components in tabline
|
||||||
tabline = {
|
tabline = {
|
||||||
lualine_a = [ { name = "buffers"; } ];
|
lualine_a = [{name = "buffers";}];
|
||||||
lualine_x = [ { name = "hostname"; } ];
|
lualine_x = [{name = "hostname";}];
|
||||||
lualine_z = [ { name = "encoding"; } ];
|
lualine_z = [{name = "encoding";}];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Lualine has sections as shown below
|
# Lualine has sections as shown below
|
||||||
|
@ -28,15 +32,19 @@
|
||||||
# +-------------------------------------------------+
|
# +-------------------------------------------------+
|
||||||
sections = {
|
sections = {
|
||||||
# Section A
|
# Section A
|
||||||
lualine_a = [ { name = "mode"; } ];
|
lualine_a = [{name = "mode";}];
|
||||||
|
|
||||||
# Section B
|
# Section B
|
||||||
lualine_b = [
|
lualine_b = [
|
||||||
# Git branch
|
# Git branch
|
||||||
{ name = "branch"; icon = ""; }
|
{
|
||||||
|
name = "branch";
|
||||||
|
icon = "";
|
||||||
|
}
|
||||||
|
|
||||||
# Git diff status
|
# Git diff status
|
||||||
{ name = "diff";
|
{
|
||||||
|
name = "diff";
|
||||||
extraConfig.symbols = {
|
extraConfig.symbols = {
|
||||||
added = "+";
|
added = "+";
|
||||||
modified = "~";
|
modified = "~";
|
||||||
|
@ -46,14 +54,15 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Section C
|
# Section C
|
||||||
lualine_c = [ { name = "filename"; } ];
|
lualine_c = [{name = "filename";}];
|
||||||
|
|
||||||
# Section X
|
# Section X
|
||||||
lualine_x = [
|
lualine_x = [
|
||||||
# Diagnostic count from nvim_lsp
|
# Diagnostic count from nvim_lsp
|
||||||
{ name = "diagnostics";
|
{
|
||||||
|
name = "diagnostics";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
sources = [ "nvim_lsp" ];
|
sources = ["nvim_lsp"];
|
||||||
symbols = {
|
symbols = {
|
||||||
error = "error:";
|
error = "error:";
|
||||||
warn = "warning:";
|
warn = "warning:";
|
||||||
|
@ -65,11 +74,10 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Section Y
|
# Section Y
|
||||||
lualine_y = [ { name = "progress"; } ];
|
lualine_y = [{name = "progress";}];
|
||||||
|
|
||||||
# Section Z
|
# Section Z
|
||||||
lualine_z = [ { name = "location"; } ];
|
lualine_z = [{name = "location";}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.markdown-preview = {
|
plugins.markdown-preview = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = [
|
||||||
{
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
extraPlugins = [(pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "neoclip";
|
name = "neoclip";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "AckslD";
|
owner = "AckslD";
|
||||||
|
@ -9,10 +8,10 @@
|
||||||
rev = "709c97f";
|
rev = "709c97f";
|
||||||
hash = "sha256-8ZPmxVM4dzjJxAYUHRMCiAQBxZEGHtsgSCNlCZBRBWo=";
|
hash = "sha256-8ZPmxVM4dzjJxAYUHRMCiAQBxZEGHtsgSCNlCZBRBWo=";
|
||||||
};
|
};
|
||||||
})];
|
})
|
||||||
|
];
|
||||||
|
|
||||||
extraConfigLua = "require('neoclip').setup({
|
extraConfigLua = "require('neoclip').setup({
|
||||||
default_register = {'\"', '+'}
|
default_register = {'\"', '+'}
|
||||||
})";
|
})";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = [
|
||||||
{
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
extraPlugins = [(pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "software-licenses";
|
name = "software-licenses";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "chip";
|
owner = "chip";
|
||||||
|
@ -9,6 +8,6 @@
|
||||||
rev = "fb5fc33";
|
rev = "fb5fc33";
|
||||||
hash = "sha256-luyCjkZSm1F6qoRpP5hHRAx4632u6JFuX2s7m2s8y60=";
|
hash = "sha256-luyCjkZSm1F6qoRpP5hHRAx4632u6JFuX2s7m2s8y60=";
|
||||||
};
|
};
|
||||||
})];
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./neoclip.nix # Persistent clipboard.
|
./neoclip.nix # Persistent clipboard.
|
||||||
./software-licenses.nix # View common software licenses.
|
./software-licenses.nix # View common software licenses.
|
||||||
|
@ -99,4 +97,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
plugins.which-key = {
|
plugins.which-key = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -53,7 +51,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
mode = [ "n" "v" ];
|
mode = ["n" "v"];
|
||||||
key = "<leader>c";
|
key = "<leader>c";
|
||||||
action = "<Nop>";
|
action = "<Nop>";
|
||||||
options = {
|
options = {
|
||||||
|
@ -80,4 +78,3 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
flake.nix
21
flake.nix
|
@ -7,9 +7,12 @@
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs = {
|
||||||
{ nixvim, flake-parts, ... }@inputs:
|
nixvim,
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts,
|
||||||
|
...
|
||||||
|
} @ inputs:
|
||||||
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
@ -17,9 +20,11 @@
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem =
|
perSystem = {
|
||||||
{ pkgs, system, ... }:
|
pkgs,
|
||||||
let
|
system,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
nixvimLib = nixvim.lib.${system};
|
nixvimLib = nixvim.lib.${system};
|
||||||
nixvim' = nixvim.legacyPackages.${system};
|
nixvim' = nixvim.legacyPackages.${system};
|
||||||
nixvimModule = {
|
nixvimModule = {
|
||||||
|
@ -31,8 +36,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nvim = nixvim'.makeNixvimWithModule nixvimModule;
|
nvim = nixvim'.makeNixvimWithModule nixvimModule;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
checks = {
|
checks = {
|
||||||
# Run `nix flake check .` to verify that your config is not broken
|
# Run `nix flake check .` to verify that your config is not broken
|
||||||
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
|
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
|
||||||
|
@ -45,4 +49,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue