Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: modularize Neve #111

Merged
merged 20 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ Neve is highly customizable. Here are some important files for configuring your

- **config/default.nix:** This file contains the main configuration file. You can add or delete plugins as you like.

- **config/sets.nix:** In this file, you can add or remove options and adjust their specific settings.
- **config/sets/set.nix:** In this file, you can add or remove options and adjust their specific settings.

- **config/keymaps.nix:** This file contains custom key mappings. You can add your own keyboard shortcuts to enhance productivity.
- **config/keys.nix:** This file contains custom key mappings. You can add your own keyboard shortcuts to enhance productivity.

- **config/lsp/lsp.nix:** Here you can configure your preferred Language Servers.
- **config/lsp/lsp-nvim.nix:** Here you can configure your preferred Language Servers.

- **config/lsp/conform.nix:** Configure Formatters for the desired languages.

Expand Down
232 changes: 119 additions & 113 deletions config/bufferlines/bufferline.nix
Original file line number Diff line number Diff line change
@@ -1,129 +1,135 @@
{ lib, config, ... }:
{
plugins = {
bufferline = {
enable = true;
settings = {
options = {
separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin“
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}
];
options = {
bufferline.enable = lib.mkEnableOption "Enable bufferline module";
};
config = lib.mkIf config.bufferline.enable {
plugins = {
bufferline = {
enable = true;
settings = {
options = {
separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin“
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}
];
};
};
};
};
};
keymaps = [
{
mode = "n";
key = "<Tab>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
keymaps = [
{
mode = "n";
key = "<Tab>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}

{
mode = "n";
key = "<S-Tab>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<S-Tab>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}

{
mode = "n";
key = "<S-l>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-l>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}

{
mode = "n";
key = "<S-h>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<S-h>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}

{
mode = "n";
key = "<leader>bd";
action = "<cmd>bdelete<cr>";
options = {
desc = "Delete buffer";
};
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>bdelete<cr>";
options = {
desc = "Delete buffer";
};
}

{
mode = "n";
key = "<leader>bb";
action = "<cmd>e #<cr>";
options = {
desc = "Switch to Other Buffer";
};
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>e #<cr>";
options = {
desc = "Switch to Other Buffer";
};
}

# {
# mode = "n";
# key = "<leader>`";
# action = "<cmd>e #<cr>";
# options = {
# desc = "Switch to Other Buffer";
# };
# }
# {
# mode = "n";
# key = "<leader>`";
# action = "<cmd>e #<cr>";
# options = {
# desc = "Switch to Other Buffer";
# };
# }

{
mode = "n";
key = "<leader>br";
action = "<cmd>BufferLineCloseRight<cr>";
options = {
desc = "Delete buffers to the right";
};
}
{
mode = "n";
key = "<leader>br";
action = "<cmd>BufferLineCloseRight<cr>";
options = {
desc = "Delete buffers to the right";
};
}

{
mode = "n";
key = "<leader>bl";
action = "<cmd>BufferLineCloseLeft<cr>";
options = {
desc = "Delete buffers to the left";
};
}
{
mode = "n";
key = "<leader>bl";
action = "<cmd>BufferLineCloseLeft<cr>";
options = {
desc = "Delete buffers to the left";
};
}

{
mode = "n";
key = "<leader>bo";
action = "<cmd>BufferLineCloseOthers<cr>";
options = {
desc = "Delete other buffers";
};
}
{
mode = "n";
key = "<leader>bo";
action = "<cmd>BufferLineCloseOthers<cr>";
options = {
desc = "Delete other buffers";
};
}

{
mode = "n";
key = "<leader>bp";
action = "<cmd>BufferLineTogglePin<cr>";
options = {
desc = "Toggle pin";
};
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>BufferLineTogglePin<cr>";
options = {
desc = "Toggle pin";
};
}

{
mode = "n";
key = "<leader>bP";
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
options = {
desc = "Delete non-pinned buffers";
};
}
];
{
mode = "n";
key = "<leader>bP";
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
options = {
desc = "Delete non-pinned buffers";
};
}
];
};
}
17 changes: 17 additions & 0 deletions config/bufferlines/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
lib,
config,
...
}:
{
imports = [
./bufferline.nix
];

options = {
bufferlines.enable = lib.mkEnableOption "Enable bufferlines module";
};
config = lib.mkIf config.bufferlines.enable {
bufferline.enable = lib.mkDefault true;
};
}
14 changes: 10 additions & 4 deletions config/colorschemes/base16.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{ lib, config, ... }:
{
colorschemes = {
base16 = {
enable = false;
colorscheme = "mountain";
options = {
base16.enable = lib.mkEnableOption "Enable base16 module";
};
config = lib.mkIf config.base16.enable {
colorschemes = {
base16 = {
enable = false;
colorscheme = "mountain";
};
};
};
}
82 changes: 44 additions & 38 deletions config/colorschemes/catppuccin.nix
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
{ lib, config, ... }:
{
colorschemes = {
catppuccin = {
enable = true;
settings = {
background = {
light = "macchiato";
dark = "mocha";
};
flavour = "mocha"; # "latte", "mocha", "frappe", "macchiato" or raw lua code
disable_bold = false;
disable_italic = false;
disable_underline = false;
transparent_background = true;
term_colors = true;
integrations = {
cmp = true;
noice = true;
notify = true;
neotree = true;
harpoon = true;
gitsigns = true;
which_key = true;
illuminate = {
enabled = true;
options = {
catppuccin.enable = lib.mkEnableOption "Enable catppuccin module";
};
config = lib.mkIf config.catppuccin.enable {
colorschemes = {
catppuccin = {
enable = true;
settings = {
background = {
light = "macchiato";
dark = "mocha";
};
treesitter = true;
treesitter_context = true;
telescope.enabled = true;
indent_blankline.enabled = true;
mini.enabled = true;
native_lsp = {
enabled = true;
inlay_hints = {
background = true;
flavour = "mocha"; # "latte", "mocha", "frappe", "macchiato" or raw lua code
disable_bold = false;
disable_italic = false;
disable_underline = false;
transparent_background = true;
term_colors = true;
integrations = {
cmp = true;
noice = true;
notify = true;
neotree = true;
harpoon = true;
gitsigns = true;
which_key = true;
illuminate = {
enabled = true;
};
underlines = {
errors = ["underline"];
hints = ["underline"];
information = ["underline"];
warnings = ["underline"];
treesitter = true;
treesitter_context = true;
telescope.enabled = true;
indent_blankline.enabled = true;
mini.enabled = true;
native_lsp = {
enabled = true;
inlay_hints = {
background = true;
};
underlines = {
errors = [ "underline" ];
hints = [ "underline" ];
information = [ "underline" ];
warnings = [ "underline" ];
};
};
};
};
Expand Down
Loading