diff --git a/init.lua b/init.lua index 33a4ed5..90e718f 100644 --- a/init.lua +++ b/init.lua @@ -70,20 +70,18 @@ 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" - if obj.stdout == "dark\n" then - theme = "dark" - end - if obj.stdout == "light\n" then - theme = "light" - end - - opt.background = theme - vim.api.nvim_exec_autocmds("ColorScheme", {}) + local obj = vim.system({ 'darkman', 'get' }, { text = true }):wait() + if obj.code == 0 then + local theme = "light" + if obj.stdout == "dark\n" then + theme = "dark" end + if obj.stdout == "light\n" then + theme = "light" + end + + opt.background = theme + vim.api.nvim_exec_autocmds("ColorScheme", {}) end end diff --git a/snippets/nix.snippets b/snippets/nix.snippets index 198f9e7..5a37be1 100644 --- a/snippets/nix.snippets +++ b/snippets/nix.snippets @@ -33,7 +33,7 @@ snippet flake let pkgs = nixpkgs.legacyPackages.\${system}; in - rec { + { packages = rec { $1 = pkgs.stdenv.mkDerivation { name = "$1"; @@ -43,12 +43,6 @@ snippet flake }; default = $1; }; - devShells.default = { - inputsFrom = [ packages.default ]; - packages = with pkgs; [ - $3 - ]; - }; } ); } diff --git a/snippets/python.snippets b/snippets/python.snippets deleted file mode 100644 index 13c5f33..0000000 --- a/snippets/python.snippets +++ /dev/null @@ -1,2 +0,0 @@ -snippet exception Exception statement - Exception(f"$1")