Compare commits

...

3 commits

Author SHA1 Message Date
Antoine Vaure
5f0a2ff631 add devShell to flake template snippet 2025-10-10 14:53:10 +02:00
Antoine Vaure
5fbfe594d9 run darkman specific code only if darkman is available 2025-10-10 14:50:44 +02:00
Antoine Vaure
f65569dc50 add snippet for python 2025-10-08 14:31:08 +02:00
3 changed files with 22 additions and 12 deletions

View file

@ -70,6 +70,7 @@ end
vim.cmd.colorscheme "catppuccin"
function set_theme_according_to_darkman()
if vim.fn.executable("darkman") == 1 then
local obj = vim.system({ 'darkman', 'get' }, { text = true }):wait()
if obj.code == 0 then
local theme = "light"
@ -83,6 +84,7 @@ function set_theme_according_to_darkman()
opt.background = theme
vim.api.nvim_exec_autocmds("ColorScheme", {})
end
end
end
set_theme_according_to_darkman()

View file

@ -33,7 +33,7 @@ snippet flake
let
pkgs = nixpkgs.legacyPackages.\${system};
in
{
rec {
packages = rec {
$1 = pkgs.stdenv.mkDerivation {
name = "$1";
@ -43,6 +43,12 @@ snippet flake
};
default = $1;
};
devShells.default = {
inputsFrom = [ packages.default ];
packages = with pkgs; [
$3
];
};
}
);
}

2
snippets/python.snippets Normal file
View file

@ -0,0 +1,2 @@
snippet exception Exception statement
Exception(f"$1")