mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-10-27 19:20:43 +01:00
move to nixvim
This commit is contained in:
67
flake.lock
generated
67
flake.lock
generated
@@ -18,6 +18,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769996383,
|
||||||
|
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -25,11 +46,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771625283,
|
"lastModified": 1771683283,
|
||||||
"narHash": "sha256-1T88/PSNKpRNtaiXATTae0hpRnBpjmIL0b1QfGO6HBA=",
|
"narHash": "sha256-WxAEkAbo8dP7qiyPM6VN4ZGAxfuBVlNBNPkrqkrXVEc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a913ae61bf3b9f4312f6097b68cdf0a0fa699279",
|
"rev": "c6ed3eab64d23520bcbb858aa53fe2b533725d4a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -70,11 +91,49 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1771135771,
|
||||||
|
"narHash": "sha256-wyvBIhDuyCRyjB3yPg77qoyxrlgQtBR1rVW3c9knV3E=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "ed0424f0b08d303a7348f52f7850ad1b2704f9ba",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"catppuccin": "catppuccin",
|
"catppuccin": "catppuccin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nixvim": "nixvim"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,6 +8,10 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
catppuccin.url = "github:catppuccin/nix";
|
catppuccin.url = "github:catppuccin/nix";
|
||||||
|
nixvim = {
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
@@ -15,6 +19,7 @@
|
|||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
catppuccin,
|
catppuccin,
|
||||||
|
nixvim,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -35,6 +40,7 @@
|
|||||||
modules = [
|
modules = [
|
||||||
./home.nix
|
./home.nix
|
||||||
catppuccin.homeModules.catppuccin
|
catppuccin.homeModules.catppuccin
|
||||||
|
nixvim.homeManagerModules.nixvim
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -47,6 +53,7 @@
|
|||||||
modules = [
|
modules = [
|
||||||
./home.nix
|
./home.nix
|
||||||
catppuccin.homeModules.catppuccin
|
catppuccin.homeModules.catppuccin
|
||||||
|
nixvim.homeManagerModules.nixvim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
3
home.nix
3
home.nix
@@ -28,6 +28,7 @@
|
|||||||
./modules/packages.nix
|
./modules/packages.nix
|
||||||
# cli tools
|
# cli tools
|
||||||
./modules/fish.nix
|
./modules/fish.nix
|
||||||
|
./modules/nixvim.nix
|
||||||
./modules/yazi.nix
|
./modules/yazi.nix
|
||||||
./modules/btop.nix
|
./modules/btop.nix
|
||||||
./modules/atuin.nix
|
./modules/atuin.nix
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
home.file = {
|
home.file = {
|
||||||
".config/fastfetch".source = ./dotfiles/fastfetch;
|
".config/fastfetch".source = ./dotfiles/fastfetch;
|
||||||
".config/MangoHud".source = ./dotfiles/mangohud;
|
".config/MangoHud".source = ./dotfiles/mangohud;
|
||||||
".config/nvim".source = ./dotfiles/nvim;
|
# ".config/nvim".source = ./dotfiles/nvim;
|
||||||
".config/gtk-3.0/settings.ini".source = ./dotfiles/gtk-3.0/settings.ini;
|
".config/gtk-3.0/settings.ini".source = ./dotfiles/gtk-3.0/settings.ini;
|
||||||
".config/gtk-4.0".source = ./dotfiles/gtk-4.0;
|
".config/gtk-4.0".source = ./dotfiles/gtk-4.0;
|
||||||
".config/hypr".source = ./dotfiles/hypr;
|
".config/hypr".source = ./dotfiles/hypr;
|
||||||
|
|||||||
210
modules/nixvim.nix
Normal file
210
modules/nixvim.nix
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
maplocalleader = "\\";
|
||||||
|
};
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
relativenumber = true;
|
||||||
|
number = true;
|
||||||
|
signcolumn = "yes";
|
||||||
|
cursorline = false;
|
||||||
|
wrap = true;
|
||||||
|
shiftwidth = 4;
|
||||||
|
tabstop = 4;
|
||||||
|
expandtab = true;
|
||||||
|
list = true;
|
||||||
|
clipboard = "unnamedplus";
|
||||||
|
spell = true;
|
||||||
|
spelllang = [
|
||||||
|
"pl"
|
||||||
|
"en"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
colorschemes.catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings.flavour = "mocha";
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = [
|
||||||
|
"n"
|
||||||
|
"v"
|
||||||
|
];
|
||||||
|
key = "<Space>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
key = ">";
|
||||||
|
action = ">gv";
|
||||||
|
options.desc = "Shift code right";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
key = "<";
|
||||||
|
action = "<gv";
|
||||||
|
options.desc = "Shift code left";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>a";
|
||||||
|
action.__raw = "function() require('harpoon'):list():add() end";
|
||||||
|
options.desc = "Add file to harpoon";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-e>";
|
||||||
|
action.__raw = "function() require('telescope').extensions.harpoon.marks(require('telescope.themes').get_dropdown{}) end";
|
||||||
|
options.desc = "Open harpoon window";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-h>";
|
||||||
|
action.__raw = "function() require('harpoon'):list():select(1) end";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-j>";
|
||||||
|
action.__raw = "function() require('harpoon'):list():select(2) end";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-k>";
|
||||||
|
action.__raw = "function() require('harpoon'):list():select(3) end";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-l>";
|
||||||
|
action.__raw = "function() require('harpoon'):list():select(4) end";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-S-P>";
|
||||||
|
action.__raw = "function() require('harpoon'):list():prev() end";
|
||||||
|
options.desc = "Toggle previous harpoon buffer";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-S-N>";
|
||||||
|
action.__raw = "function() require('harpoon'):list():next() end";
|
||||||
|
options.desc = "Toggle next harpoon buffer";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
autoGroups = {
|
||||||
|
YankHighlight = {
|
||||||
|
clear = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
autoCmd = [
|
||||||
|
{
|
||||||
|
event = "TextYankPost";
|
||||||
|
group = "YankHighlight";
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 200 })
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
nvim-autopairs.enable = true;
|
||||||
|
|
||||||
|
which-key = {
|
||||||
|
enable = true;
|
||||||
|
settings.spec = [
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>?";
|
||||||
|
mode = "n";
|
||||||
|
desc = "Buffer Local Keymaps (which-key)";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
gitsigns = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
keymaps = {
|
||||||
|
"<leader>ff" = {
|
||||||
|
action = "find_files";
|
||||||
|
options.desc = "Telescope find files";
|
||||||
|
};
|
||||||
|
"<leader>fg" = {
|
||||||
|
action = "git_files";
|
||||||
|
options.desc = "Telescope find git files";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
harpoon = {
|
||||||
|
enable = true;
|
||||||
|
enableTelescope = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers = {
|
||||||
|
lua_ls.enable = true;
|
||||||
|
clangd.enable = true;
|
||||||
|
nil_ls.enable = true;
|
||||||
|
pyright.enable = true;
|
||||||
|
rust_analyzer = {
|
||||||
|
enable = true;
|
||||||
|
installCargo = true;
|
||||||
|
installRustc = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = {
|
||||||
|
lspBuf = {
|
||||||
|
"gd" = "definition";
|
||||||
|
"gi" = "implementation";
|
||||||
|
"<leader>ca" = "code_action";
|
||||||
|
"<leader>cf" = "format";
|
||||||
|
"<leader>r" = "rename";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp-format.enable = true;
|
||||||
|
|
||||||
|
luasnip.enable = true;
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||||
|
sources = [
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "luasnip"; }
|
||||||
|
{ name = "buffer"; }
|
||||||
|
];
|
||||||
|
mapping = {
|
||||||
|
"<C-p>" = "cmp.mapping.select_prev_item()";
|
||||||
|
"<C-n>" = "cmp.mapping.select_next_item()";
|
||||||
|
"<C-y>" = "cmp.mapping.confirm({ select = true })";
|
||||||
|
"<C-e>" = "cmp.mapping.abort()";
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
documentation = {
|
||||||
|
border = "rounded";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
fzf
|
fzf
|
||||||
eza
|
eza
|
||||||
fastfetch
|
fastfetch
|
||||||
neovim
|
|
||||||
fd
|
fd
|
||||||
duf
|
duf
|
||||||
gdu
|
gdu
|
||||||
|
|||||||
Reference in New Issue
Block a user