mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
nvim: use blink-pairs
This commit is contained in:
parent
5c189f5c0f
commit
bddc75a08b
6 changed files with 112 additions and 49 deletions
|
|
@ -15,7 +15,7 @@ return {
|
|||
},
|
||||
{ import = "plugins.mod.img-clip" },
|
||||
{ import = "plugins.mod.mc" }, -- Multiple-cursors
|
||||
{ import = "plugins.mod.autopairs" },
|
||||
{ import = "plugins.mod.blink-pairs" },
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
local npairs = require("nvim-autopairs")
|
||||
local Rule = require("nvim-autopairs.rule")
|
||||
|
||||
npairs.setup()
|
||||
npairs.add_rule(Rule("$", "$", "markdown"))
|
||||
npairs.add_rule(Rule("\\(", "\\)", "tex"))
|
||||
npairs.add_rule(Rule("\\[", "\\]", "tex"))
|
||||
|
||||
npairs.add_rules({
|
||||
Rule("%(", "%)", "cmd"):with_pair(function(opts)
|
||||
if vim.fn.getcmdtype() == ":" then
|
||||
return true
|
||||
end
|
||||
end),
|
||||
})
|
||||
end,
|
||||
}
|
||||
39
home/dot_config/nvim/lua/plugins/mod/blink-pairs.lua
Normal file
39
home/dot_config/nvim/lua/plugins/mod/blink-pairs.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
"saghen/blink.pairs",
|
||||
version = "*", -- use prebuilt version
|
||||
event = "BufEnter",
|
||||
|
||||
-- download binary
|
||||
dependencies = "saghen/blink.download",
|
||||
|
||||
--- @module 'blink.pairs'
|
||||
--- @type blink.pairs.Config
|
||||
opts = {
|
||||
mappings = {
|
||||
enabled = true,
|
||||
cmdline = true,
|
||||
disabled_filetypes = {},
|
||||
-- https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#24
|
||||
-- Battery included!
|
||||
pairs = {},
|
||||
},
|
||||
highlights = {
|
||||
enabled = true,
|
||||
cmdline = true,
|
||||
groups = {
|
||||
"BlinkPairsOrange",
|
||||
"BlinkPairsPurple",
|
||||
"BlinkPairsBlue",
|
||||
},
|
||||
unmatched_group = "BlinkPairsUnmatched",
|
||||
|
||||
matchparen = {
|
||||
enabled = true,
|
||||
cmdline = false,
|
||||
include_surrounding = false,
|
||||
group = "BlinkPairsMatchParen",
|
||||
priority = 250,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
Default = "DuckDuckGo";
|
||||
Add = [
|
||||
{
|
||||
Alias = "@np";
|
||||
Alias = "np";
|
||||
Description = "Search in NixOS Packages";
|
||||
IconURL = "https://nixos.org/favicon.ico";
|
||||
Method = "GET";
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
URLTemplate = "https://search.nixos.org/packages?from=0&size=200&sort=relevance&type=packages&query={searchTerms}";
|
||||
}
|
||||
{
|
||||
Alias = "@no";
|
||||
Alias = "no";
|
||||
Description = "Search in NixOS Options";
|
||||
IconURL = "https://nixos.org/favicon.ico";
|
||||
Method = "GET";
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
URLTemplate = "https://search.nixos.org/options?from=0&size=200&sort=relevance&type=packages&query={searchTerms}";
|
||||
}
|
||||
{
|
||||
Alias = "@hm";
|
||||
Alias = "hm";
|
||||
Description = "Search in Home Manager Options";
|
||||
IconURL = "https://nixos.org/favicon.ico";
|
||||
Method = "GET";
|
||||
|
|
|
|||
|
|
@ -23,4 +23,17 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.desktopEntries."firefox-private" = {
|
||||
name = "Firefox Private Window";
|
||||
genericName = "Web Browser";
|
||||
icon = "firefox-nightly";
|
||||
type = "Application";
|
||||
terminal = false;
|
||||
categories = [
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
exec = "firefox --private-window %U";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,79 +4,111 @@
|
|||
programs.firefox.profiles.default.search.engines = {
|
||||
alternativeto = {
|
||||
name = "AlternativeTo";
|
||||
urls = [
|
||||
{template = "https://alternativeto.net/browse/search/?q={searchTerms}";}
|
||||
];
|
||||
urls = [{template = "https://alternativeto.net/browse/search/?q={searchTerms}";}];
|
||||
icon = "https://alternativeto.net/favicon.ico";
|
||||
definedAliases = ["@a2"];
|
||||
definedAliases = ["a2"];
|
||||
};
|
||||
archwiki = {
|
||||
name = "ArchWiki";
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.archlinux.org/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}];
|
||||
icon = "https://archlinux.org/favicon.ico";
|
||||
definedAliases = ["@aw"];
|
||||
definedAliases = ["aw"];
|
||||
};
|
||||
aur = {
|
||||
name = "Arch User Repository";
|
||||
urls = [
|
||||
{
|
||||
template = "https://aur.archlinux.org/?K={searchTerms}";
|
||||
}
|
||||
];
|
||||
urls = [{template = "https://aur.archlinux.org/packages?K={searchTerms}";}];
|
||||
icon = "https://archlinux.org/favicon.ico";
|
||||
definedAliases = ["@aur"];
|
||||
definedAliases = ["aur" "yay" "paru"];
|
||||
};
|
||||
arch-packages = {
|
||||
name = "ArchLinux Packages";
|
||||
urls = [{template = "https://archlinux.org/packages/?q={searchTerms}";}];
|
||||
icon = "https://archlinux.org/favicon.ico";
|
||||
definedAliases = ["@pac"];
|
||||
definedAliases = ["pac" "pacman"];
|
||||
};
|
||||
chatgpt = {
|
||||
name = "ChatGPT";
|
||||
urls = [{template = "https://chatgpt.com/?q={searchTerms}";}];
|
||||
icon = "https://chatgpt.com/favicon.ico";
|
||||
definedAliases = ["@gpt"];
|
||||
definedAliases = ["gpt" "chatgpt"];
|
||||
};
|
||||
scoop = {
|
||||
name = "scoop";
|
||||
urls = [{template = "https://scoop.sh/#/apps?q={searchTerms}";}];
|
||||
icon = "https://scoop.sh/favicon.ico";
|
||||
definedAliases = ["@sc"];
|
||||
definedAliases = ["sc" "scoop"];
|
||||
};
|
||||
perplexity = {
|
||||
name = "Perplexity";
|
||||
urls = [{template = "https://www.perplexity.ai/?q={searchTerms}";}];
|
||||
icon = "https://perplexity.ai/favicon.ico";
|
||||
definedAliases = ["@pplx"];
|
||||
definedAliases = ["pplx"];
|
||||
};
|
||||
pypi = {
|
||||
name = "PyPi";
|
||||
urls = [{template = "https://pypi.org/search/?q={searchTerms}";}];
|
||||
icon = "https://pypi.org/favicon.ico";
|
||||
definedAliases = ["@py"];
|
||||
definedAliases = ["py" "pypi"];
|
||||
};
|
||||
winget = {
|
||||
name = "Windows Package Manager";
|
||||
urls = [{template = "https://winget.ragerworks.com/search/all/{searchTerms}";}];
|
||||
icon = "https://microsoft.com/favicon.ico";
|
||||
definedAliases = ["@win"];
|
||||
definedAliases = ["win" "winget"];
|
||||
};
|
||||
github = {
|
||||
name = "GitHub Repository";
|
||||
urls = [{template = "https://github.com/search?type=repositories&q={searchTerms}";}];
|
||||
icon = "https://github.com/favicon.ico";
|
||||
definedAliases = ["@gh"];
|
||||
definedAliases = ["gh" "ghr" "github"];
|
||||
};
|
||||
repology = {
|
||||
name = "Repology";
|
||||
urls = [{template = "https://repology.org/projects/?search={searchTerms}";}];
|
||||
icon = "https://repology.org/favicon.ico";
|
||||
definedAliases = ["@repo"];
|
||||
definedAliases = ["repo" "repology"];
|
||||
};
|
||||
claude = {
|
||||
name = "Claude";
|
||||
urls = [{template = "https://claude.ai/?q={searchTerms}";}];
|
||||
icon = "https://claude.ai/favicon.ico";
|
||||
definedAliases = ["cl" "claude"];
|
||||
};
|
||||
grok = {
|
||||
name = "Grok";
|
||||
urls = [{template = "https://grok.com/?q={searchTerms}";}];
|
||||
icon = "https://grok.com/favicon.ico";
|
||||
definedAliases = ["grok"];
|
||||
};
|
||||
fedora-package = {
|
||||
name = "Fedora Packages";
|
||||
urls = [{template = "https://packages.fedoraproject.org/search?query={searchTerms}";}];
|
||||
icon = "https://fedoraproject.org/favicon.ico";
|
||||
definedAliases = ["dnf"];
|
||||
};
|
||||
youtube = {
|
||||
name = "Youtube";
|
||||
urls = [{template = "https://www.youtube.com/results?search_query={searchTerms}";}];
|
||||
icon = "https://youtube.com/favicon.ico";
|
||||
definedAliases = ["yt" "youtube"];
|
||||
};
|
||||
nixpkgs = {
|
||||
name = "Nix Packages";
|
||||
urls = [{template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";}];
|
||||
icon = "https://nixos.org/favicon.ico";
|
||||
definedAliases = ["np" "nixpkg"];
|
||||
};
|
||||
nixopts = {
|
||||
name = "Nix Options";
|
||||
urls = [{template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";}];
|
||||
icon = "https://nixos.org/favicon.ico";
|
||||
definedAliases = ["no" "nixopt"];
|
||||
};
|
||||
home-manager = {
|
||||
name = "Home Manager Options";
|
||||
urls = [{template = "https://home-manager-options.extranix.com/?query={searchTerms}";}];
|
||||
icon = "https://nixos.org/favicon.ico";
|
||||
definedAliases = ["hm"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue