Finalised Terminal Config

This commit is contained in:
2025-12-27 13:35:09 +01:00
parent f39de85d57
commit 9a777def2f
12 changed files with 165 additions and 212 deletions

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
# Alpha: Start screen/dashboard for Neovim
# Shows a custom ASCII art header and quick action buttons on startup.
programs.nixvim.plugins.alpha = {
@@ -47,14 +46,10 @@
{
type = "button";
val = "[+] New file";
on_press.__raw = "function() vim.cmd[[ene]] vim.cmd[[startinsert]] end";
on_press.__raw =
"function() vim.cmd[[ene]] vim.cmd[[startinsert]] end";
opts = {
keymap = [
"n"
"e"
":ene <BAR> startinsert <CR>"
{ }
];
keymap = [ "n" "e" ":ene <BAR> startinsert <CR>" { } ];
shortcut = "e";
position = "center";
cursor = 3;
@@ -68,12 +63,7 @@
val = "[?] Find file";
on_press.__raw = "function() vim.cmd[[Telescope find_files]] end";
opts = {
keymap = [
"n"
"f"
":Telescope find_files <CR>"
{ }
];
keymap = [ "n" "f" ":Telescope find_files <CR>" { } ];
shortcut = "f";
position = "center";
cursor = 3;
@@ -87,12 +77,7 @@
val = "[~] Recent files";
on_press.__raw = "function() vim.cmd[[Telescope oldfiles]] end";
opts = {
keymap = [
"n"
"r"
":Telescope oldfiles <CR>"
{ }
];
keymap = [ "n" "r" ":Telescope oldfiles <CR>" { } ];
shortcut = "r";
position = "center";
cursor = 3;
@@ -104,14 +89,9 @@
{
type = "button";
val = "[Y] Yazi";
on_press.__raw = "function() vim.cmd[[Yazi]] end";
on_press.__raw = "function() require('yazi').yazi() end";
opts = {
keymap = [
"n"
"y"
":Yazi<CR>"
{ }
];
keymap = [ "n" "y" ":Yazi<CR>" { } ];
shortcut = "y";
position = "center";
cursor = 3;
@@ -125,12 +105,7 @@
val = "[X] Quit";
on_press.__raw = "function() vim.cmd[[qa]] end";
opts = {
keymap = [
"n"
"q"
":qa<CR>"
{ }
];
keymap = [ "n" "q" ":qa<CR>" { } ];
shortcut = "q";
position = "center";
cursor = 3;

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
# Conform: Code formatter that runs external formatting tools
# Automatically formats code on save for consistent style.
programs.nixvim = {
@@ -16,7 +15,7 @@
};
format_on_save = {
timeout_ms = 500;
timeout_ms = 2000;
lsp_fallback = true;
};
};

View File

@@ -1,7 +1,5 @@
{ ... }:
{
{ ... }: {
imports = [
./alpha.nix
./treesitter.nix
./lint.nix
./lsp.nix
@@ -11,6 +9,7 @@
./toggleterm.nix
./telescope.nix
./catppuccin.nix
./alpha.nix
];
programs.nixvim = {
@@ -23,13 +22,13 @@
plugins.web-devicons.enable = true;
opts = {
number = true; # Show line numbers
cursorline = true; # Highlight current line
showmode = true; # already in statusline
hlsearch = true; # Highlight search result
incsearch = true; # Incremental Search
tabstop = 4;
termguicolors = true; # Enable 24-bit colormode
number = true; # Show line numbers
cursorline = true; # Highlight current line
showmode = true; # already in statusline
hlsearch = true; # Highlight search result
incsearch = true; # Incremental Search
tabstop = 4;
termguicolors = true; # Enable 24-bit colormode
};
# Clipboard keymaps - yank to system clipboard
@@ -38,51 +37,51 @@ termguicolors = true; # Enable 24-bit colormode
{
mode = "n";
key = "y";
action = "\"+y";
action = ''"+y'';
options.desc = "Yank to clipboard";
}
{
mode = "v";
key = "y";
action = "\"+y";
action = ''"+y'';
options.desc = "Yank to clipboard";
}
{
mode = "n";
key = "Y";
action = "\"+Y";
action = ''"+Y'';
options.desc = "Yank line to clipboard";
}
# Delete operations
{
mode = "n";
key = "d";
action = "\"+d";
action = ''"+d'';
options.desc = "Delete to clipboard";
}
{
mode = "v";
key = "d";
action = "\"+d";
action = ''"+d'';
options.desc = "Delete to clipboard";
}
{
mode = "n";
key = "D";
action = "\"+D";
action = ''"+D'';
options.desc = "Delete line to clipboard";
}
# Paste operations
{
mode = "n";
key = "p";
action = "\"+p";
action = ''"+p'';
options.desc = "Paste from clipboard";
}
{
mode = "v";
key = "p";
action = "\"+p";
action = ''"+p'';
options.desc = "Paste from clipboard";
}
];

View File

@@ -1,12 +1,16 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
# Yazi: Terminal file manager integration for Neovim
# Provides a fast, visual way to browse and manage files.
programs.nixvim = {
yazi = {
enable = true;
settings = {
open_for_directories = true;
};
};
# Use extraPlugins to manually load yazi.nvim
extraPlugins = with pkgs.vimPlugins; [ yazi-nvim ];
# Configure yazi after it's loaded
extraConfigLua = ''
require('yazi').setup({
open_for_directories = true,
})
'';
keymaps = [
{
@@ -31,7 +35,7 @@
}
];
# Install yazi terminal program
extraPackages = with pkgs; [ yazi ];
};
}