[del] Remove ZSH and Add some nvim plugins

This commit is contained in:
Uttarayan Mondal
2024-03-03 12:55:20 +05:30
parent 567fe38ac0
commit 42bf0bb237
14 changed files with 166 additions and 703 deletions

View File

@@ -3,13 +3,14 @@ let
start-tmux = (import ../scripts/start-tmux.nix) pkgs;
# https://mipmip.github.io/home-manager-option-search/
lazy = false;
in {
in
{
imports = [
# Include the results of the hardware scan.
./tmux.nix
./wezterm.nix
] ++ (if device.isLinux then [ ../linux ] else [ ])
++ (if !lazy then [ ./nvim ] else [ ]);
++ (if !lazy then [ ./nvim ] else [ ]);
home.packages = with pkgs;
[
@@ -21,7 +22,7 @@ in {
jq
tldr
spotify-player
htop-vim
bottom
qmk
nodejs
nix-index
@@ -144,17 +145,19 @@ in {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
settings = let flavour = "mocha"; # Replace with your preferred palette
in {
# Other config here
format = "$all"; # Remove this line to disable the default prompt format
palette = "catppuccin_${flavour}";
} // builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "starship";
rev = "main"; # Replace with the latest commit hash
sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0";
} + /palettes/${flavour}.toml));
settings =
let flavour = "mocha"; # Replace with your preferred palette
in {
# Other config here
format = "$all"; # Remove this line to disable the default prompt format
palette = "catppuccin_${flavour}";
} // builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "starship";
rev = "main"; # Replace with the latest commit hash
sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0";
} + /palettes/${flavour}.toml));
};
eza = {
enable = true;
@@ -182,19 +185,28 @@ in {
enable = true;
config = { theme = "catppuccin"; };
themes = {
catppuccin = let flavor = "mocha";
in {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "main";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw";
catppuccin =
let flavor = "mocha";
in {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "main";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw";
};
file = "Catppuccin-${flavor}.tmTheme";
};
file = "Catppuccin-${flavor}.tmTheme";
};
};
};
rbw = {
enable = true;
settings = {
email = "uttarayan21@gmail.com";
base_url = "https://pass.uttarayan.me";
pinenttry = if device.isMac then pkgs.pinentry_mac else pkgs.pinentry-qt;
};
};
# Let Home Manager install and manage itself.
home-manager = { enable = true; };
};
@@ -204,10 +216,11 @@ in {
# Home Manager needs a bit of information about you and the paths it should
# manage.
username = device.user;
homeDirectory = if device.isMac then
lib.mkForce "/Users/${device.user}"
else
lib.mkForce "/home/${device.user}";
homeDirectory =
if device.isMac then
lib.mkForce "/Users/${device.user}"
else
lib.mkForce "/home/${device.user}";
stateVersion = "23.11";

View File

@@ -21,43 +21,49 @@
undofile = true;
};
globals = { mapleader = " "; };
globals = {
mapleader = " ";
};
plugins = {
lspconfig = {
enable = true;
servers = {
nil = {
enable = true;
extraConfig = ''
settings = {
['nil'] = {
formatting = {
command = { "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" },
},
nix = {
flake = {
autoArchive = true,
extraConfig =
/* lua */
''
settings = {
['nil'] = {
formatting = {
command = { "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" },
},
nix = {
flake = {
autoArchive = true,
},
},
},
},
},
'';
'';
};
lua-language-server.enable = true;
jsonls.enable = true;
html.enable = true;
# rust-analyzer.enable = true;
};
extraLua.pre = ''
local lsp_zero = require'lsp-zero'
local lspconfig = require 'lspconfig'
lsp_zero.on_attach(function(client, bufnr)
lsp_zero.default_keymaps({buffer = bufnr})
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(bufnr, true)
end
end)
'';
extraLua.pre =
/* lua */
''
local lsp_zero = require'lsp-zero'
local lspconfig = require 'lspconfig'
lsp_zero.on_attach(function(client, bufnr)
lsp_zero.default_keymaps({buffer = bufnr})
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(bufnr, true)
end
end)
'';
# extraLua.post = ''
# vim.lsp.inlay_hint.enable(bufnr, true)
# '';
@@ -65,16 +71,32 @@
nvim-dap.enable = true;
todo-comments.enable = true;
lualine.enable = true;
lualine = {
enable = true;
};
commentary.enable = true;
surround.enable = true;
which-key.enable = true;
ufo.enable = true;
fugitive.enable = true;
markdown-preview = {
enable = true;
autoStart = true;
};
ts-context-commentstring.enable = true;
treesitter = {
enable = true;
indent = true;
folding = true;
refactor = {
smartRename = {
enable = true;
keymaps = {
smartRename = "<leader>rn";
};
};
};
};
mini = {
@@ -148,6 +170,7 @@
noice-nvim
nvim-web-devicons
];
extraConfigLua = builtins.readFile ./extraConfig.lua;
package = pkgs.neovim-nightly;

View File

@@ -133,3 +133,4 @@ require("noice").setup({
lsp_doc_border = true, -- add a border to hover docs and signature help
},
})

View File

@@ -9,7 +9,8 @@ let
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
fi
'';
in {
in
{
programs.tmux = {
enable = true;
shell = "${pkgs.nushellFull}/bin/nu";
@@ -26,42 +27,48 @@ in {
}
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_default_text ''''''
'';
extraConfig =
/* tmux */
''
set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_default_text ''''''
'';
}
{
plugin = tmuxPlugins.battery;
extraConfig = ''
set -g @catppuccin_status_modules_right "battery application session date_time"
'';
extraConfig =
/* tmux */
''
set -g @catppuccin_status_modules_right "battery application session date_time"
'';
}
];
extraConfig = ''
set -gw mode-keys vi
set -g status-keys vi
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
set-option -sg escape-time 10
set-option -sa terminal-features ',xterm-256color:RGB'
extraConfig =
/* tmux */
''
set -gw mode-keys vi
set -g status-keys vi
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
set -sg escape-time 10
set -sa terminal-features ',wezterm:RGB'
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -n C-\\ run-shell ${scratchpad}
bind-key -n C-\\ run-shell ${scratchpad}
bind C-n next-window
bind C-p previous-window
bind C-q last-window
bind C-n next-window
bind C-p previous-window
bind C-q last-window
if-shell 'uname | grep -q "Darwin"' { set -s copy-command "pbcopy" }
if-shell 'uname | grep -q "Linux"' { set -s copy-command "wl-copy" }
'';
if-shell 'uname | grep -q "Darwin"' { set -s copy-command "pbcopy" }
if-shell 'uname | grep -q "Linux"' { set -s copy-command "wl-copy" }
'';
};
}

View File

@@ -1,64 +1,32 @@
{ pkgs, ... }: {
programs.wezterm = {
enable = true;
extraConfig = ''
local wezterm = require 'wezterm';
return {
-- -- font = wezterm.font("Hasklug Nerd Font Mono", { weight = "Regular", stretch = "Normal", style = "Normal" }),
-- font = wezterm.font_with_fallback({
-- "Hasklig",
-- "Symbols Nerd Font Mono"
-- }),
color_scheme = "Catppuccin Mocha",
font_size = 16,
-- colors = {
-- -- The default text color
-- foreground = "#f8f8f2",
-- -- The default background color
-- -- background = "#282a36",
-- -- Overrides the cell background color when the current cell is occupied by the
-- -- cursor and the cursor style is set to Block
-- cursor_bg = "#f8f8f2",
-- -- Overrides the text color when the current cell is occupied by the cursor
-- cursor_fg = "#000",
-- -- Specifies the border color of the cursor when the cursor style is set to Block,
-- -- or the color of the vertical or horizontal bar when the cursor style is set to
-- -- Bar or Underline.
-- cursor_border = "#52ad70",
-- -- the foreground color of selected text
-- selection_fg = "#ffffff",
-- -- the background color of selected text
-- selection_bg = "#ffffff",
-- -- The color of the scrollbar "thumb"; the portion that represents the current viewport
-- scrollbar_thumb = "#222222",
-- -- The color of the split lines between panes
-- split = "#444444",
-- ansi = { "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2" },
-- brights = { "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff" },
-- -- Arbitrary colors of the palette in the range from 16 to 255
-- indexed = { [136] = "#af8700" },
-- -- Since: nightly builds only
-- -- When the IME, a dead key or a leader key are being processed and are effectively
-- -- holding input pending the result of input composition, change the cursor
-- -- to this color to give a visual cue about the compose state.
-- compose_cursor = "orange",
-- },
initial_cols = 120,
hide_tab_bar_if_only_one_tab = true,
window_background_opacity = 0.8,
cursor_blink_rate = 8,
default_cursor_style = "BlinkingBlock",
default_prog = { "${pkgs.fish.outPath}/bin/fish", "-l" },
window_padding = {
left = 2,
right = 0,
top = 2,
bottom = 0,
},
window_decorations = "RESIZE",
use_ime = false,
}
'';
extraConfig = /* lua */
''
local wezterm = require 'wezterm';
return {
term = "wezterm",
font = wezterm.font_with_fallback({
"Hasklig",
"Symbols Nerd Font Mono"
}),
color_scheme = "Catppuccin Mocha",
font_size = 16,
initial_cols = 120,
hide_tab_bar_if_only_one_tab = true,
window_background_opacity = 0.8,
cursor_blink_rate = 8,
default_cursor_style = "BlinkingBlock",
default_prog = { "${pkgs.fish.outPath}/bin/fish", "-l" },
window_padding = {
left = 2,
right = 0,
top = 2,
bottom = 0,
},
window_decorations = "RESIZE",
use_ime = false,
}
'';
};
}