[feat] Added some neovim plugins and removed mozilla folder

This commit is contained in:
Uttarayan Mondal
2024-03-03 04:14:14 +05:30
parent b85a7c2970
commit 567fe38ac0
9 changed files with 144 additions and 147 deletions

View File

@@ -3,14 +3,13 @@ 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;
[
@@ -113,6 +112,10 @@ in
ls = "exa";
t = "${start-tmux}";
};
shellAliases = {
g = "git";
};
shellInit = ''
set fish_greeting
'';
@@ -141,19 +144,17 @@ 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;
@@ -181,17 +182,16 @@ 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";
};
file = "Catppuccin-${flavor}.tmTheme";
catppuccin = let flavor = "mocha";
in {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "main";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw";
};
file = "Catppuccin-${flavor}.tmTheme";
};
};
};
@@ -204,11 +204,10 @@ 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

@@ -69,6 +69,8 @@
commentary.enable = true;
surround.enable = true;
which-key.enable = true;
ufo.enable = true;
fugitive.enable = true;
treesitter = {
enable = true;
@@ -80,6 +82,7 @@
ai.enable = true;
pairs.enable = true;
cursorword.enable = true;
starter.enable = true;
};
};
@@ -95,6 +98,8 @@
"<leader>gg" = "require'telescope.builtin'.live_grep";
"<leader>;" = "require'telescope.builtin'.buffers";
"<leader>o" = "[[<cmd>TroubleToggle<cr>]]";
"<leader>ee" = "[[<Plug>RestNvim]]";
"<leader>ec" = "[[<Plug>RestNvimPreview]]";
"<leader>\\\"" = ''[["+]]'';
"<leader><leader>" = "'<c-^>'";
"vff" = "'<cmd>vertical Gdiffsplit<cr>'";
@@ -109,37 +114,41 @@
};
};
extraPlugins =
[
pkgs.vimPlugins.comfortable-motion
pkgs.vimPlugins.vim-abolish
pkgs.vimPlugins.telescope-nvim
pkgs.vimPlugins.telescope-ui-select-nvim
pkgs.vimPlugins.telescope-fzf-native-nvim
pkgs.vimPlugins.telescope-file-browser-nvim
pkgs.vimPlugins.telescope-dap-nvim
pkgs.vimPlugins.rustaceanvim
extraPlugins = with pkgs.vimPlugins; [
comfortable-motion
vim-abolish
telescope-nvim
telescope-ui-select-nvim
telescope-fzf-native-nvim
telescope-file-browser-nvim
telescope-dap-nvim
rustaceanvim
# lsp stuff
pkgs.vimPlugins.nvim-cmp
pkgs.vimPlugins.cmp-buffer
pkgs.vimPlugins.cmp-path
pkgs.vimPlugins.cmp-cmdline
pkgs.vimPlugins.cmp-nvim-lsp
pkgs.vimPlugins.cmp-nvim-lua
pkgs.vimPlugins.cmp_luasnip
pkgs.vimPlugins.luasnip
pkgs.vimPlugins.fidget-nvim
pkgs.vimPlugins.copilot-lua
pkgs.vimPlugins.lsp-zero-nvim
pkgs.vimPlugins.trouble-nvim
pkgs.vimPlugins.nvim-web-devicons
# lsp stuff
nvim-cmp
cmp-buffer
cmp-path
cmp-cmdline
cmp-nvim-lsp
cmp-nvim-lua
cmp_luasnip
cmp-tmux
cmp-treesitter
luasnip
fidget-nvim
copilot-lua
lsp-zero-nvim
trouble-nvim
crates-nvim
pkgs.vimPlugins.rest-nvim
# No more postman
rest-nvim
pkgs.vimPlugins.noice-nvim
# UI
noice-nvim
nvim-web-devicons
];
];
extraConfigLua = builtins.readFile ./extraConfig.lua;
package = pkgs.neovim-nightly;
};

View File

@@ -71,8 +71,10 @@ cmp.setup({
{ name = 'buffer' },
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'treesitter' },
{ name = 'path' },
{ name = 'git' },
{ name = 'tmux' }
}),
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm(),
@@ -111,6 +113,7 @@ cmp.setup.filetype('gitcommit', {
{ name = 'buffer' },
})
})
require('crates').setup()
require("noice").setup({
lsp = {
@@ -123,10 +126,10 @@ require("noice").setup({
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = true, -- add a border to hover docs and signature help
},
})

View File

@@ -1,15 +1,5 @@
{ pkgs, ... }:
let
tmux-super-fingers = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "tmux-super-fingers";
version = "v1-2024-02-14";
src = pkgs.fetchFromGitHub {
owner = "artemave";
repo = "tmux_super_fingers";
rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd";
sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw=";
};
};
scratchpad = pkgs.writeShellScript "scratchpad" ''
width=''${2:-95%}
height=''${2:-95%}
@@ -19,8 +9,7 @@ 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";
@@ -30,8 +19,9 @@ in
keyMode = "vi";
plugins = with pkgs; [
tmuxPlugins.better-mouse-mode
tmuxPlugins.tmux-fzf
{
plugin = tmux-super-fingers;
plugin = tmuxPlugins.tmux-super-fingers;
extraConfig = "set -g @super-fingers-key o";
}
{