Compare commits

..

No commits in common. "e4255f08179a6ea39b26488142246a5d3cfd8d6f" and "3c8c644ffd97a4010157bd324cfdf534947ce83e" have entirely different histories.

10 changed files with 102 additions and 166 deletions

135
flake.lock generated
View file

@ -9,11 +9,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717408969, "lastModified": 1713532798,
"narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "1ebbe68d57457c8cae98145410b164b5477761f4", "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,6 +36,22 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@ -44,11 +60,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719877454, "lastModified": 1715865404,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=", "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f", "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -57,6 +73,21 @@
"type": "github" "type": "github"
} }
}, },
"flake-root": {
"locked": {
"lastModified": 1713493429,
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
"owner": "srid",
"repo": "flake-root",
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -75,41 +106,11 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": {
"inputs": {
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1719259945,
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"git-hooks", "pre-commit-hooks",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -135,11 +136,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719827439, "lastModified": 1716457508,
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=", "narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d", "rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -156,11 +157,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719845423, "lastModified": 1716511055,
"narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=", "narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "ec12b88104d6c117871fad55e931addac4626756", "rev": "0bea8222f6e83247dd13b055d83e64bce02ee532",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -193,11 +194,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1720542800, "lastModified": 1716509168,
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "feb2849fdeb70028c70d73b848214b00d324a497", "rev": "bfb7a882678e518398ce9a31a881538679f6f092",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -212,20 +213,21 @@
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"git-hooks": "git-hooks", "flake-root": "flake-root",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks": "pre-commit-hooks",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1720864742, "lastModified": 1716759197,
"narHash": "sha256-NVkF91eZPav7zbcMR+7mUzOdMKgIEBJSwtFU2rv1OpY=", "narHash": "sha256-I4r9krPVUl1b70VbC8j8xDQ2mDBoGCx8tH9CExiJMd8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "195978e6272702ea5d6e9b837d083c411dc5d688", "rev": "ba293d36403c39c22dbb9a928f9af4d0df54b79f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -266,6 +268,33 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1716213921,
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nix-formatter-pack": "nix-formatter-pack", "nix-formatter-pack": "nix-formatter-pack",
@ -296,11 +325,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719887753, "lastModified": 1715940852,
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,16 +0,0 @@
{ icons, pkgs, ... }:
{
opts.enable = true;
extra = {
packages = [ pkgs.vimPlugins.arrow-nvim ];
config = ''
require('arrow').setup({
show_icons = true,
leader_key = ';', -- Recommended to be a single key
buffer_leader_key = 'm', -- Per Buffer Mappings
})
'';
};
}

View file

@ -7,19 +7,4 @@ _:
enable = true; enable = true;
settings.pre_hook = "require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook()"; settings.pre_hook = "require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook()";
}; };
keymaps = [
{
key = "<leader>/";
action = "<Plug>(comment_toggle_linewise_current)";
options.desc = "Toggle comment line";
mode = "n";
}
{
key = "<leader>/";
action = "<Plug>(comment_toggle_linewise_visual)";
options.desc = "Toggle comment line";
mode = "v";
}
];
} }

View file

@ -8,7 +8,7 @@
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/configs/guess-indent.lua # https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/configs/guess-indent.lua
config = '' config = ''
require("guess-indent").setup({}) require("guess-indent").setup({})
vim.cmd.lua { args = { "require('guess-indent').set_from_buffer()" }, mods = { silent = true } } vim.cmd.lua { args = { "require('guess-indent').set_from_buffer('auto_cmd')" }, mods = { silent = true } }
''; '';
}; };
} }

View file

@ -32,26 +32,7 @@
action = "code_action"; action = "code_action";
desc = "LSP code action"; desc = "LSP code action";
}; };
"<leader>lr" = {
action = "rename";
desc = "Rename current symbol";
};
"<leader>lR" = {
action = "rename";
desc = "Search references";
};
"<leader>lh" = {
action = "signature_help";
desc = "Signature help";
};
"<leader>lG" = {
action = "workspace_symbol";
desc = "Search workspace symbols";
};
"gK" = {
action = "signature_help";
desc = "Signature help";
};
gd = { gd = {
action = "definition"; action = "definition";
desc = "Go to definition"; desc = "Go to definition";
@ -99,25 +80,25 @@
# Load all servers definitions # Load all servers definitions
servers = { servers = {
ansiblels.enable = true;
bashls.enable = true; bashls.enable = true;
cssls.enable = true; cssls.enable = true;
docker-compose-language-service.enable = true; docker-compose-language-service.enable = true;
dockerls.enable = true; dockerls.enable = true;
eslint.enable = true;
gopls.enable = true;
helm-ls.enable = true; helm-ls.enable = true;
html.enable = true; html.enable = true;
java-language-server.enable = true;
jsonls.enable = true; jsonls.enable = true;
lua-ls.enable = true; lua-ls.enable = true;
nginx-language-server.enable = true; nginx-language-server.enable = true;
nixd.enable = true; nixd.enable = true;
pyright.enable = true; pyright.enable = true;
sqls.enable = true;
terraformls.enable = true;
tsserver.enable = true;
yamlls.enable = true; yamlls.enable = true;
clangd.enable = true;
marksman.enable = true;
texlab.enable = true;
java-language-server.enable = false;
zls.enable = false;
rust-analyzer.enable = false;
typos-lsp = { typos-lsp = {
enable = true; enable = true;

View file

@ -1,9 +1,3 @@
_:{ _:{
opts = { opts.enable = true;
enable = true;
fromLua = [
{ paths = "~/.config/snippets/"; }
];
};
} }

View file

@ -1,18 +1,3 @@
_: { _: {
opts.enable = true; opts.enable = true;
keymaps = [
{
key = "<leader>O";
action = "function() require('oil').toggle_float() end";
options.desc = "Toggle oil floating window";
mode = "n";
}
{
key = "<leader>to";
action = "function() require('oil').toggle_float() end";
options.desc = "Toggle oil floating window";
mode = "n";
}
];
} }

View file

@ -1,3 +0,0 @@
_:{
opts.enable = true;
}

View file

@ -36,15 +36,15 @@
# │ └────────────────────────────────────────┘ │ # │ └────────────────────────────────────────┘ │
# └──────────────────────────────────────────────────┘ # └──────────────────────────────────────────────────┘
extraConfigLuaPre = '' extraConfigLuaPre = ''
local telescopeWithArgs = function(fn, args, extension) local TelescopeWithTheme = function(fn, args, extension)
args.layout_config = { args.layout_config = {
anchor = "N", anchor = "N",
mirror = true, mirror = true,
width = 0.8, width = 0.8,
} }
if fn == "keymaps" or fn == "registers" then args.layout_config.height = function(_, _, max_lines) return max_lines end end if fn == "keymaps" or fn == "registers" then args.layout_config.height = function(_, _, max_lines) return max_lines end end
local args_with_theme = require("telescope.themes").get_dropdown(args) local args_with_theme = require("telescope.themes").get_dropdown(args)
if extension ~= "" then if extension ~= "" then
@ -55,7 +55,7 @@
end end
''; '';
# Use root keymaps to allow usage of custom telescopeWithArgs function # Use root keymaps to allow usage of custom TelescopeWithTheme function
keymaps = keymaps =
let let
mkTelescopeKeymap = mkTelescopeKeymap =
@ -68,7 +68,7 @@
}: { }: {
inherit key mode; inherit key mode;
action.__raw = "function() telescopeWithArgs('${fn}', ${helpers.toLuaObject args}, '${builtins.toString extension}') end"; action.__raw = "function() TelescopeWithTheme('${fn}', ${helpers.toLuaObject args}, '${builtins.toString extension}') end";
options = { inherit desc; }; options = { inherit desc; };
}; };
in in
@ -108,7 +108,7 @@
fn = "live_grep"; fn = "live_grep";
} }
{ {
desc = "Find help"; desc = "Find help tags";
key = "<leader>fh"; key = "<leader>fh";
fn = "help_tags"; fn = "help_tags";
} }
@ -129,33 +129,14 @@
} }
{ {
desc = "Find word under cursor"; desc = "Find word under cursor";
key = "<leader>f*"; key = "<leader>fw";
fn = "grep_string"; fn = "grep_string";
} }
{ {
desc = "Search references"; desc = "Search references";
key = "<leader>lR"; key = "gr";
fn = "lsp_references"; fn = "lsp_references";
} }
{
desc = "Find marks";
key = "<leader>f'";
fn = "marks";
}
{
desc = "Find commands";
key = "<leader>fC";
fn = "commands";
}
{
desc = "Find themes";
key = "<leader>ft";
fn = "colortheme";
args = {
enable_preview = true;
ignore_builtins = true;
};
}
]; ];
}; };
} }

View file

@ -8,12 +8,12 @@
enable = true; enable = true;
# Enable treesitter based indentation (use '=' to auto-indent) # Enable treesitter based indentation (use '=' to auto-indent)
settings.indent.enable = true; indent = true;
# Workaround to enable incremental selection without setting default keymaps (keymaps are set globally) # Workaround to enable incremental selection without setting default keymaps (keymaps are set globally)
# This is needed in order to set custom descriptions and avoid to have multiple keymaps # This is needed in order to set custom descriptions and avoid to have multiple keymaps
# See https://github.com/nix-community/nixvim/issues/1506 # See https://github.com/nix-community/nixvim/issues/1506
settings.incremental_selection = { moduleConfig.incremental_selection = {
enable = true; enable = true;
keymaps = lib.mkForce { }; keymaps = lib.mkForce { };
}; };