mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-05-20 13:22:34 +02:00
Refactor flakes
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -1,21 +1,31 @@
|
||||
# NVF is a Neovim configuration that provides a minimal setup with essential plugins and configurations.
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nvf.homeManagerModules.default
|
||||
./options.nix
|
||||
./languages.nix
|
||||
./picker.nix
|
||||
./snacks.nix
|
||||
./keymaps.nix
|
||||
./utils.nix
|
||||
./mini.nix
|
||||
imports = [inputs.nvf.homeManagerModules.default];
|
||||
|
||||
# Packages needed by snacks image preview
|
||||
home.packages = with pkgs; [
|
||||
imagemagick
|
||||
tree-sitter
|
||||
ghostscript
|
||||
tectonic
|
||||
mermaid-cli
|
||||
];
|
||||
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
imports = [
|
||||
./options.nix
|
||||
./languages.nix
|
||||
./picker.nix
|
||||
./snacks.nix
|
||||
./keymaps.nix
|
||||
./utils.nix
|
||||
./mini.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
nvimConfig = inputs.nvf.lib.neovimConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
./options.nix
|
||||
./languages.nix
|
||||
./picker.nix
|
||||
./snacks.nix
|
||||
./keymaps.nix
|
||||
./utils.nix
|
||||
./mini.nix
|
||||
];
|
||||
};
|
||||
in {
|
||||
packages.${system}.nvim = nvimConfig.neovim;
|
||||
|
||||
apps.${system}.nvim = {
|
||||
type = "app";
|
||||
program = "${nvimConfig.neovim}/bin/nvim";
|
||||
};
|
||||
defaultApp.${system} = {
|
||||
type = "app";
|
||||
program = "${nvimConfig.neovim}/bin/nvim";
|
||||
};
|
||||
|
||||
homeManagerModules.nvim = {imports = [./default.nix];};
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
programs.nvf.settings.vim = {
|
||||
vim = {
|
||||
globals.mapleader = " ";
|
||||
binds = {
|
||||
whichKey = {
|
||||
enable = true;
|
||||
# TODO: registers
|
||||
register = {};
|
||||
};
|
||||
};
|
||||
@@ -63,18 +62,18 @@
|
||||
}
|
||||
{
|
||||
key = "<MiddleMouse>";
|
||||
mode = ["n" "i" "v"]; # Normal, Insert, Visual
|
||||
action = "<nop>"; # No Operation
|
||||
silent = true;
|
||||
}
|
||||
{
|
||||
key = "<2-MiddleMouse>"; # Désactive aussi le double clic molette
|
||||
mode = ["n" "i" "v"];
|
||||
action = "<nop>";
|
||||
silent = true;
|
||||
}
|
||||
{
|
||||
key = "<3-MiddleMouse>"; # Désactive aussi le double clic molette
|
||||
key = "<2-MiddleMouse>";
|
||||
mode = ["n" "i" "v"];
|
||||
action = "<nop>";
|
||||
silent = true;
|
||||
}
|
||||
{
|
||||
key = "<3-MiddleMouse>";
|
||||
mode = ["n" "i" "v"];
|
||||
action = "<nop>";
|
||||
silent = true;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nvf.settings.vim = {
|
||||
vim = {
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
config = {
|
||||
@@ -26,7 +26,6 @@
|
||||
''
|
||||
function(diagnostic)
|
||||
return string.format("%s", diagnostic.message)
|
||||
--return string.format("%s (%s)", diagnostic.message, diagnostic.source)
|
||||
end
|
||||
'';
|
||||
};
|
||||
@@ -41,7 +40,7 @@
|
||||
context.enable = true;
|
||||
highlight.enable = true;
|
||||
grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
typescript # in language settings only tsx gets enabled, not typescript
|
||||
typescript
|
||||
];
|
||||
};
|
||||
lsp = {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
programs.nvf.settings.vim.mini = {
|
||||
vim.mini = {
|
||||
starter.enable = true;
|
||||
comment.enable = true;
|
||||
# cursorword.enable = true;
|
||||
icons.enable = true;
|
||||
indentscope.enable = true;
|
||||
notify.enable = true;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{lib, ...}: {
|
||||
programs.nvf.settings.vim = {
|
||||
vim = {
|
||||
viAlias = false;
|
||||
vimAlias = true;
|
||||
withNodeJs = true;
|
||||
# syntaxHighlighting = true;
|
||||
options = {
|
||||
autoindent = true;
|
||||
smartindent = true;
|
||||
@@ -19,8 +18,8 @@
|
||||
wrap = false;
|
||||
};
|
||||
globals = {
|
||||
navic_silence = true; # navic tries to attach multiple LSPs and fails
|
||||
suda_smart_edit = 1; # use super user write automatically
|
||||
navic_silence = true;
|
||||
suda_smart_edit = 1;
|
||||
neovide_scale_factor = 0.7;
|
||||
neovide_cursor_animation_length = 0.1;
|
||||
neovide_cursor_short_animation_length = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
programs.nvf.settings.vim = {
|
||||
vim = {
|
||||
utility = {
|
||||
oil-nvim.enable = true;
|
||||
snacks-nvim = {
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
imagemagick
|
||||
tree-sitter
|
||||
ghostscript
|
||||
tectonic
|
||||
mermaid-cli
|
||||
];
|
||||
programs.nvf.settings.vim.utility.snacks-nvim = {
|
||||
{
|
||||
vim.utility.snacks-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
image = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
programs.nvf.settings.vim = {
|
||||
vim = {
|
||||
undoFile.enable = true;
|
||||
utility = {
|
||||
motion.flash-nvim.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user