[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,8 +3,7 @@ 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
@@ -113,6 +112,10 @@ in
ls = "exa";
t = "${start-tmux}";
};
shellAliases = {
g = "git";
};
shellInit = ''
set fish_greeting
'';
@@ -141,14 +144,12 @@ in
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
settings =
let flavour = "mocha"; # Replace with your preferred palette
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
{
} // builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "starship";
rev = "main"; # Replace with the latest commit hash
@@ -181,8 +182,7 @@ in
enable = true;
config = { theme = "catppuccin"; };
themes = {
catppuccin =
let flavor = "mocha";
catppuccin = let flavor = "mocha";
in {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
@@ -204,8 +204,7 @@ in
# Home Manager needs a bit of information about you and the paths it should
# manage.
username = device.user;
homeDirectory =
if device.isMac then
homeDirectory = if device.isMac then
lib.mkForce "/Users/${device.user}"
else
lib.mkForce "/home/${device.user}";

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,35 +114,39 @@
};
};
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
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;

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 = {
@@ -127,6 +130,6 @@ require("noice").setup({
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
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";
}
{

View File

@@ -1,6 +1,5 @@
{ devices, inputs, overlays, home-manager, nix-darwin, ... }:
builtins.listToAttrs (builtins.map
(device: {
builtins.listToAttrs (builtins.map (device: {
name = device.name;
value = nix-darwin.lib.darwinSystem {
system = device.system;
@@ -25,5 +24,4 @@ builtins.listToAttrs (builtins.map
}
];
};
})
devices)
}) devices)

View File

@@ -78,16 +78,8 @@
};
outputs =
{ nixpkgs
, home-manager
, nix-darwin
, flake-utils
, anyrun
, nur
, neovim-nightly-overlay
, ...
}@inputs:
outputs = { nixpkgs, home-manager, nix-darwin, flake-utils, anyrun, nur
, neovim-nightly-overlay, ... }@inputs:
let
config_devices = [
{
@@ -144,10 +136,7 @@
};
vimPlugins = final: prev: {
vimPlugins =
prev.vimPlugins
//
{
vimPlugins = prev.vimPlugins // {
comfortable-motion = final.pkgs.vimUtils.buildVimPlugin {
name = "comfortable-motion";
src = final.pkgs.fetchFromGitHub {
@@ -160,30 +149,43 @@
};
};
tmuxPlugins = final: prev: {
tmuxPlugins = prev.tmuxPlugins // {
tmux-super-fingers = final.pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "tmux-super-fingers";
version = "v1-2024-02-14";
src = final.pkgs.fetchFromGitHub {
owner = "artemave";
repo = "tmux_super_fingers";
rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd";
sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw=";
};
};
};
};
overlays = [
vimPlugins
tmuxPlugins
inputs.neovim-nightly-overlay.overlay
anyrun-overlay
vimPlugins
inputs.nixneovim.overlays.default
inputs.nixneovimplugins.overlays.default
nur.overlay
];
in
{
nixosConfigurations =
let devices = nixos_devices;
in {
nixosConfigurations = let devices = nixos_devices;
in import ./nixos/device.nix {
inherit devices inputs nixpkgs home-manager overlays nur;
};
darwinConfigurations =
let devices = darwin_devices;
darwinConfigurations = let devices = darwin_devices;
in import ./darwin/device.nix {
inherit devices inputs nixpkgs home-manager overlays nix-darwin;
};
homeConfigurations =
let devices = linux_devices;
homeConfigurations = let devices = linux_devices;
in import ./linux/device.nix {
inherit devices inputs nixpkgs home-manager overlays;
};

View File

@@ -98,8 +98,7 @@
fish
nushellFull
(pkgs.wrapFirefox
(pkgs.firefox-unwrapped.override { pipewireSupport = true; })
{ })
(pkgs.firefox-unwrapped.override { pipewireSupport = true; }) { })
gnumake
python3
(nerdfonts.override { fonts = [ "FiraCode" "Hasklig" ]; })

View File

@@ -1,2 +0,0 @@
@import url(firefox-csshacks/chrome/tabs_on_bottom.css);
@import url(firefox-csshacks/chrome/toolbars_below_content.css);