From 6828a6373e56172e8b328b4ec56898e7bf34a7b3 Mon Sep 17 00:00:00 2001 From: jwy Date: Wed, 30 Oct 2024 02:36:04 -0400 Subject: [PATCH] Fixed neovim trouble plugin Changed default search engine for firefox --- nix-config/home/firefox.nix | 38 +++++++++++++++++++-------- nix-config/home/nvim/keymaps.lua | 1 + nix-config/home/nvim/plugins/misc.lua | 2 ++ 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/nix-config/home/firefox.nix b/nix-config/home/firefox.nix index a0c671889..f8e5091c7 100644 --- a/nix-config/home/firefox.nix +++ b/nix-config/home/firefox.nix @@ -1,4 +1,9 @@ -{ pkgs, config, inputs, ... }: +{ + pkgs, + config, + inputs, + ... +}: { programs.firefox = { @@ -29,27 +34,38 @@ search = { force = true; default = "Searx"; - order = [ "Searx" "Google" ]; + order = [ + "Searx" + "Google" + ]; engines = { "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { name = "type"; value = "packages"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@np" ]; }; "NixOS Wiki" = { - urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }]; + urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}"; } ]; iconUpdateURL = "https://nixos.wiki/favicon.png"; updateInterval = 24 * 60 * 60 * 1000; # every day definedAliases = [ "@nw" ]; }; "Searx" = { - urls = [{ template = "https://searx.work/?q={searchTerms}"; }]; + urls = [ { template = "https://baresearch.org/?q={searchTerms}"; } ]; iconUpdateURL = "https://nixos.wiki/favicon.png"; updateInterval = 24 * 60 * 60 * 1000; # every day definedAliases = [ "@searx" ]; diff --git a/nix-config/home/nvim/keymaps.lua b/nix-config/home/nvim/keymaps.lua index fed00b4ce..e26c89d62 100644 --- a/nix-config/home/nvim/keymaps.lua +++ b/nix-config/home/nvim/keymaps.lua @@ -13,3 +13,4 @@ vim.keymap.set("n", "", "bnext", { desc = "go to next buffer" }) vim.keymap.set("n", "fd", function() MiniFiles.open() end, { desc = "open mini.files (filetree)" }) +vim.keymap.set("n", "xx", "Trouble diagnostics toggle", { desc = "Diagnostics (Trouble)" }) diff --git a/nix-config/home/nvim/plugins/misc.lua b/nix-config/home/nvim/plugins/misc.lua index beb76adb1..74f2d3da5 100644 --- a/nix-config/home/nvim/plugins/misc.lua +++ b/nix-config/home/nvim/plugins/misc.lua @@ -44,3 +44,5 @@ require("nvim-treesitter.configs").setup({ highlight = { enable = true }, indent = { enable = true }, }) + +require("trouble").setup()