Move more neovim plugins to nix
This commit is contained in:
parent
40e0a096e8
commit
85ebcee9ba
107
flake.lock
107
flake.lock
|
@ -1413,7 +1413,7 @@
|
||||||
},
|
},
|
||||||
"home-manager_4": {
|
"home-manager_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_8"
|
"nixpkgs": "nixpkgs_9"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700392168,
|
"lastModified": 1700392168,
|
||||||
|
@ -1583,6 +1583,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"korora": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_4"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1702807380,
|
||||||
|
"narHash": "sha256-ifI0zueeh8dKZeTWgqOYTedICWeqUjgDnI5ntsAWMDk=",
|
||||||
|
"owner": "adisbladis",
|
||||||
|
"repo": "korora",
|
||||||
|
"rev": "3c3e941f596a20c87068640376f07590451507f9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "adisbladis",
|
||||||
|
"repo": "korora",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"lib-aggregate": {
|
"lib-aggregate": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_6",
|
"flake-utils": "flake-utils_6",
|
||||||
|
@ -1837,7 +1855,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_6",
|
"flake-parts": "flake-parts_6",
|
||||||
"nix-github-actions": "nix-github-actions",
|
"nix-github-actions": "nix-github-actions",
|
||||||
"nixpkgs": "nixpkgs_7",
|
"nixpkgs": "nixpkgs_8",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1899,7 +1917,7 @@
|
||||||
"nixd": {
|
"nixd": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_5",
|
"flake-parts": "flake-parts_5",
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695137077,
|
"lastModified": 1695137077,
|
||||||
|
@ -2134,6 +2152,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_10": {
|
"nixpkgs_10": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700403855,
|
||||||
|
"narHash": "sha256-Q0Uzjik9kUTN9pd/kp52XJi5kletBhy29ctBlAG+III=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "0c5678df521e1407884205fe3ce3cf1d7df297db",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_11": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685865905,
|
"lastModified": 1685865905,
|
||||||
"narHash": "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=",
|
"narHash": "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=",
|
||||||
|
@ -2149,7 +2183,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_11": {
|
"nixpkgs_12": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685866647,
|
"lastModified": 1685866647,
|
||||||
"narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=",
|
"narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=",
|
||||||
|
@ -2165,7 +2199,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_12": {
|
"nixpkgs_13": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689261696,
|
"lastModified": 1689261696,
|
||||||
"narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=",
|
"narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=",
|
||||||
|
@ -2181,7 +2215,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_13": {
|
"nixpkgs_14": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685865905,
|
"lastModified": 1685865905,
|
||||||
"narHash": "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=",
|
"narHash": "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=",
|
||||||
|
@ -2197,7 +2231,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_14": {
|
"nixpkgs_15": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685866647,
|
"lastModified": 1685866647,
|
||||||
"narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=",
|
"narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=",
|
||||||
|
@ -2213,7 +2247,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_15": {
|
"nixpkgs_16": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689261696,
|
"lastModified": 1689261696,
|
||||||
"narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=",
|
"narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=",
|
||||||
|
@ -2262,6 +2296,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1702272962,
|
||||||
|
"narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681358109,
|
"lastModified": 1681358109,
|
||||||
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
|
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
|
||||||
|
@ -2277,7 +2325,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_6": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686398752,
|
"lastModified": 1686398752,
|
||||||
"narHash": "sha256-nGWNQVhSw4VSL+S0D0cbrNR9vs9Bq7rlYR+1K5f5j6w=",
|
"narHash": "sha256-nGWNQVhSw4VSL+S0D0cbrNR9vs9Bq7rlYR+1K5f5j6w=",
|
||||||
|
@ -2293,7 +2341,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_6": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701952659,
|
"lastModified": 1701952659,
|
||||||
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
|
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
|
||||||
|
@ -2309,7 +2357,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_8": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701847270,
|
"lastModified": 1701847270,
|
||||||
"narHash": "sha256-ttPWHy1NZwJzSzY7OmofFNyrm9kWc+RFFHpJGeQ4kWw=",
|
"narHash": "sha256-ttPWHy1NZwJzSzY7OmofFNyrm9kWc+RFFHpJGeQ4kWw=",
|
||||||
|
@ -2325,7 +2373,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_8": {
|
"nixpkgs_9": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687466461,
|
"lastModified": 1687466461,
|
||||||
"narHash": "sha256-oupXI7g7RPzlpGUfAu1xG4KBK53GrZH8/xeKgKDB4+Q=",
|
"narHash": "sha256-oupXI7g7RPzlpGUfAu1xG4KBK53GrZH8/xeKgKDB4+Q=",
|
||||||
|
@ -2341,22 +2389,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1700403855,
|
|
||||||
"narHash": "sha256-Q0Uzjik9kUTN9pd/kp52XJi5kletBhy29ctBlAG+III=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "0c5678df521e1407884205fe3ce3cf1d7df297db",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-23.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1702130780,
|
"lastModified": 1702130780,
|
||||||
|
@ -2391,7 +2423,7 @@
|
||||||
"openapi-code-generator_2": {
|
"openapi-code-generator_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"autodocodec": "autodocodec_3",
|
"autodocodec": "autodocodec_3",
|
||||||
"nixpkgs": "nixpkgs_10",
|
"nixpkgs": "nixpkgs_11",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_2",
|
"pre-commit-hooks": "pre-commit-hooks_2",
|
||||||
"safe-coloured-text": "safe-coloured-text_2",
|
"safe-coloured-text": "safe-coloured-text_2",
|
||||||
"sydtest": "sydtest_2",
|
"sydtest": "sydtest_2",
|
||||||
|
@ -2414,7 +2446,7 @@
|
||||||
"openapi-code-generator_3": {
|
"openapi-code-generator_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"autodocodec": "autodocodec_5",
|
"autodocodec": "autodocodec_5",
|
||||||
"nixpkgs": "nixpkgs_13",
|
"nixpkgs": "nixpkgs_14",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_4",
|
"pre-commit-hooks": "pre-commit-hooks_4",
|
||||||
"safe-coloured-text": "safe-coloured-text_4",
|
"safe-coloured-text": "safe-coloured-text_4",
|
||||||
"sydtest": "sydtest_4",
|
"sydtest": "sydtest_4",
|
||||||
|
@ -2461,7 +2493,7 @@
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_4",
|
||||||
"flake-utils": "flake-utils_7",
|
"flake-utils": "flake-utils_7",
|
||||||
"gitignore": "gitignore_2",
|
"gitignore": "gitignore_2",
|
||||||
"nixpkgs": "nixpkgs_11",
|
"nixpkgs": "nixpkgs_12",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_3"
|
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2483,7 +2515,7 @@
|
||||||
"flake-compat": "flake-compat_5",
|
"flake-compat": "flake-compat_5",
|
||||||
"flake-utils": "flake-utils_8",
|
"flake-utils": "flake-utils_8",
|
||||||
"gitignore": "gitignore_3",
|
"gitignore": "gitignore_3",
|
||||||
"nixpkgs": "nixpkgs_12",
|
"nixpkgs": "nixpkgs_13",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_4"
|
"nixpkgs-stable": "nixpkgs-stable_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2505,7 +2537,7 @@
|
||||||
"flake-compat": "flake-compat_7",
|
"flake-compat": "flake-compat_7",
|
||||||
"flake-utils": "flake-utils_10",
|
"flake-utils": "flake-utils_10",
|
||||||
"gitignore": "gitignore_4",
|
"gitignore": "gitignore_4",
|
||||||
"nixpkgs": "nixpkgs_14",
|
"nixpkgs": "nixpkgs_15",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_5"
|
"nixpkgs-stable": "nixpkgs-stable_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2527,7 +2559,7 @@
|
||||||
"flake-compat": "flake-compat_8",
|
"flake-compat": "flake-compat_8",
|
||||||
"flake-utils": "flake-utils_11",
|
"flake-utils": "flake-utils_11",
|
||||||
"gitignore": "gitignore_5",
|
"gitignore": "gitignore_5",
|
||||||
"nixpkgs": "nixpkgs_15",
|
"nixpkgs": "nixpkgs_16",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_6"
|
"nixpkgs-stable": "nixpkgs-stable_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2575,12 +2607,13 @@
|
||||||
"hyprland-contrib": "hyprland-contrib",
|
"hyprland-contrib": "hyprland-contrib",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"intray": "intray",
|
"intray": "intray",
|
||||||
|
"korora": "korora",
|
||||||
"matui": "matui",
|
"matui": "matui",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nixd": "nixd",
|
"nixd": "nixd",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_7",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
|
@ -2613,7 +2646,7 @@
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_4",
|
"flake-utils": "flake-utils_4",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694571081,
|
"lastModified": 1694571081,
|
||||||
|
@ -2823,7 +2856,7 @@
|
||||||
"linkcheck": "linkcheck_2",
|
"linkcheck": "linkcheck_2",
|
||||||
"looper": "looper",
|
"looper": "looper",
|
||||||
"mergeful": "mergeful",
|
"mergeful": "mergeful",
|
||||||
"nixpkgs": "nixpkgs_9",
|
"nixpkgs": "nixpkgs_10",
|
||||||
"openapi-code-generator": "openapi-code-generator_2",
|
"openapi-code-generator": "openapi-code-generator_2",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_3",
|
"pre-commit-hooks": "pre-commit-hooks_3",
|
||||||
"safe-coloured-text": "safe-coloured-text_3",
|
"safe-coloured-text": "safe-coloured-text_3",
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
nix-index-database.url = "github:Mic92/nix-index-database";
|
nix-index-database.url = "github:Mic92/nix-index-database";
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
korora.url = "github:adisbladis/korora";
|
||||||
|
|
||||||
# Nix language server
|
# Nix language server
|
||||||
# [the docs](https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#installation)
|
# [the docs](https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#installation)
|
||||||
# tell me not to override the nixpkgs input.
|
# tell me not to override the nixpkgs input.
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
xdg.configFile."wezterm/nix".source =
|
xdg.configFile."wezterm/nix".source =
|
||||||
config.satellite.lib.lua.writeFile
|
config.satellite.lib.lua.writeFile
|
||||||
"." "colorscheme"
|
"." "colorscheme"
|
||||||
config.satellite.colorscheme.lua;
|
"return ${config.satellite.colorscheme.lua}";
|
||||||
xdg.configFile."wezterm/wezterm.lua".source =
|
xdg.configFile."wezterm/wezterm.lua".source =
|
||||||
config.satellite.dev.path "home/features/desktop/wezterm/wezterm.lua";
|
config.satellite.dev.path "home/features/desktop/wezterm/wezterm.lua";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
-- Use _<leader>lg_ to fetchgit stuff
|
-- Use _<leader>lg_ to fetchgit stuff
|
||||||
vim.keymap.set("n", "<leader>lg", function()
|
vim.keymap.set("n", "<leader>lg", function()
|
||||||
require("my.helpers").saveCursor(function()
|
require("my.tempest").withSavedCursor(function()
|
||||||
vim.cmd(":%!update-nix-fetchgit")
|
vim.cmd(":%!update-nix-fetchgit")
|
||||||
end)
|
end)
|
||||||
end, { buffer = true, desc = "Update all fetchgit calls" })
|
end, { buffer = true, desc = "Update all fetchgit calls" })
|
||||||
|
|
|
@ -3,36 +3,37 @@
|
||||||
"alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" },
|
"alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" },
|
||||||
"catppuccin": { "branch": "main", "commit": "079500a625f3ae5aa6efb758f1a17fe4c7a57e52" },
|
"catppuccin": { "branch": "main", "commit": "079500a625f3ae5aa6efb758f1a17fe4c7a57e52" },
|
||||||
"clipboard-image": { "branch": "main", "commit": "485de5493d196154db30f85665f8ac480ce116a2" },
|
"clipboard-image": { "branch": "main", "commit": "485de5493d196154db30f85665f8ac480ce116a2" },
|
||||||
|
"cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||||
|
"cmp-digraphs": { "branch": "master", "commit": "5efc1f0078d7c5f3ea1c8e3aad04da3fd6e081a9" },
|
||||||
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"conform": { "branch": "master", "commit": "48bc9996ebfe90e7766f46338360f75fd6ecb174" },
|
"conform": { "branch": "master", "commit": "48bc9996ebfe90e7766f46338360f75fd6ecb174" },
|
||||||
"crates": { "branch": "main", "commit": "b8ea20fda2e1029fbbb1bae7a9eab35c84037ca0" },
|
"crates": { "branch": "main", "commit": "b8ea20fda2e1029fbbb1bae7a9eab35c84037ca0" },
|
||||||
"dhall-vim": { "branch": "master", "commit": "68500ef46ff3706f46c99db3be7a0c8abcf6a3ae" },
|
|
||||||
"discord-rich-presence": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
"discord-rich-presence": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
"edit-code-block": { "branch": "main", "commit": "5e4e31012eafa113216cb5894f696682833f8e7f" },
|
"edit-code-block": { "branch": "main", "commit": "5e4e31012eafa113216cb5894f696682833f8e7f" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
"fidget": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
||||||
"flash": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
|
"flash": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
|
||||||
"ftft": { "branch": "master", "commit": "09a72f9adf8ee7c824c517ef8408c9e687453039" },
|
"ftft": { "branch": "master", "commit": "09a72f9adf8ee7c824c517ef8408c9e687453039" },
|
||||||
"github-actions-yaml.vim": { "branch": "master", "commit": "f2f16243447cea174daa6b4a9ffd3ff9213814ef" },
|
"github-actions": { "branch": "master", "commit": "f2f16243447cea174daa6b4a9ffd3ff9213814ef" },
|
||||||
"gitlinker": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" },
|
"gitlinker": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "87640f5a877b18bdd49884dbcac220fed924b867" },
|
"gitsigns": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
|
||||||
"harpoon": { "branch": "master", "commit": "867e212ac153e793f95b316d1731f3ca1894625e" },
|
"harpoon": { "branch": "master", "commit": "867e212ac153e793f95b316d1731f3ca1894625e" },
|
||||||
"haskell-tools": { "branch": "master", "commit": "92e097c6832405fb64e4c44a7ce8bebe7836cae6" },
|
"haskell-tools": { "branch": "master", "commit": "92e097c6832405fb64e4c44a7ce8bebe7836cae6" },
|
||||||
"hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" },
|
"hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" },
|
||||||
"hyprland-vim-syntax": { "branch": "main", "commit": "8488a24b50882da969979103b4d668c70e7995b9" },
|
"hyprland": { "branch": "main", "commit": "be665459a21730a6acdfaa9c6352cda5e4763af6" },
|
||||||
"idris": { "branch": "main", "commit": "8bff02984a33264437e70fd9fff4359679d910da" },
|
"idris": { "branch": "main", "commit": "8bff02984a33264437e70fd9fff4359679d910da" },
|
||||||
"inc-rename.nvim": { "branch": "main", "commit": "a48c7cec5c4f00d7438dce5fadb55f4d715ef9f2" },
|
"inc-rename.nvim": { "branch": "main", "commit": "a48c7cec5c4f00d7438dce5fadb55f4d715ef9f2" },
|
||||||
"indent-blankline": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" },
|
"indent-blankline": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" },
|
||||||
"kmonad-vim": { "branch": "master", "commit": "37978445197ab00edeb5b731e9ca90c2b141723f" },
|
|
||||||
"kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" },
|
|
||||||
"lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
|
"lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||||
"lean": { "branch": "main", "commit": "a5daac8ebccb93af25ace2a2041b503f18ff3dcb" },
|
"lean": { "branch": "main", "commit": "a5daac8ebccb93af25ace2a2041b503f18ff3dcb" },
|
||||||
|
"live-command": { "branch": "main", "commit": "d460067d47948725a6f25b20f31ea8bbfdfe4622" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
||||||
|
"luasnip": { "branch": "master", "commit": "118263867197a111717b5f13d954cd1ab8124387" },
|
||||||
"mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" },
|
"mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" },
|
||||||
"mini.files": { "branch": "main", "commit": "173d73f5d0b2a9abbb2d6533a3770fdbbd0c4dcc" },
|
"mini.files": { "branch": "main", "commit": "173d73f5d0b2a9abbb2d6533a3770fdbbd0c4dcc" },
|
||||||
"mini.operators": { "branch": "main", "commit": "7a97e2528a4c274e9da8953d3ba22f493c360a9f" },
|
"mini.operators": { "branch": "main", "commit": "7a97e2528a4c274e9da8953d3ba22f493c360a9f" },
|
||||||
|
@ -44,32 +45,28 @@
|
||||||
"neogit": { "branch": "master", "commit": "761e9be2aa7cc4c8ca87f10c8c37108a687b928e" },
|
"neogit": { "branch": "master", "commit": "761e9be2aa7cc4c8ca87f10c8c37108a687b928e" },
|
||||||
"nui": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
"nui": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
"nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
||||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
"null-ls": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
|
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" },
|
"nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" },
|
||||||
"nvim-tree": { "branch": "master", "commit": "7d1760f892951dd6a118dae1d7a1d8df5f029edf" },
|
"nvim-tree": { "branch": "master", "commit": "7d1760f892951dd6a118dae1d7a1d8df5f029edf" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "180e1ca385442e35e1d18420221a148c5e045671" },
|
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "cfa8ee19ac9bae9b7fb2958eabe2b45b70c56ccb" },
|
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
||||||
"nvim_context_vt": { "branch": "master", "commit": "a14f9292b4bd68ceed433fc513f287641816dc6d" },
|
|
||||||
"paperlanes": { "branch": "master", "commit": "bd52c54c36ad2e9ac563ae1c6a4f6ed1f5faacd2" },
|
"paperlanes": { "branch": "master", "commit": "bd52c54c36ad2e9ac563ae1c6a4f6ed1f5faacd2" },
|
||||||
"plenary": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
"plenary": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||||
"purescript-vim": { "branch": "main", "commit": "82348352e6568fcc0385bd7c99a8ead3a479feea" },
|
|
||||||
"rasi.vim": { "branch": "main", "commit": "eac9969cf935cd4380987dc99bfa10d69d3f34a6" },
|
|
||||||
"rust-tools": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
|
"rust-tools": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
|
||||||
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
|
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
|
||||||
"scrap.nvim": { "branch": "main", "commit": "0f833d8dccaabe49c1ed7a2b24cfd887d9d5003f" },
|
"scrap": { "branch": "main", "commit": "0f833d8dccaabe49c1ed7a2b24cfd887d9d5003f" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "c970c7a3cc7ba635fd73d43c81b40f04c00f5058" },
|
"smart-splits.nvim": { "branch": "master", "commit": "c970c7a3cc7ba635fd73d43c81b40f04c00f5058" },
|
||||||
"ssr": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
|
"ssr": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
|
||||||
"telescope": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
"telescope": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||||
"typst.vim": { "branch": "main", "commit": "5b11b42de1703838ca1bb31dc66e73c002698e49" },
|
"treesitter-top-context": { "branch": "master", "commit": "c9f2b429a1d63023f7a33b5404616f4cd2a109c5" },
|
||||||
|
"treesitter-virtual-context": { "branch": "master", "commit": "a14f9292b4bd68ceed433fc513f287641816dc6d" },
|
||||||
|
"typst": { "branch": "main", "commit": "308e7737d09de8c1100320ddc6bc270615ae791a" },
|
||||||
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
|
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
|
||||||
"vim-teal": { "branch": "master", "commit": "d2aa107b257879e774680792a2aebaf9cd5742e0" },
|
"venn.nvim": { "branch": "main", "commit": "e4d68341a73dd56c64955058821a58295fb337b1" },
|
||||||
"wakatime": { "branch": "master", "commit": "8c8856327815a077cbebeba8c7456312a3d2c39c" },
|
"wakatime": { "branch": "master", "commit": "8c8856327815a077cbebeba8c7456312a3d2c39c" },
|
||||||
"web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
"web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
||||||
"winbar": { "branch": "main", "commit": "13739fdb31be51a1000486189662596f07a59a31" },
|
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
|
||||||
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" }
|
"winbar": { "branch": "main", "commit": "13739fdb31be51a1000486189662596f07a59a31" }
|
||||||
}
|
}
|
|
@ -135,6 +135,8 @@ M.unicode = {
|
||||||
{ "iinf", "∞" },
|
{ "iinf", "∞" },
|
||||||
{ "star", "⋆" },
|
{ "star", "⋆" },
|
||||||
{ "diamond", "⋄" },
|
{ "diamond", "⋄" },
|
||||||
|
{ "tto", "→" },
|
||||||
|
{ "ttoo", "⟶" },
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Brackets
|
-- {{{ Brackets
|
||||||
{ "langle", "⟨" },
|
{ "langle", "⟨" },
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M.mergeTables(t1, t2)
|
|
||||||
local t3 = {}
|
|
||||||
|
|
||||||
if t1 ~= nil then for k, v in pairs(t1) do t3[k] = v end end
|
|
||||||
|
|
||||||
if t2 ~= nil then for k, v in pairs(t2) do t3[k] = v end end
|
|
||||||
|
|
||||||
return t3
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.saveCursor(callback)
|
|
||||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
|
||||||
callback()
|
|
||||||
vim.api.nvim_win_set_cursor(0, cursor)
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,56 +0,0 @@
|
||||||
local function makeEnv(cond)
|
|
||||||
return {
|
|
||||||
-- I am doing this to get type hints!
|
|
||||||
active = function()
|
|
||||||
return cond()
|
|
||||||
end,
|
|
||||||
not_active = function()
|
|
||||||
return not cond()
|
|
||||||
end,
|
|
||||||
unless = function(f)
|
|
||||||
if not cond() then
|
|
||||||
f()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
when = function(f)
|
|
||||||
if cond() then
|
|
||||||
f()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
local M = {
|
|
||||||
vscode = makeEnv(function()
|
|
||||||
return vim.g.vscode ~= nil
|
|
||||||
end),
|
|
||||||
neovide = makeEnv(function()
|
|
||||||
return vim.g.neovide ~= nil or vim.g.nix_neovim_app == "neovide"
|
|
||||||
end),
|
|
||||||
firenvim = makeEnv(function()
|
|
||||||
return vim.g.started_by_firenvim ~= nil
|
|
||||||
or vim.g.nix_neovim_app == "firenvim"
|
|
||||||
end),
|
|
||||||
_and = function(a, b)
|
|
||||||
return makeEnv(function()
|
|
||||||
return a.active() and b.active()
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
_or = function(a, b)
|
|
||||||
return makeEnv(function()
|
|
||||||
return a.active() or b.active()
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
M.blacklist = function(list)
|
|
||||||
for _, key in pairs(list) do
|
|
||||||
if M[key].active() then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,13 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M.split(text, sep)
|
|
||||||
---@diagnostic disable-next-line: redefined-local
|
|
||||||
local sep, fields = sep or ":", {}
|
|
||||||
local pattern = string.format("([^%s]+)", sep)
|
|
||||||
text:gsub(pattern, function(c)
|
|
||||||
fields[#fields + 1] = c
|
|
||||||
end)
|
|
||||||
return fields
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,14 +1,15 @@
|
||||||
local theme = require("nix.theme").name
|
local theme = vim.g.nix_theme
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
M.theme = theme
|
||||||
|
|
||||||
function M.theme_contains(name)
|
function M.theme_contains(name)
|
||||||
return string.find(theme, name) ~= nil
|
return string.find(theme.name, name) ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.variant(name)
|
function M.variant(name)
|
||||||
-- +1 for 1-indexed strings and +1 for the space between name and variant
|
-- +1 for 1-indexed strings and +1 for the space between name and variant
|
||||||
return string.lower(string.sub(theme, string.len(name) + 2))
|
return string.lower(string.sub(theme.name, string.len(name) + 2))
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
|
@ -1,5 +1,4 @@
|
||||||
local helpers = require("my.helpers")
|
-- TODO: operator for wrapping motion with fold
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
-- {{{ Helpers
|
-- {{{ Helpers
|
||||||
|
@ -18,9 +17,13 @@ end
|
||||||
---@param from string
|
---@param from string
|
||||||
---@param to string
|
---@param to string
|
||||||
---@param name string
|
---@param name string
|
||||||
---@param perhapsOpts table|nil
|
---@param opts table|nil
|
||||||
function M.delimitedTextobject(from, to, name, perhapsOpts)
|
function M.delimitedTextobject(from, to, name, opts)
|
||||||
local opts = helpers.mergeTables(perhapsOpts or {}, { desc = name })
|
opts = opts or {}
|
||||||
|
|
||||||
|
if opts.desc == nil then
|
||||||
|
opts.desc = name
|
||||||
|
end
|
||||||
|
|
||||||
vim.keymap.set({ "v", "o" }, "i" .. from, "i" .. to, opts)
|
vim.keymap.set({ "v", "o" }, "i" .. from, "i" .. to, opts)
|
||||||
vim.keymap.set({ "v", "o" }, "a" .. from, "a" .. to, opts)
|
vim.keymap.set({ "v", "o" }, "a" .. from, "a" .. to, opts)
|
||||||
|
@ -111,7 +114,7 @@ function M.setup()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
-- }}}
|
-- }}}
|
||||||
-- -- {{{ Winblend
|
-- {{{ Winblend
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "*" },
|
pattern = { "*" },
|
||||||
group = vim.api.nvim_create_augroup("WinblendSettings", {}),
|
group = vim.api.nvim_create_augroup("WinblendSettings", {}),
|
||||||
|
@ -119,7 +122,25 @@ function M.setup()
|
||||||
vim.opt.winblend = 0
|
vim.opt.winblend = 0
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
-- -- }}}
|
-- }}}
|
||||||
|
-- {{{ Manage cmdheight
|
||||||
|
vim.api.nvim_create_autocmd("CmdlineEnter", {
|
||||||
|
group = vim.api.nvim_create_augroup("SetCmdheightCmdlineEnter", {}),
|
||||||
|
callback = function()
|
||||||
|
if not vim.g.inside_venn then
|
||||||
|
vim.opt.cmdheight = 1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
||||||
|
group = vim.api.nvim_create_augroup("SetCmdheightCmdlineLeave", {}),
|
||||||
|
callback = function()
|
||||||
|
if not vim.g.inside_venn then
|
||||||
|
vim.opt.cmdheight = 0
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
-- }}}
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -5,45 +5,46 @@ local function importFrom(p)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
require("lazy").setup(
|
require("lazy").setup({
|
||||||
{ importFrom("my.plugins"), importFrom("nix.plugins") },
|
importFrom("my.plugins"),
|
||||||
{
|
importFrom("nix.plugins"),
|
||||||
defaults = { lazy = true },
|
importFrom("my.plugins.themes"),
|
||||||
install = {
|
}, {
|
||||||
-- install missing plugins on startup. This doesn't increase startup time.
|
defaults = { lazy = true },
|
||||||
missing = true,
|
install = {
|
||||||
-- try to load one of these colorschemes when starting an installation during startup
|
-- install missing plugins on startup. this doesn't increase startup time.
|
||||||
colorscheme = { "rose-pine", "catpuccin" },
|
missing = true,
|
||||||
},
|
-- try to load one of these colorschemes when starting an installation during startup
|
||||||
change_detection = {
|
colorscheme = { "rose-pine", "catpuccin" },
|
||||||
enabled = false,
|
},
|
||||||
notify = false,
|
change_detection = {
|
||||||
},
|
enabled = false,
|
||||||
dev = {
|
notify = false,
|
||||||
-- Fallback to git when local plugin doesn't exist
|
},
|
||||||
fallback = true,
|
dev = {
|
||||||
|
-- Fallback to git when local plugin doesn't exist
|
||||||
|
fallback = true,
|
||||||
|
|
||||||
-- Directory where I store my local plugin projects
|
-- Directory where I store my local plugin projects
|
||||||
path = vim.g.nix_projects_path,
|
path = vim.g.nix_projects_path,
|
||||||
patterns = { "Mateiadrielrafael" },
|
patterns = { "Mateiadrielrafael" },
|
||||||
},
|
},
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
paths = { vim.g.nix_extra_runtime },
|
paths = { vim.g.nix_extra_runtime },
|
||||||
disabled_plugins = {
|
disabled_plugins = {
|
||||||
"gzip",
|
"gzip",
|
||||||
"matchit",
|
"matchit",
|
||||||
"matchparen",
|
"matchparen",
|
||||||
"netrwPlugin",
|
"netrwPlugin",
|
||||||
"tarPlugin",
|
"tarPlugin",
|
||||||
"tohtml",
|
"tohtml",
|
||||||
"tutor",
|
"tutor",
|
||||||
"zipPlugin",
|
"zipPlugin",
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>L", "<cmd>Lazy<cr>", { desc = "[L]azy ui" })
|
vim.keymap.set("n", "<leader>L", "<cmd>Lazy<cr>", { desc = "[L]azy ui" })
|
||||||
|
|
|
@ -1,99 +0,0 @@
|
||||||
local M = {
|
|
||||||
"echasnovski/mini.clue",
|
|
||||||
lazy = false,
|
|
||||||
}
|
|
||||||
|
|
||||||
function M.config()
|
|
||||||
local miniclue = require("mini.clue")
|
|
||||||
miniclue.setup({
|
|
||||||
triggers = {
|
|
||||||
-- Leader triggers
|
|
||||||
{ mode = "n", keys = "<leader>" },
|
|
||||||
{ mode = "x", keys = "<leader>" },
|
|
||||||
{ mode = "v", keys = "<leader>" },
|
|
||||||
},
|
|
||||||
clues = {
|
|
||||||
-- Enhance this by adding descriptions for <Leader> mapping groups
|
|
||||||
miniclue.gen_clues.builtin_completion(),
|
|
||||||
miniclue.gen_clues.g(),
|
|
||||||
miniclue.gen_clues.marks(),
|
|
||||||
miniclue.gen_clues.registers(),
|
|
||||||
miniclue.gen_clues.windows(),
|
|
||||||
miniclue.gen_clues.z(),
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>f",
|
|
||||||
desc = "[F]iles",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>g",
|
|
||||||
desc = "[G]o to",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>r",
|
|
||||||
desc = "[R]ename / [R]eplace / [R]eload",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>l",
|
|
||||||
desc = "[L]ocal",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>w",
|
|
||||||
desc = "[W]orkspace",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>y",
|
|
||||||
desc = "[Y]ank",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>s",
|
|
||||||
desc = "[S]ettings",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>v",
|
|
||||||
desc = "[V]imux",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>h",
|
|
||||||
desc = "git [h]hunks",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>VH",
|
|
||||||
postkeys = "<leader>V",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>VJ",
|
|
||||||
postkeys = "<leader>V",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>VK",
|
|
||||||
postkeys = "<leader>V",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>VL",
|
|
||||||
postkeys = "<leader>V",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
keys = "<leader>Vf",
|
|
||||||
postkeys = "<leader>V",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("my.keymaps").nmap("Q", ":wqa<cr>", "Save all files and [q]uit")
|
|
||||||
end
|
|
||||||
|
|
||||||
return {}
|
|
|
@ -1,122 +0,0 @@
|
||||||
local env = require("my.helpers.env")
|
|
||||||
|
|
||||||
local M = {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
event = "InsertEnter",
|
|
||||||
dependencies = {
|
|
||||||
"onsails/lspkind.nvim", -- show icons in lsp completion menus
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-emoji",
|
|
||||||
"hrsh7th/cmp-cmdline",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
"L3MON4D3/LuaSnip", -- snippeting engine
|
|
||||||
},
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
}
|
|
||||||
|
|
||||||
local function has_words_before()
|
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
|
||||||
return col ~= 0
|
|
||||||
and vim.api
|
|
||||||
.nvim_buf_get_lines(0, line - 1, line, true)[1]
|
|
||||||
:sub(col, col)
|
|
||||||
:match("%s")
|
|
||||||
== nil
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.config()
|
|
||||||
vim.o.completeopt = "menuone,noselect"
|
|
||||||
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local lspkind = require("lspkind")
|
|
||||||
|
|
||||||
local options = {
|
|
||||||
window = {
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
completion = cmp.config.window.bordered({
|
|
||||||
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
|
|
||||||
col_offset = -3,
|
|
||||||
side_padding = 0,
|
|
||||||
completeopt = "menu,menuone,noinsert",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
fields = { "kind", "abbr", "menu" },
|
|
||||||
format = function(entry, vim_item)
|
|
||||||
local kind = lspkind.cmp_format({
|
|
||||||
mode = "symbol",
|
|
||||||
maxwidth = 50,
|
|
||||||
symbol_map = {
|
|
||||||
Text = ".",
|
|
||||||
},
|
|
||||||
})(entry, vim_item)
|
|
||||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
|
||||||
|
|
||||||
-- Rust analyzer sometimes has this be nil when working with lifetime arguments.
|
|
||||||
if strings[1] ~= nil then
|
|
||||||
kind.kind = " " .. strings[1] .. " "
|
|
||||||
end
|
|
||||||
|
|
||||||
kind.menu = ""
|
|
||||||
|
|
||||||
return kind
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
snippet = {
|
|
||||||
-- REQUIRED - you must specify a snippet engine
|
|
||||||
expand = function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
|
||||||
["<C-d>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif has_words_before() then
|
|
||||||
cmp.complete()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
["<C-s>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
},
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffers" },
|
|
||||||
{ name = "emoji" },
|
|
||||||
{ name = "path" },
|
|
||||||
-- { name = 'omni' },
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
|
|
||||||
cmp.setup(options)
|
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
|
||||||
cmp.setup.cmdline("/", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = "buffer" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':'
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,4 +1,4 @@
|
||||||
local env = require("my.helpers.env")
|
local runtime = require("my.tempest")
|
||||||
|
|
||||||
local header_string = [[
|
local header_string = [[
|
||||||
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ██████╗
|
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ██████╗
|
||||||
|
@ -9,7 +9,7 @@ local header_string = [[
|
||||||
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
|
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local header = require("my.helpers.string").split(header_string, "\n")
|
local header = runtime.helpers.split(header_string, "\n")
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
|
@ -23,23 +23,24 @@ local M = {
|
||||||
-- See [the header generator](https://patorjk.com/software/taag/#p=display&v=0&f=ANSI%20Shadow&t=NEOVim%20%3A3)
|
-- See [the header generator](https://patorjk.com/software/taag/#p=display&v=0&f=ANSI%20Shadow&t=NEOVim%20%3A3)
|
||||||
theme.section.header.opts.hl = "AlphaHeader"
|
theme.section.header.opts.hl = "AlphaHeader"
|
||||||
theme.section.header.val = header
|
theme.section.header.val = header
|
||||||
|
local version = vim.version()
|
||||||
local footer = function()
|
local footer = function()
|
||||||
local version = "🚀 "
|
local versionString = "🚀 "
|
||||||
.. vim.version().major
|
.. version.major
|
||||||
.. "."
|
.. "."
|
||||||
.. vim.version().minor
|
.. version.minor
|
||||||
.. "."
|
.. "."
|
||||||
.. vim.version().patch
|
.. version.patch
|
||||||
local lazy_ok, lazy = pcall(require, "lazy")
|
local lazy_ok, lazy = pcall(require, "lazy")
|
||||||
if lazy_ok then
|
if lazy_ok then
|
||||||
local total_plugins = lazy.stats().count .. " Plugins"
|
local total_plugins = lazy.stats().count .. " Plugins"
|
||||||
local startuptime = (
|
local startuptime = (
|
||||||
math.floor(lazy.stats().startuptime * 100 + 0.5) / 100
|
math.floor(lazy.stats().startuptime * 100 + 0.5) / 100
|
||||||
)
|
)
|
||||||
return version
|
return versionString
|
||||||
.. " — 🧰 "
|
.. " — 🧰 "
|
||||||
.. total_plugins
|
.. total_plugins
|
||||||
.. " — 🕐 "
|
.. " — 🕐 "
|
||||||
.. startuptime
|
.. startuptime
|
||||||
.. "ms"
|
.. "ms"
|
||||||
else
|
else
|
||||||
|
@ -63,7 +64,7 @@ local M = {
|
||||||
require("alpha").setup(theme.config)
|
require("alpha").setup(theme.config)
|
||||||
end,
|
end,
|
||||||
lazy = false,
|
lazy = false,
|
||||||
cond = env.vscode.not_active() and env.firenvim.not_active(),
|
cond = runtime.blacklist({ "vscode", "firenvim" }),
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
local env = require("my.helpers.env")
|
local runtime = require("my.tempest")
|
||||||
local K = require("my.keymaps")
|
local K = require("my.keymaps")
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"glacambre/firenvim", -- vim inside chrome
|
"glacambre/firenvim", -- vim inside chrome
|
||||||
lazy = false,
|
lazy = false,
|
||||||
cond = env.firenvim.active(),
|
cond = runtime.whitelist("firenvim"),
|
||||||
}
|
}
|
||||||
|
|
||||||
M.localSettings = {}
|
M.localSettings = {}
|
||||||
|
@ -53,9 +53,4 @@ function M.config()
|
||||||
-- }}}
|
-- }}}
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.setup()
|
|
||||||
M.config()
|
|
||||||
print(vim.inspect(M.localSettings))
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,97 +0,0 @@
|
||||||
local env = require("my.helpers.env")
|
|
||||||
|
|
||||||
local M = {
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
event = "BufReadPost",
|
|
||||||
cond = env.firenvim.not_active() and env.vscode.not_active(),
|
|
||||||
opts = {
|
|
||||||
on_attach = function(bufnr)
|
|
||||||
local gs = package.loaded.gitsigns
|
|
||||||
|
|
||||||
-- {{{ Helpers
|
|
||||||
local function map(mode, from, to, desc, expr)
|
|
||||||
vim.keymap.set(
|
|
||||||
mode,
|
|
||||||
from,
|
|
||||||
to,
|
|
||||||
{ expr = expr, silent = true, buffer = bufnr, desc = desc }
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function exprmap(from, to, desc)
|
|
||||||
map("n", from, to, desc, true)
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Navigation
|
|
||||||
exprmap("]c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "]c"
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
gs.next_hunk()
|
|
||||||
end)
|
|
||||||
|
|
||||||
return "<Ignore>"
|
|
||||||
end, "Navigate to next hunk")
|
|
||||||
|
|
||||||
exprmap("[c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "[c"
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
gs.prev_hunk()
|
|
||||||
end)
|
|
||||||
|
|
||||||
return "<Ignore>"
|
|
||||||
end, "Navigate to previous hunk")
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Actions
|
|
||||||
local prefix = "<leader>h"
|
|
||||||
|
|
||||||
-- require("which-key").register({
|
|
||||||
-- ["<leader>"] = { h = { name = "gitsigns" } },
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- {{{ Normal mode
|
|
||||||
map("n", prefix .. "s", gs.stage_hunk, "[s]tage hunk")
|
|
||||||
map("n", prefix .. "r", gs.reset_hunk, "[r]eset hunk")
|
|
||||||
map("n", prefix .. "S", gs.stage_buffer, "[s]tage buffer")
|
|
||||||
map("n", prefix .. "u", gs.undo_stage_hunk, "[u]ndo hunk staging")
|
|
||||||
map("n", prefix .. "R", gs.reset_buffer, "[r]eset buffer")
|
|
||||||
map("n", prefix .. "p", gs.preview_hunk, "[p]review hunk")
|
|
||||||
map("n", prefix .. "b", function()
|
|
||||||
gs.blame_line({ full = true })
|
|
||||||
end, "[b]lame line")
|
|
||||||
map("n", prefix .. "d", gs.diffthis, "[d]iff this")
|
|
||||||
map("n", prefix .. "D", function()
|
|
||||||
gs.diffthis("~")
|
|
||||||
end, "[d]iff file (?)")
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Toggles
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
prefix .. "tb",
|
|
||||||
gs.toggle_current_line_blame,
|
|
||||||
"[t]oggle line [b]laming"
|
|
||||||
)
|
|
||||||
map("n", prefix .. "td", gs.toggle_deleted, "[t]oggle [d]eleted")
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Visual
|
|
||||||
map("v", prefix .. "s", function()
|
|
||||||
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
|
||||||
end, "stage visual hunk")
|
|
||||||
map("v", prefix .. "r", function()
|
|
||||||
gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
|
||||||
end, "reset visual hunk")
|
|
||||||
-- }}}
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Text objects
|
|
||||||
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "Inside hunk")
|
|
||||||
-- }}}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,72 +1,10 @@
|
||||||
local env = require("my.helpers.env")
|
local runtime = require("my.tempest")
|
||||||
|
|
||||||
if env.neovide.active() then
|
if runtime.whitelist("neovide") then
|
||||||
require("my.neovide").setup()
|
require("my.neovide").setup()
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
--{{{ Language support
|
|
||||||
{
|
|
||||||
"purescript-contrib/purescript-vim",
|
|
||||||
ft = "purescript",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"elkowar/yuck.vim",
|
|
||||||
ft = "yuck",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"Fymyte/rasi.vim",
|
|
||||||
ft = "rasi",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"teal-language/vim-teal",
|
|
||||||
ft = "teal",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"udalov/kotlin-vim",
|
|
||||||
ft = "kotlin",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"kmonad/kmonad-vim",
|
|
||||||
ft = "kbd",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"vmchale/dhall-vim",
|
|
||||||
ft = "dhall",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"yasuhiroki/github-actions-yaml.vim",
|
|
||||||
ft = { "yml", "yaml" },
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"kaarmu/typst.vim",
|
|
||||||
ft = "typst",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"theRealCarneiro/hyprland-vim-syntax",
|
|
||||||
ft = "hypr",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
--}}}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
-- Better ui for inputs/selects
|
-- Better ui for inputs/selects
|
||||||
"stevearc/dressing.nvim",
|
"stevearc/dressing.nvim",
|
||||||
|
@ -84,7 +22,7 @@ return {
|
||||||
return vim.ui.input(...)
|
return vim.ui.input(...)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
cond = env.vscode.not_active(),
|
cond = runtime.blacklist("vscode"),
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -95,45 +33,4 @@ return {
|
||||||
require("nvim-autopairs").setup()
|
require("nvim-autopairs").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"mateiadrielrafael/scrap.nvim",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
|
||||||
require("my.abbreviations").setup()
|
|
||||||
end,
|
|
||||||
}, -- vim-abolish rewrite
|
|
||||||
|
|
||||||
{
|
|
||||||
-- easly switch between tmux and vim panes
|
|
||||||
"christoomey/vim-tmux-navigator",
|
|
||||||
keys = { "<C-h>", "<C-j>", "<C-k>", "<C-l>" },
|
|
||||||
cond = env.vscode.not_active()
|
|
||||||
and env.neovide.not_active()
|
|
||||||
and env.firenvim.not_active()
|
|
||||||
and false,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
-- show progress for lsp stuff
|
|
||||||
"j-hui/fidget.nvim",
|
|
||||||
tag = "legacy",
|
|
||||||
event = "BufReadPre",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
config = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Live command preview for stuff like :norm
|
|
||||||
{
|
|
||||||
"smjonas/live-command.nvim",
|
|
||||||
config = function()
|
|
||||||
require("live-command").setup({
|
|
||||||
commands = {
|
|
||||||
Norm = { cmd = "norm" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
event = "VeryLazy",
|
|
||||||
cond = false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
local helpers = require("my.helpers")
|
local runtime = require("my.tempest")
|
||||||
local env = require("my.helpers.env")
|
|
||||||
|
|
||||||
local lspconfig = {
|
local lspconfig = {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
@ -12,7 +11,7 @@ local lspconfig = {
|
||||||
},
|
},
|
||||||
"simrat39/rust-tools.nvim",
|
"simrat39/rust-tools.nvim",
|
||||||
},
|
},
|
||||||
cond = env.vscode.not_active(),
|
cond = runtime.blacklist("vscode"),
|
||||||
}
|
}
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
|
@ -23,7 +22,7 @@ local M = {
|
||||||
opts = {
|
opts = {
|
||||||
input_buffer_type = "dressing",
|
input_buffer_type = "dressing",
|
||||||
},
|
},
|
||||||
cond = env.vscode.not_active(),
|
cond = runtime.blacklist("vscode"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +52,11 @@ function M.on_attach(client, bufnr)
|
||||||
nmap("<leader>c", vim.lsp.buf.code_action, "[C]ode actions")
|
nmap("<leader>c", vim.lsp.buf.code_action, "[C]ode actions")
|
||||||
nmap("<leader>li", "<cmd>LspInfo<cr>", "[L]sp [i]nfo")
|
nmap("<leader>li", "<cmd>LspInfo<cr>", "[L]sp [i]nfo")
|
||||||
|
|
||||||
|
local expropts = opts("[R]e[n]ame")
|
||||||
|
expropts.expr = true
|
||||||
vim.keymap.set("n", "<leader>rn", function()
|
vim.keymap.set("n", "<leader>rn", function()
|
||||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||||
end, helpers.mergeTables(opts("[R]e[n]ame"), { expr = true }))
|
end, expropts)
|
||||||
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
"v",
|
"v",
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
local env = require("my.helpers.env")
|
|
||||||
|
|
||||||
local M = {
|
|
||||||
"L3MON4D3/LuaSnip", -- snippeting engine
|
|
||||||
version = "v2",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
}
|
|
||||||
|
|
||||||
local function reload()
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.config()
|
|
||||||
local luasnip = require("luasnip")
|
|
||||||
|
|
||||||
vim.keymap.set("i", "<Tab>", function()
|
|
||||||
if luasnip.jumpable(1) then
|
|
||||||
return "<cmd>lua require('luasnip').jump(1)<cr>"
|
|
||||||
else
|
|
||||||
return "<Tab>"
|
|
||||||
end
|
|
||||||
end, { expr = true })
|
|
||||||
|
|
||||||
vim.keymap.set("i", "<S-Tab>", function()
|
|
||||||
luasnip.jump(-1)
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>rs", reload, {
|
|
||||||
desc = "[R]eload [s]nippets",
|
|
||||||
})
|
|
||||||
|
|
||||||
reload()
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,30 +0,0 @@
|
||||||
local env = require("my.helpers.env")
|
|
||||||
|
|
||||||
local M = {
|
|
||||||
"jose-elias-alvarez/null-ls.nvim", -- generic language server
|
|
||||||
event = "BufReadPre",
|
|
||||||
dependencies = "neovim/nvim-lspconfig",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
enable = false,
|
|
||||||
}
|
|
||||||
|
|
||||||
function M.config()
|
|
||||||
local lspconfig = require("my.plugins.lspconfig")
|
|
||||||
local null_ls = require("null-ls")
|
|
||||||
|
|
||||||
local sources = {
|
|
||||||
-- {{{ Python
|
|
||||||
-- Diagnostics
|
|
||||||
null_ls.builtins.diagnostics.ruff, -- Linting
|
|
||||||
-- null_ls.builtins.diagnostics.mypy, -- Type checking
|
|
||||||
-- }}}
|
|
||||||
}
|
|
||||||
|
|
||||||
null_ls.setup({
|
|
||||||
sources = sources,
|
|
||||||
on_attach = lspconfig.on_attach,
|
|
||||||
debug = true,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,5 +1,4 @@
|
||||||
local H = require("my.plugins.themes.helpers")
|
local H = require("my.helpers.theme")
|
||||||
local T = require("nix.theme")
|
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"uloco/bluloco.nvim",
|
"uloco/bluloco.nvim",
|
||||||
|
@ -12,7 +11,7 @@ function M.config()
|
||||||
local bluloco = require("bluloco")
|
local bluloco = require("bluloco")
|
||||||
|
|
||||||
bluloco.setup({
|
bluloco.setup({
|
||||||
transparent = T.opacity.terminal < 1.0,
|
transparent = H.theme.opacity.terminal < 1.0,
|
||||||
style = H.variant("Bluloco"),
|
style = H.variant("Bluloco"),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
local H = require("my.plugins.themes.helpers")
|
local H = require("my.helpers.theme")
|
||||||
local T = require("nix.theme")
|
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
|
@ -13,7 +12,7 @@ function M.config()
|
||||||
vim.g.catppuccin_flavour = H.variant("Catppuccin")
|
vim.g.catppuccin_flavour = H.variant("Catppuccin")
|
||||||
|
|
||||||
catppuccin.setup({
|
catppuccin.setup({
|
||||||
transparent_background = T.transparent.terminal,
|
transparent_background = H.theme.transparent.terminal,
|
||||||
integrations = {
|
integrations = {
|
||||||
nvimtree = true,
|
nvimtree = true,
|
||||||
telescope = true,
|
telescope = true,
|
||||||
|
@ -26,7 +25,7 @@ function M.config()
|
||||||
|
|
||||||
vim.cmd("colorscheme catppuccin")
|
vim.cmd("colorscheme catppuccin")
|
||||||
|
|
||||||
if T.transparent.terminal then
|
if H.theme.transparent.terminal then
|
||||||
vim.cmd([[highlight FloatBorder blend=0 guibg=NONE]])
|
vim.cmd([[highlight FloatBorder blend=0 guibg=NONE]])
|
||||||
-- vim.cmd([[highlight MiniStatuslineInactive blend=0 guibg=NONE]])
|
-- vim.cmd([[highlight MiniStatuslineInactive blend=0 guibg=NONE]])
|
||||||
vim.cmd([[highlight MiniStatuslineFilename blend=0 guibg=NONE]])
|
vim.cmd([[highlight MiniStatuslineFilename blend=0 guibg=NONE]])
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
return {
|
|
||||||
require("my.plugins.themes.catppuccin"),
|
|
||||||
require("my.plugins.themes.rosepine"),
|
|
||||||
require("my.plugins.themes.bluloco"),
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
local H = require("my.plugins.themes.helpers")
|
local H = require("my.helpers.theme")
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"rose-pine/neovim",
|
"rose-pine/neovim",
|
||||||
|
|
|
@ -1,105 +0,0 @@
|
||||||
local env = require("my.helpers.env")
|
|
||||||
|
|
||||||
local M = {
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
build = ":TSUpdate",
|
|
||||||
event = "BufReadPost",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
--{{{Languages
|
|
||||||
ensure_installed = {
|
|
||||||
"bash",
|
|
||||||
"c",
|
|
||||||
"cpp",
|
|
||||||
"css",
|
|
||||||
"dockerfile",
|
|
||||||
"elixir",
|
|
||||||
"fish",
|
|
||||||
"html",
|
|
||||||
"javascript",
|
|
||||||
"json",
|
|
||||||
"jsonc",
|
|
||||||
"latex",
|
|
||||||
"lua",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"nix",
|
|
||||||
"python",
|
|
||||||
"rust",
|
|
||||||
"scss",
|
|
||||||
"toml",
|
|
||||||
"tsx",
|
|
||||||
"typescript",
|
|
||||||
"vim",
|
|
||||||
"yaml",
|
|
||||||
},
|
|
||||||
sync_install = false,
|
|
||||||
--}}}
|
|
||||||
--{{{ Highlighting
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
disable = { "kotlin" },
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
--}}}
|
|
||||||
textobjects = {
|
|
||||||
--{{{ Select
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true,
|
|
||||||
keymaps = {
|
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
--}}}
|
|
||||||
--{{{ Move
|
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
|
||||||
goto_next_start = {
|
|
||||||
["]f"] = "@function.outer",
|
|
||||||
["]t"] = "@class.outer",
|
|
||||||
},
|
|
||||||
goto_next_end = {
|
|
||||||
["]F"] = "@function.outer",
|
|
||||||
["]T"] = "@class.outer",
|
|
||||||
},
|
|
||||||
goto_previous_start = {
|
|
||||||
["[f"] = "@function.outer",
|
|
||||||
["[t"] = "@class.outer",
|
|
||||||
},
|
|
||||||
goto_previous_end = {
|
|
||||||
["[F"] = "@function.outer",
|
|
||||||
["[T"] = "@class.outer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
--}}}
|
|
||||||
},
|
|
||||||
indent = { enable = true },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
-- show context on closing parenthesis
|
|
||||||
"haringsrob/nvim_context_vt",
|
|
||||||
event = "BufReadPost",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
-- show context at top of file
|
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
|
||||||
event = "BufReadPost",
|
|
||||||
cond = env.vscode.not_active(),
|
|
||||||
opts = { enable = true },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
|
@ -28,46 +28,53 @@ local venn_hint = H.concat_many_h({
|
||||||
}, 3).value
|
}, 3).value
|
||||||
|
|
||||||
function M.config()
|
function M.config()
|
||||||
local r = "<leader>V"
|
-- local r = "<leader>V"
|
||||||
vim.keymap.set("n", r .. "H", "<C-v>h:VBox<CR>", { desc = "left" })
|
-- vim.keymap.set("n", r .. "H", "<C-v>h:VBox<CR>", { desc = "left" })
|
||||||
vim.keymap.set("n", r .. "J", "<C-v>j:VBox<CR>", { desc = "down" })
|
-- vim.keymap.set("n", r .. "J", "<C-v>j:VBox<CR>", { desc = "down" })
|
||||||
vim.keymap.set("n", r .. "K", "<C-v>k:VBox<CR>", { desc = "up" })
|
-- vim.keymap.set("n", r .. "K", "<C-v>k:VBox<CR>", { desc = "up" })
|
||||||
vim.keymap.set("n", r .. "L", "<C-v>l:VBox<CR>", { desc = "right" })
|
-- vim.keymap.set("n", r .. "L", "<C-v>l:VBox<CR>", { desc = "right" })
|
||||||
vim.keymap.set("v", r .. "f", ":VBox<CR>", { desc = "box" })
|
-- vim.keymap.set("v", r .. "f", ":VBox<CR>", { desc = "box" })
|
||||||
|
|
||||||
-- local Hydra = require("hydra")
|
local Hydra = require("hydra")
|
||||||
--
|
|
||||||
-- Hydra({
|
Hydra({
|
||||||
-- name = "Draw Diagram",
|
name = "Draw Diagram",
|
||||||
-- hint = venn_hint,
|
hint = venn_hint,
|
||||||
-- config = {
|
config = {
|
||||||
-- color = "pink",
|
color = "pink",
|
||||||
-- invoke_on_body = true,
|
invoke_on_body = true,
|
||||||
-- hint = {
|
hint = {
|
||||||
-- border = "single",
|
border = "single",
|
||||||
-- },
|
},
|
||||||
-- on_enter = function()
|
on_enter = function()
|
||||||
-- vim.o.virtualedit = "all"
|
vim.opt.virtualedit = "all"
|
||||||
-- end,
|
vim.g.inside_venn = true
|
||||||
-- },
|
vim.opt.cmdheight = 1
|
||||||
-- mode = "n",
|
end,
|
||||||
-- desc = "[V]enn mode",
|
on_exit = function()
|
||||||
-- body = "<leader>V",
|
vim.opt.virtualedit = ""
|
||||||
-- heads = {
|
vim.g.inside_venn = false
|
||||||
-- { "H", "<C-v>h:VBox<CR>" },
|
vim.opt.cmdheight = 0
|
||||||
-- { "J", "<C-v>j:VBox<CR>" },
|
end,
|
||||||
-- { "K", "<C-v>k:VBox<CR>" },
|
desc = "[V]enn mode",
|
||||||
-- { "L", "<C-v>l:VBox<CR>" },
|
},
|
||||||
-- { "f", ":VBox<CR>", { mode = "v" } },
|
mode = "n",
|
||||||
-- { "<Esc>", nil, { exit = true } },
|
body = "<leader>V",
|
||||||
-- },
|
heads = {
|
||||||
-- })
|
{ "H", "<C-v>h:VBox<cr>", { silent = true, desc = "test description" } },
|
||||||
|
{ "J", "<C-v>j:VBox<cr>", { silent = true, desc = "test description" } },
|
||||||
|
{ "K", "<C-v>k:VBox<cr>", { silent = true, desc = "test description" } },
|
||||||
|
{ "L", "<C-v>l:VBox<cr>", { silent = true, desc = "test description" } },
|
||||||
|
{ "f", "<cmd>VBox<cr>", { mode = "v" } },
|
||||||
|
{ "<Esc>", nil, { exit = true } },
|
||||||
|
},
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function M.init()
|
function M.init()
|
||||||
-- require("which-key").register({
|
require("which-key").register({
|
||||||
-- ["<leader>V"] = { name = "[V]enn mode" },
|
["<leader>V"] = { name = "[V]enn mode" },
|
||||||
-- })
|
})
|
||||||
-- end
|
end
|
||||||
|
|
||||||
return {}
|
return M
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
|
local runtime = require("my.tempest")
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
cond = runtime.blacklist("vscode"),
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.config()
|
function M.config()
|
||||||
|
@ -28,4 +31,4 @@ function M.config()
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return {}
|
return M
|
||||||
|
|
|
@ -1,7 +1,18 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
local H = {}
|
||||||
|
M.helpers = H
|
||||||
|
|
||||||
-- {{{ General helpers
|
-- {{{ General helpers
|
||||||
local function string_chars(str)
|
function H.with_default(default, given)
|
||||||
|
if given == nil then
|
||||||
|
return default
|
||||||
|
else
|
||||||
|
return given
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- {{{ Strings
|
||||||
|
function H.string_chars(str)
|
||||||
local chars = {}
|
local chars = {}
|
||||||
for i = 1, #str do
|
for i = 1, #str do
|
||||||
table.insert(chars, str:sub(i, i))
|
table.insert(chars, str:sub(i, i))
|
||||||
|
@ -9,14 +20,36 @@ local function string_chars(str)
|
||||||
return chars
|
return chars
|
||||||
end
|
end
|
||||||
|
|
||||||
local function with_default(default, given)
|
function H.split(text, sep)
|
||||||
if given == nil then
|
---@diagnostic disable-next-line: redefined-local
|
||||||
return default
|
local sep, fields = sep or ":", {}
|
||||||
else
|
local pattern = string.format("([^%s]+)", sep)
|
||||||
return given
|
text:gsub(pattern, function(c)
|
||||||
end
|
fields[#fields + 1] = c
|
||||||
|
end)
|
||||||
|
return fields
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
-- {{{ Tables
|
||||||
|
function H.mergeTables(t1, t2)
|
||||||
|
local t3 = {}
|
||||||
|
|
||||||
|
if t1 ~= nil then
|
||||||
|
for k, v in pairs(t1) do
|
||||||
|
t3[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if t2 ~= nil then
|
||||||
|
for k, v in pairs(t2) do
|
||||||
|
t3[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return t3
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
-- }}}
|
||||||
-- {{{ API wrappers
|
-- {{{ API wrappers
|
||||||
-- {{{ Keymaps
|
-- {{{ Keymaps
|
||||||
function M.set_keymap(opts, context)
|
function M.set_keymap(opts, context)
|
||||||
|
@ -30,15 +63,23 @@ function M.set_keymap(opts, context)
|
||||||
buffer = context.bufnr
|
buffer = context.bufnr
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local action = opts.action
|
||||||
|
|
||||||
|
if type(opts.action) == "function" then
|
||||||
|
action = function()
|
||||||
|
opts.action(context)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
string_chars(with_default("n", opts.mode)),
|
H.string_chars(H.with_default("n", opts.mode)),
|
||||||
opts.mapping,
|
opts.mapping,
|
||||||
opts.action,
|
action,
|
||||||
{
|
{
|
||||||
desc = opts.desc,
|
desc = opts.desc,
|
||||||
buffer = with_default(buffer, opts.buffer),
|
buffer = H.with_default(buffer, opts.buffer),
|
||||||
expr = opts.expr,
|
expr = opts.expr,
|
||||||
silent = with_default(true, opts.silent),
|
silent = H.with_default(true, opts.silent),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -77,6 +118,10 @@ local function recursive_assign(source, destination)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.configure(opts, context)
|
function M.configure(opts, context)
|
||||||
|
if type(opts.mk_context) == "function" then
|
||||||
|
context = opts.mk_context(context)
|
||||||
|
end
|
||||||
|
|
||||||
if type(opts.vim) == "table" then
|
if type(opts.vim) == "table" then
|
||||||
recursive_assign(opts.vim, vim)
|
recursive_assign(opts.vim, vim)
|
||||||
end
|
end
|
||||||
|
@ -130,6 +175,53 @@ function M.configure(opts, context)
|
||||||
opts.callback(context)
|
opts.callback(context)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.lazy = function(lazy, opts, spec)
|
||||||
|
return M.configure(spec, { lazy = lazy, opts = opts })
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
-- {{{ Neovim env handling
|
||||||
|
local envs = {
|
||||||
|
vscode = vim.g.vscode ~= nil,
|
||||||
|
neovide = vim.g.neovide ~= nil or vim.g.nix_neovim_app == "neovide",
|
||||||
|
firenvim = vim.g.started_by_firenvim ~= nil
|
||||||
|
or vim.g.nix_neovim_app == "firenvim",
|
||||||
|
}
|
||||||
|
|
||||||
|
M.blacklist = function(list)
|
||||||
|
if type(list) == "string" then
|
||||||
|
list = { list }
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, key in pairs(list) do
|
||||||
|
if envs[key] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
M.whitelist = function(list)
|
||||||
|
if type(list) == "string" then
|
||||||
|
list = { list }
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, key in pairs(list) do
|
||||||
|
if not envs[key] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
-- {{{ Other misc thingies
|
||||||
|
function M.withSavedCursor(callback)
|
||||||
|
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||||
|
callback()
|
||||||
|
vim.api.nvim_win_set_cursor(0, cursor)
|
||||||
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
return M
|
return M
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, config, inputs, ... }:
|
{ upkgs, pkgs, lib, config, inputs, ... }:
|
||||||
let
|
let
|
||||||
# {{{ extraPackages
|
# {{{ extraPackages
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
|
@ -11,7 +11,6 @@ let
|
||||||
inputs.nixd.packages.${system}.nixd # nix
|
inputs.nixd.packages.${system}.nixd # nix
|
||||||
texlab # latex
|
texlab # latex
|
||||||
nodePackages_latest.vscode-langservers-extracted # web stuff
|
nodePackages_latest.vscode-langservers-extracted # web stuff
|
||||||
typst-lsp # typst
|
|
||||||
# haskell-language-server # haskell
|
# haskell-language-server # haskell
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
|
@ -19,7 +18,6 @@ let
|
||||||
nodePackages_latest.purs-tidy # Purescript
|
nodePackages_latest.purs-tidy # Purescript
|
||||||
nodePackages_latest.prettier # Js & friends
|
nodePackages_latest.prettier # Js & friends
|
||||||
nodePackages_latest.prettier_d_slim # Js & friends
|
nodePackages_latest.prettier_d_slim # Js & friends
|
||||||
typst-fmt # Typst
|
|
||||||
|
|
||||||
# Linters
|
# Linters
|
||||||
ruff # Python linter
|
ruff # Python linter
|
||||||
|
@ -31,8 +29,6 @@ let
|
||||||
# Others
|
# Others
|
||||||
fd # file finder
|
fd # file finder
|
||||||
update-nix-fetchgit # Useful for nix stuff
|
update-nix-fetchgit # Useful for nix stuff
|
||||||
tree-sitter # Syntax highlighting
|
|
||||||
libstdcxx5 # Required by treesitter aparently
|
|
||||||
|
|
||||||
# Latex setup
|
# Latex setup
|
||||||
# texlive.combined.scheme-full # Latex stuff
|
# texlive.combined.scheme-full # Latex stuff
|
||||||
|
@ -41,12 +37,6 @@ let
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ extraRuntime
|
# {{{ extraRuntime
|
||||||
extraRuntimePaths = [
|
extraRuntimePaths = [
|
||||||
# Base16 theme
|
|
||||||
(config.satellite.lib.lua.writeFile
|
|
||||||
"lua/nix" "theme"
|
|
||||||
config.satellite.colorscheme.lua
|
|
||||||
)
|
|
||||||
|
|
||||||
# Experimental nix module generation
|
# Experimental nix module generation
|
||||||
config.satellite.neovim.generated.lazySingleFile
|
config.satellite.neovim.generated.lazySingleFile
|
||||||
];
|
];
|
||||||
|
@ -69,9 +59,11 @@ let
|
||||||
# I cannot just install those dirs using the builtin package support because
|
# I cannot just install those dirs using the builtin package support because
|
||||||
# my package manager (lazy.nvim) disables those.
|
# my package manager (lazy.nvim) disables those.
|
||||||
wrapClient = { base, name, binName ? name, extraArgs ? "" }:
|
wrapClient = { base, name, binName ? name, extraArgs ? "" }:
|
||||||
let startupScript = pkgs.writeText "startup.lua" /* lua */''
|
let startupScript = config.satellite.lib.lua.writeFile
|
||||||
|
"." "startup" /* lua */ ''
|
||||||
vim.g.nix_extra_runtime = ${nlib.encode extraRuntime}
|
vim.g.nix_extra_runtime = ${nlib.encode extraRuntime}
|
||||||
vim.g.nix_projects_dir = ${nlib.encode config.xdg.userDirs.extraConfig.XDG_PROJECTS_DIR}
|
vim.g.nix_projects_dir = ${nlib.encode config.xdg.userDirs.extraConfig.XDG_PROJECTS_DIR}
|
||||||
|
vim.g.nix_theme = ${config.satellite.colorscheme.lua}
|
||||||
-- Provide hints as to what app we are running in
|
-- Provide hints as to what app we are running in
|
||||||
-- (Useful because neovide does not provide the info itself right away)
|
-- (Useful because neovide does not provide the info itself right away)
|
||||||
vim.g.nix_neovim_app = ${nlib.encode name}
|
vim.g.nix_neovim_app = ${nlib.encode name}
|
||||||
|
@ -84,7 +76,7 @@ let
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/${binName} \
|
wrapProgram $out/bin/${binName} \
|
||||||
--prefix PATH : ${lib.makeBinPath extraPackages} \
|
--prefix PATH : ${lib.makeBinPath extraPackages} \
|
||||||
--add-flags ${lib.escapeShellArg ''--cmd "lua dofile('${startupScript}')"''} \
|
--add-flags ${lib.escapeShellArg ''--cmd "lua dofile('${startupScript}/startup.lua')"''} \
|
||||||
${extraArgs}
|
${extraArgs}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -182,9 +174,8 @@ in
|
||||||
# {{{ Plugins
|
# {{{ Plugins
|
||||||
satellite.lua.styluaConfig = ../../../stylua.toml;
|
satellite.lua.styluaConfig = ../../../stylua.toml;
|
||||||
satellite.neovim.runtime = {
|
satellite.neovim.runtime = {
|
||||||
env = "my.helpers.env";
|
|
||||||
languageServerOnAttach = "my.plugins.lspconfig";
|
languageServerOnAttach = "my.plugins.lspconfig";
|
||||||
tempest = "my.runtime";
|
tempest = "my.tempest";
|
||||||
};
|
};
|
||||||
|
|
||||||
# {{{ libraries
|
# {{{ libraries
|
||||||
|
@ -201,6 +192,9 @@ in
|
||||||
# {{{ web-devicons
|
# {{{ web-devicons
|
||||||
satellite.neovim.lazy.web-devicons.package = "nvim-tree/nvim-web-devicons";
|
satellite.neovim.lazy.web-devicons.package = "nvim-tree/nvim-web-devicons";
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ Scrap
|
||||||
|
satellite.neovim.lazy.scrap.package = "mateiadrielrafael/scrap.nvim";
|
||||||
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ ui
|
# {{{ ui
|
||||||
# {{{ nvim-tree
|
# {{{ nvim-tree
|
||||||
|
@ -323,6 +317,7 @@ in
|
||||||
dependencies.lua = [ lazy.plenary.package ];
|
dependencies.lua = [ lazy.plenary.package ];
|
||||||
|
|
||||||
env.blacklist = [ "vscode" "firenvim" ];
|
env.blacklist = [ "vscode" "firenvim" ];
|
||||||
|
cmd = "Neogit"; # We sometimes spawn this directly from fish using a keybind
|
||||||
keys = {
|
keys = {
|
||||||
mapping = "<c-g>";
|
mapping = "<c-g>";
|
||||||
action = "<cmd>Neogit<cr>";
|
action = "<cmd>Neogit<cr>";
|
||||||
|
@ -342,7 +337,7 @@ in
|
||||||
satellite.neovim.lazy.telescope = {
|
satellite.neovim.lazy.telescope = {
|
||||||
package = "nvim-telescope/telescope.nvim";
|
package = "nvim-telescope/telescope.nvim";
|
||||||
version = "0.1.x";
|
version = "0.1.x";
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
|
|
||||||
# {{{ Dependencies
|
# {{{ Dependencies
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
@ -372,14 +367,14 @@ in
|
||||||
"Find ${tag} files";
|
"Find ${tag} files";
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
(keymap "<c-p>" "find_files" "Find files")
|
(keymap "<c-p>" "find_files" "File finder [p]alette")
|
||||||
(keymap "<leader>d" "diagnostics" "Diagnostics")
|
(keymap "<leader>d" "diagnostics" "[D]iagnostics")
|
||||||
(keymap "<c-f>" "live_grep" "[F]ind in project")
|
(keymap "<c-f>" "live_grep" "[F]ind in project")
|
||||||
(keymap "<leader>t" "builtin" "[T]elescope pickers")
|
(keymap "<leader>t" "builtin" "[T]elescope pickers")
|
||||||
# {{{ Files by extension
|
# {{{ Files by extension
|
||||||
(findFilesByExtension "tx" "tex" "[t]ex")
|
(findFilesByExtension "tx" "tex" "[t]ex")
|
||||||
(findFilesByExtension "ts" "ts" "[t]ypescript")
|
(findFilesByExtension "ts" "ts" "[t]ypescript")
|
||||||
(findFilesByExtension "ty" "typst" "[t]ypst")
|
(findFilesByExtension "ty" "typ" "[t]ypst")
|
||||||
(findFilesByExtension "l" "lua" "[l]ua")
|
(findFilesByExtension "l" "lua" "[l]ua")
|
||||||
(findFilesByExtension "n" "nix" "[n]ua")
|
(findFilesByExtension "n" "nix" "[n]ua")
|
||||||
(findFilesByExtension "p" "purs" "[p]urescript")
|
(findFilesByExtension "p" "purs" "[p]urescript")
|
||||||
|
@ -423,18 +418,125 @@ in
|
||||||
main = "ibl";
|
main = "ibl";
|
||||||
setup = true;
|
setup = true;
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
event = "BufReadPost";
|
event = "BufReadPost";
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ live-command
|
||||||
|
# Live command preview for commands like :norm
|
||||||
|
satellite.neovim.lazy.live-command = {
|
||||||
|
package = "smjonas/live-command.nvim";
|
||||||
|
version = "remote"; # https://github.com/smjonas/live-command.nvim/pull/29
|
||||||
|
main = "live-command";
|
||||||
|
|
||||||
|
event = "CmdlineEnter";
|
||||||
|
opts.commands.Norm.cmd = "norm";
|
||||||
|
opts.commands.G.cmd = "g";
|
||||||
|
|
||||||
|
keys = {
|
||||||
|
mode = "v";
|
||||||
|
mapping = "N";
|
||||||
|
action = ":Norm ";
|
||||||
|
desc = "Map lines in [n]ormal mode";
|
||||||
|
};
|
||||||
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ editing
|
# {{{ fidget
|
||||||
# {{{ text navigation
|
satellite.neovim.lazy.fidget = {
|
||||||
|
package = "j-hui/fidget.nvim";
|
||||||
|
tag = "legacy";
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
event = "BufReadPre";
|
||||||
|
setup = true;
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ treesitter
|
||||||
|
satellite.neovim.lazy.treesitter = {
|
||||||
|
# REASON: more grammars
|
||||||
|
dir = upkgs.vimPlugins.nvim-treesitter.withAllGrammars;
|
||||||
|
dependencies.lua = [ "nvim-treesitter/nvim-treesitter-textobjects" ];
|
||||||
|
dependencies.nix = [ pkgs.tree-sitter ];
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
event = "BufReadPost";
|
||||||
|
|
||||||
|
#{{{ Highlighting
|
||||||
|
opts.highlight = {
|
||||||
|
enable = true;
|
||||||
|
disable = [ "kotlin" ]; # This one seemed a bit broken
|
||||||
|
additional_vim_regex_highlighting = false;
|
||||||
|
};
|
||||||
|
#}}}
|
||||||
|
# {{{ Textobjects
|
||||||
|
opts.textobjects = {
|
||||||
|
#{{{ Select
|
||||||
|
select = {
|
||||||
|
enable = true;
|
||||||
|
lookahead = true;
|
||||||
|
keymaps = {
|
||||||
|
# You can use the capture groups defined in textobjects.scm
|
||||||
|
af = "@function.outer";
|
||||||
|
"if" = "@function.inner";
|
||||||
|
ac = "@class.outer";
|
||||||
|
ic = "@class.inner";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#}}}
|
||||||
|
#{{{ Move
|
||||||
|
move = {
|
||||||
|
enable = true;
|
||||||
|
set_jumps = true; # whether to set jumps in the jumplist
|
||||||
|
goto_next_start = {
|
||||||
|
"]f" = "@function.outer";
|
||||||
|
"]t" = "@class.outer";
|
||||||
|
};
|
||||||
|
goto_next_end = {
|
||||||
|
"]F" = "@function.outer";
|
||||||
|
"]T" = "@class.outer";
|
||||||
|
};
|
||||||
|
goto_previous_start = {
|
||||||
|
"[f" = "@function.outer";
|
||||||
|
"[t" = "@class.outer";
|
||||||
|
};
|
||||||
|
goto_previous_end = {
|
||||||
|
"[F" = "@function.outer";
|
||||||
|
"[T" = "@class.outer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#}}}
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
opts.indent.enable = true;
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ treesitter context
|
||||||
|
# Show context at the of closing delimiters
|
||||||
|
satellite.neovim.lazy.treesitter-virtual-context = {
|
||||||
|
package = "haringsrob/nvim_context_vt";
|
||||||
|
dependencies.lua = [ lazy.treesitter.name ];
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
event = "BufReadPost";
|
||||||
|
};
|
||||||
|
|
||||||
|
# show context at top of file
|
||||||
|
satellite.neovim.lazy.treesitter-top-context = {
|
||||||
|
package = "nvim-treesitter/nvim-treesitter-context";
|
||||||
|
dependencies.lua = [ lazy.treesitter.name ];
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
event = "BufReadPost";
|
||||||
|
opts.enable = true;
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# }}}
|
||||||
|
# {{{ editing {{{ text navigation
|
||||||
# {{{ flash
|
# {{{ flash
|
||||||
satellite.neovim.lazy.flash = {
|
satellite.neovim.lazy.flash = {
|
||||||
package = "folke/flash.nvim";
|
package = "folke/flash.nvim";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
keys =
|
keys =
|
||||||
let keybind = mode: mapping: action: desc: {
|
let keybind = mode: mapping: action: desc: {
|
||||||
inherit mapping desc mode;
|
inherit mapping desc mode;
|
||||||
|
@ -457,7 +559,7 @@ in
|
||||||
satellite.neovim.lazy.ftft = {
|
satellite.neovim.lazy.ftft = {
|
||||||
package = "gukz/ftFT.nvim";
|
package = "gukz/ftFT.nvim";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
keys = [ "f" "F" "t" "T" ];
|
keys = [ "f" "F" "t" "T" ];
|
||||||
setup = true;
|
setup = true;
|
||||||
};
|
};
|
||||||
|
@ -467,7 +569,7 @@ in
|
||||||
satellite.neovim.lazy.clipboard-image = {
|
satellite.neovim.lazy.clipboard-image = {
|
||||||
package = "postfen/clipboard-image.nvim";
|
package = "postfen/clipboard-image.nvim";
|
||||||
|
|
||||||
env.blacklist = [ "firenvim" ];
|
env.blacklist = "firenvim";
|
||||||
cmd = "PasteImg";
|
cmd = "PasteImg";
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
|
@ -491,7 +593,7 @@ in
|
||||||
satellite.neovim.lazy.lastplace = {
|
satellite.neovim.lazy.lastplace = {
|
||||||
package = "ethanholz/nvim-lastplace";
|
package = "ethanholz/nvim-lastplace";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
event = "BufReadPre";
|
event = "BufReadPre";
|
||||||
|
|
||||||
opts.lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ];
|
opts.lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ];
|
||||||
|
@ -501,7 +603,7 @@ in
|
||||||
satellite.neovim.lazy.undotree = {
|
satellite.neovim.lazy.undotree = {
|
||||||
package = "mbbill/undotree";
|
package = "mbbill/undotree";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
cmd = "UndotreeToggle";
|
cmd = "UndotreeToggle";
|
||||||
keys = {
|
keys = {
|
||||||
mapping = "<leader>u";
|
mapping = "<leader>u";
|
||||||
|
@ -514,7 +616,7 @@ in
|
||||||
satellite.neovim.lazy.ssr = {
|
satellite.neovim.lazy.ssr = {
|
||||||
package = "cshuaimin/ssr.nvim";
|
package = "cshuaimin/ssr.nvim";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
keys = {
|
keys = {
|
||||||
mode = "nx";
|
mode = "nx";
|
||||||
mapping = "<leader>rt";
|
mapping = "<leader>rt";
|
||||||
|
@ -528,10 +630,10 @@ in
|
||||||
# {{{ edit-code-block (edit injections in separate buffers)
|
# {{{ edit-code-block (edit injections in separate buffers)
|
||||||
satellite.neovim.lazy.edit-code-block = {
|
satellite.neovim.lazy.edit-code-block = {
|
||||||
package = "dawsers/edit-code-block.nvim";
|
package = "dawsers/edit-code-block.nvim";
|
||||||
dependencies.lua = [ "nvim-treesitter/nvim-treesitter" ];
|
dependencies.lua = [ lazy.treesitter.name ];
|
||||||
main = "ecb";
|
main = "ecb";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
setup = true;
|
setup = true;
|
||||||
keys = {
|
keys = {
|
||||||
mapping = "<leader>e";
|
mapping = "<leader>e";
|
||||||
|
@ -616,13 +718,63 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ luasnip
|
||||||
|
# snippeting engine
|
||||||
|
satellite.neovim.lazy.luasnip =
|
||||||
|
let reload = /* lua */ ''require("luasnip.loaders.from_vscode").lazy_load()'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
package = "L3MON4D3/LuaSnip";
|
||||||
|
version = "v2";
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
setup.callback = nlib.thunk reload;
|
||||||
|
|
||||||
|
# {{{ Keybinds
|
||||||
|
keys = [
|
||||||
|
{
|
||||||
|
mapping = "<leader>rs";
|
||||||
|
action = nlib.thunk reload;
|
||||||
|
desc = "[R]eload [s]nippets";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "i";
|
||||||
|
expr = true;
|
||||||
|
mapping = "<tab>";
|
||||||
|
action = nlib.thunk /* lua */ ''
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
if not luasnip.jumpable(1) then
|
||||||
|
return "<tab>"
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.schedule(function()
|
||||||
|
luasnip.jump(1)
|
||||||
|
end)
|
||||||
|
|
||||||
|
return "<ignore>"
|
||||||
|
'';
|
||||||
|
desc = "Jump to next snippet tabstop";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "i";
|
||||||
|
mapping = "<s-tab>";
|
||||||
|
action = nlib.thunk /* lua */ ''
|
||||||
|
require("luasnip").jump(-1)
|
||||||
|
'';
|
||||||
|
desc = "Jump to previous snippet tabstop";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
# }}}
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ ide
|
# {{{ ide
|
||||||
# {{{ conform
|
# {{{ conform
|
||||||
satellite.neovim.lazy.conform = {
|
satellite.neovim.lazy.conform = {
|
||||||
package = "stevearc/conform.nvim";
|
package = "stevearc/conform.nvim";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
event = "BufReadPost";
|
event = "BufReadPost";
|
||||||
|
|
||||||
opts.format_on_save.lsp_fallback = true;
|
opts.format_on_save.lsp_fallback = true;
|
||||||
|
@ -654,15 +806,149 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ null-ls
|
||||||
|
satellite.neovim.lazy.null-ls = {
|
||||||
|
package = "jose-elias-alvarez/null-ls.nvim";
|
||||||
|
dependencies.lua = [ "neovim/nvim-lspconfig" ];
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
event = "BufReadPre";
|
||||||
|
|
||||||
|
opts = nlib.thunk /* lua */ ''
|
||||||
|
local p = require("null-ls")
|
||||||
|
return {
|
||||||
|
on_attach = require("my.plugins.lspconfig").on_attach,
|
||||||
|
sources = {
|
||||||
|
p.builtins.diagnostics.ruff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ gitsigns
|
||||||
|
satellite.neovim.lazy.gitsigns = {
|
||||||
|
package = "lewis6991/gitsigns.nvim";
|
||||||
|
|
||||||
|
env.blacklist = [ "vscode" "firenvim" ];
|
||||||
|
event = "BufReadPost";
|
||||||
|
|
||||||
|
opts.on_attach = nlib.tempest {
|
||||||
|
mkContext = /* lua */ ''function(bufnr) return { bufnr = bufnr } end'';
|
||||||
|
keys =
|
||||||
|
let
|
||||||
|
prefix = m: "<leader>h${m}";
|
||||||
|
gs = "package.loaded.gitsigns";
|
||||||
|
|
||||||
|
# {{{ nmap helper
|
||||||
|
nmap = mapping: action: desc: {
|
||||||
|
inherit desc;
|
||||||
|
mapping = prefix "mapping";
|
||||||
|
action = "${gs}.action";
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ exprmap helper
|
||||||
|
exprmap = mapping: action: desc: {
|
||||||
|
inherit mapping desc;
|
||||||
|
action = nlib.thunk /* lua */ ''
|
||||||
|
if vim.wo.diff then
|
||||||
|
return "${mapping}"
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.schedule(function()
|
||||||
|
${gs}.${action}()
|
||||||
|
end)
|
||||||
|
|
||||||
|
return "<ignore>"
|
||||||
|
'';
|
||||||
|
expr = true;
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
in
|
||||||
|
[
|
||||||
|
# {{{ navigation
|
||||||
|
(exprmap "]c" "next_hunk" "Navigate to next hunk")
|
||||||
|
(exprmap "[c" "prev_hunk" "Navigate to previous hunk")
|
||||||
|
# }}}
|
||||||
|
# {{{ actions
|
||||||
|
(nmap "s" "stage_hunk" "[s]tage hunk")
|
||||||
|
(nmap "r" "reset_hunk" "[s]tage hunk")
|
||||||
|
(nmap "S" "stage_buffer" "[s]tage hunk")
|
||||||
|
(nmap "u" "undo_stage_hunk" "[s]tage hunk")
|
||||||
|
(nmap "R" "reset_buffer" "[s]tage hunk")
|
||||||
|
(nmap "p" "preview_hunk" "[s]tage hunk")
|
||||||
|
(nmap "d" "diffthis" "[s]tage hunk")
|
||||||
|
{
|
||||||
|
mapping = prefix "D";
|
||||||
|
action = nlib.thunk ''
|
||||||
|
${gs}.diffthis("~")
|
||||||
|
'';
|
||||||
|
desc = "[d]iff file (?)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mapping = prefix "b";
|
||||||
|
action = nlib.thunk ''
|
||||||
|
${gs}.blame_line({ full = true })
|
||||||
|
'';
|
||||||
|
desc = "[b]lame line";
|
||||||
|
}
|
||||||
|
# }}}
|
||||||
|
# {{{ Toggles
|
||||||
|
(nmap "tb" "toggle_current_line_blame" "[t]oggle line [b]laming")
|
||||||
|
(nmap "td" "toggle_deleted" "[t]oggle [d]eleted")
|
||||||
|
# }}}
|
||||||
|
# {{{ visual mappings
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
mapping = prefix "s";
|
||||||
|
action = nlib.thunk /* lua */ ''
|
||||||
|
${gs}.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||||
|
'';
|
||||||
|
desc = "stage visual hunk";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
mapping = prefix "r";
|
||||||
|
action = nlib.thunk /* lua */ ''
|
||||||
|
${gs}.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||||
|
'';
|
||||||
|
desc = "reset visual hunk";
|
||||||
|
}
|
||||||
|
# }}}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ cmp
|
||||||
|
satellite.neovim.lazy.cmp = {
|
||||||
|
package = "hrsh7th/nvim-cmp";
|
||||||
|
dependencies.lua = [
|
||||||
|
# {{{ Completion sources
|
||||||
|
"hrsh7th/cmp-nvim-lsp"
|
||||||
|
"hrsh7th/cmp-buffer"
|
||||||
|
"hrsh7th/cmp-emoji"
|
||||||
|
"hrsh7th/cmp-cmdline"
|
||||||
|
"hrsh7th/cmp-path"
|
||||||
|
"saadparwaiz1/cmp_luasnip"
|
||||||
|
"dmitmel/cmp-digraphs"
|
||||||
|
# }}}
|
||||||
|
"onsails/lspkind.nvim" # show icons in lsp completion menus
|
||||||
|
lazy.luasnip.package
|
||||||
|
];
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
event = [ "InsertEnter" "CmdlineEnter" ];
|
||||||
|
setup = (nlib.import ./plugins/cmp.lua "config").value;
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ language support
|
# {{{ language support
|
||||||
# {{{ haskell
|
# {{{ haskell support
|
||||||
satellite.neovim.lazy.haskell-tools = {
|
satellite.neovim.lazy.haskell-tools = {
|
||||||
package = "mrcjkb/haskell-tools.nvim";
|
package = "mrcjkb/haskell-tools.nvim";
|
||||||
dependencies.lua = [ lazy.plenary.package ];
|
dependencies.lua = [ lazy.plenary.package ];
|
||||||
version = "^2";
|
version = "^2";
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
ft = [ "haskell" "lhaskell" "cabal" "cabalproject" ];
|
ft = [ "haskell" "lhaskell" "cabal" "cabalproject" ];
|
||||||
|
|
||||||
setup.vim.g.haskell_tools = {
|
setup.vim.g.haskell_tools = {
|
||||||
|
@ -682,13 +968,13 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ rust
|
# {{{ rust support
|
||||||
# {{{ rust-tools
|
# {{{ rust-tools
|
||||||
satellite.neovim.lazy.rust-tools = {
|
satellite.neovim.lazy.rust-tools = {
|
||||||
package = "simrat39/rust-tools.nvim";
|
package = "simrat39/rust-tools.nvim";
|
||||||
dependencies.nix = [ pkgs.rust-analyzer pkgs.rustfmt ];
|
dependencies.nix = [ pkgs.rust-analyzer pkgs.rustfmt ];
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
ft = "rust";
|
ft = "rust";
|
||||||
|
|
||||||
opts.server.on_attach = nlib.languageServerOnAttach {
|
opts.server.on_attach = nlib.languageServerOnAttach {
|
||||||
|
@ -705,7 +991,7 @@ in
|
||||||
package = "saecki/crates.nvim";
|
package = "saecki/crates.nvim";
|
||||||
dependencies.lua = [ lazy.plenary.package ];
|
dependencies.lua = [ lazy.plenary.package ];
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
event = "BufReadPost Cargo.toml";
|
event = "BufReadPost Cargo.toml";
|
||||||
|
|
||||||
# {{{ Set up null_ls source
|
# {{{ Set up null_ls source
|
||||||
|
@ -732,7 +1018,7 @@ in
|
||||||
group = "CargoKeybinds";
|
group = "CargoKeybinds";
|
||||||
pattern = "Cargo.toml";
|
pattern = "Cargo.toml";
|
||||||
# # {{{ Register which-key info
|
# # {{{ Register which-key info
|
||||||
# callback.callback = nlib.contextThunk /* lua */ ''
|
# action.callback = nlib.contextThunk /* lua */ ''
|
||||||
# require("which-key").register({
|
# require("which-key").register({
|
||||||
# ["<leader>lc"] = {
|
# ["<leader>lc"] = {
|
||||||
# name = "[l]ocal [c]rates",
|
# name = "[l]ocal [c]rates",
|
||||||
|
@ -775,17 +1061,16 @@ in
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ lean
|
# {{{ lean support
|
||||||
satellite.neovim.lazy.lean = {
|
satellite.neovim.lazy.lean = {
|
||||||
package = "Julian/lean.nvim";
|
package = "Julian/lean.nvim";
|
||||||
name = "lean";
|
name = "lean";
|
||||||
dependencies.lua = [
|
dependencies.lua = [
|
||||||
lazy.plenary.package
|
lazy.plenary.package
|
||||||
"neovim/nvim-lspconfig"
|
"neovim/nvim-lspconfig"
|
||||||
"hrsh7th/nvim-cmp"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
ft = "lean";
|
ft = "lean";
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
|
@ -804,7 +1089,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ idris
|
# {{{ idris support
|
||||||
satellite.neovim.lazy.idris = {
|
satellite.neovim.lazy.idris = {
|
||||||
package = "ShinKage/idris2-nvim";
|
package = "ShinKage/idris2-nvim";
|
||||||
name = "idris";
|
name = "idris";
|
||||||
|
@ -813,7 +1098,7 @@ in
|
||||||
"neovim/nvim-lspconfig"
|
"neovim/nvim-lspconfig"
|
||||||
];
|
];
|
||||||
|
|
||||||
env.blacklist = [ "vscode" ];
|
env.blacklist = "vscode";
|
||||||
ft = [ "idris2" "lidris2" "ipkg" ];
|
ft = [ "idris2" "lidris2" "ipkg" ];
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
|
@ -841,6 +1126,38 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ github actions
|
||||||
|
satellite.neovim.lazy.github-actions = {
|
||||||
|
package = "yasuhiroki/github-actions-yaml.vim";
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
ft = [ "yml" "yaml" ];
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ typst support
|
||||||
|
satellite.neovim.lazy.typst = {
|
||||||
|
package = "kaarmu/typst.vim";
|
||||||
|
dependencies.nix = [ pkgs.typst-lsp pkgs.typst-fmt ];
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
ft = "typst";
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ hyprland
|
||||||
|
satellite.neovim.lazy.hyprland = {
|
||||||
|
package = "theRealCarneiro/hyprland-vim-syntax";
|
||||||
|
|
||||||
|
env.blacklist = "vscode";
|
||||||
|
ft = "hypr";
|
||||||
|
|
||||||
|
setup.autocmds = {
|
||||||
|
event = "BufRead";
|
||||||
|
group = "DetectHyprlandConfig";
|
||||||
|
pattern = "hyprland.conf";
|
||||||
|
action.vim.opt.ft = "hypr";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ external
|
# {{{ external
|
||||||
# These plugins integrate neovim with external services
|
# These plugins integrate neovim with external services
|
||||||
|
|
88
home/features/neovim/plugins/cmp.lua
Normal file
88
home/features/neovim/plugins/cmp.lua
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local opts = {
|
||||||
|
-- {{{ window
|
||||||
|
window = {
|
||||||
|
documentation = cmp.config.window.bordered(),
|
||||||
|
completion = cmp.config.window.bordered({
|
||||||
|
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
|
||||||
|
col_offset = -3,
|
||||||
|
side_padding = 0,
|
||||||
|
completeopt = "menu,menuone,noinsert",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
-- }}}
|
||||||
|
-- {{{ formatting
|
||||||
|
formatting = {
|
||||||
|
fields = { "kind", "abbr", "menu" },
|
||||||
|
format = require("lspkind").cmp_format({
|
||||||
|
mode = "symbol",
|
||||||
|
maxwidth = 50,
|
||||||
|
symbol_map = {
|
||||||
|
Text = " ",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
-- }}}
|
||||||
|
-- {{{ snippet
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- }}}
|
||||||
|
-- {{{ mappings
|
||||||
|
mapping = {
|
||||||
|
["<C-d>"] = cmp.mapping(function()
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
else
|
||||||
|
cmp.complete()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<C-s>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
-- `select` makes it so this also works if no completions have been selected
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
},
|
||||||
|
-- }}}
|
||||||
|
-- {{{ sources
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "buffers" },
|
||||||
|
{ name = "emoji" },
|
||||||
|
{ name = "path" },
|
||||||
|
{ name = "digraphs" },
|
||||||
|
}),
|
||||||
|
-- }}}
|
||||||
|
}
|
||||||
|
|
||||||
|
local searchOpts = {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = {
|
||||||
|
{ name = "buffer" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local cmdlineOpts = {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "path" },
|
||||||
|
{ name = "cmdline" },
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
|
cmp.setup(opts)
|
||||||
|
cmp.setup.cmdline("/", searchOpts)
|
||||||
|
cmp.setup.cmdline(":", cmdlineOpts)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -52,5 +52,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
"return ${config.satellite.lib.lua.encoders.anything theme}";
|
config.satellite.lib.lua.encoders.anything theme;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ let
|
||||||
# This is the most rudimentary (and currently only) way of handling paths.
|
# This is the most rudimentary (and currently only) way of handling paths.
|
||||||
luaImportOr = tag:
|
luaImportOr = tag:
|
||||||
luaEncoders.conditional lib.isPath
|
luaEncoders.conditional lib.isPath
|
||||||
(path: "dofile(${luaEncoders.string path}).${tag}");
|
(path: "dofile(${luaEncoders.string "${path}"}).${tag}");
|
||||||
# Accepts both tagged and untagged strings of lua code.
|
# Accepts both tagged and untagged strings of lua code.
|
||||||
luaString = luaEncoders.luaCodeOr luaEncoders.identity;
|
luaString = luaEncoders.luaCodeOr luaEncoders.identity;
|
||||||
# This simply combines the above combinators into one.
|
# This simply combines the above combinators into one.
|
||||||
|
@ -82,6 +82,7 @@ let
|
||||||
if l == "nil" then r
|
if l == "nil" then r
|
||||||
else if r == "nil" then l
|
else if r == "nil" then l
|
||||||
else "${l} and ${r}";
|
else "${l} and ${r}";
|
||||||
|
all = lib.foldr luaEncoders.conjunction luaEncoders.nil;
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Lists
|
# {{{ Lists
|
||||||
listOf = encoder: list:
|
listOf = encoder: list:
|
||||||
|
@ -113,9 +114,12 @@ let
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Attrsets
|
# {{{ Attrsets
|
||||||
attrName = s:
|
attrName = s:
|
||||||
let forbiddenChars = lib.stringToCharacters "<>'\".,;"; # This list *is* incomplete
|
let
|
||||||
|
# These list *are* incomplete
|
||||||
|
forbiddenChars = lib.stringToCharacters "<>[]{}()'\".,;";
|
||||||
|
keywords = [ "if" "then" "else" "do" "for" "local" "" ];
|
||||||
in
|
in
|
||||||
if lib.any (c: lib.hasInfix c s) forbiddenChars then
|
if lib.any (c: lib.hasInfix c s) forbiddenChars || lib.elem s keywords then
|
||||||
"[${luaEncoders.string s}]"
|
"[${luaEncoders.string s}]"
|
||||||
else s;
|
else s;
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,12 @@ let
|
||||||
oneOrMany = t: types.either t (types.listOf t);
|
oneOrMany = t: types.either t (types.listOf t);
|
||||||
zeroOrMore = t: types.nullOr (myTypes.oneOrMany t);
|
zeroOrMore = t: types.nullOr (myTypes.oneOrMany t);
|
||||||
|
|
||||||
|
neovimEnv = types.enum [ "firenvim" "vscode" "neovide" ];
|
||||||
|
|
||||||
# {{{ Lua code
|
# {{{ Lua code
|
||||||
luaCode = types.nullOr (types.oneOf [
|
luaCode = types.nullOr (types.oneOf [
|
||||||
types.str
|
|
||||||
types.path
|
types.path
|
||||||
|
types.str
|
||||||
myTypes.luaLiteral
|
myTypes.luaLiteral
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -41,36 +43,46 @@ let
|
||||||
types.str
|
types.str
|
||||||
(types.submodule
|
(types.submodule
|
||||||
{
|
{
|
||||||
options.mapping = lib.mkOption {
|
options = {
|
||||||
type = types.str;
|
mapping = lib.mkOption {
|
||||||
description = "The lhs of the neovim mapping";
|
type = types.str;
|
||||||
};
|
description = "The lhs of the neovim mapping";
|
||||||
|
};
|
||||||
|
|
||||||
options.action = lib.mkOption {
|
action = lib.mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr (types.oneOf [
|
type = types.nullOr (types.oneOf [
|
||||||
types.str
|
types.str
|
||||||
myTypes.luaLiteral
|
myTypes.luaLiteral
|
||||||
]);
|
]);
|
||||||
description = "The rhs of the neovim mapping";
|
description = "The rhs of the neovim mapping";
|
||||||
};
|
};
|
||||||
|
|
||||||
options.ft = lib.mkOption {
|
ft = lib.mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = myTypes.zeroOrMore types.str;
|
type = myTypes.zeroOrMore types.str;
|
||||||
description = "Filetypes on which this keybind should take effect";
|
description = "Filetypes on which this keybind should take effect";
|
||||||
};
|
};
|
||||||
|
|
||||||
options.mode = lib.mkOption {
|
mode = lib.mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
description = "The vim modes the mapping should take effect in";
|
description = "The vim modes the mapping should take effect in";
|
||||||
};
|
};
|
||||||
|
|
||||||
options.desc = lib.mkOption {
|
desc = lib.mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
description = "Description for the current keymapping";
|
description = "Description for the current keymapping";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
expr = lib.mkOption {
|
||||||
|
default = null;
|
||||||
|
example = true;
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
description = "If set to `true`, the mapping is treated as an action factory";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
@ -282,11 +294,17 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
env.blacklist = lib.mkOption {
|
env.blacklist = lib.mkOption {
|
||||||
default = [ ];
|
default = null;
|
||||||
type = types.listOf (types.enum [ "firenvim" "vscode" "neovide" ]);
|
type = myTypes.zeroOrMore myTypes.neovimEnv;
|
||||||
description = "Environments to blacklist plugin on";
|
description = "Environments to blacklist plugin on";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
env.whitelist = lib.mkOption {
|
||||||
|
default = null;
|
||||||
|
type = myTypes.zeroOrMore myTypes.neovimEnv;
|
||||||
|
description = "Environments to whitelist plugin on";
|
||||||
|
};
|
||||||
|
|
||||||
setup = lib.mkOption {
|
setup = lib.mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr (types.oneOf [
|
type = types.nullOr (types.oneOf [
|
||||||
|
@ -403,7 +421,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
import = lib.mkOption {
|
import = lib.mkOption {
|
||||||
default = path: tag: cfg.lib.lua "dofile(${e.string path}).${tag}";
|
default = path: tag: cfg.lib.lua (e.luaCode tag path);
|
||||||
type = types.functionTo (types.functionTo myTypes.luaLiteral);
|
type = types.functionTo (types.functionTo myTypes.luaLiteral);
|
||||||
description = "import some identifier from some module";
|
description = "import some identifier from some module";
|
||||||
};
|
};
|
||||||
|
@ -439,6 +457,7 @@ in
|
||||||
cfg.lib.encodeTempestConfiguration
|
cfg.lib.encodeTempestConfiguration
|
||||||
e.luaString;
|
e.luaString;
|
||||||
});
|
});
|
||||||
|
mk_context = e.const (e.nullOr e.luaString (given.mkContext or null));
|
||||||
}
|
}
|
||||||
given;
|
given;
|
||||||
type = types.functionTo types.str;
|
type = types.functionTo types.str;
|
||||||
|
@ -463,7 +482,6 @@ in
|
||||||
description = "Wrap a lua expression into a lua function";
|
description = "Wrap a lua expression into a lua function";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
contextThunk = lib.mkOption {
|
contextThunk = lib.mkOption {
|
||||||
default = given: cfg.lib.lua /* lua */ ''
|
default = given: cfg.lib.lua /* lua */ ''
|
||||||
function(context) ${e.luaString given} end
|
function(context) ${e.luaString given} end
|
||||||
|
@ -471,6 +489,31 @@ in
|
||||||
type = types.functionTo myTypes.luaLiteral;
|
type = types.functionTo myTypes.luaLiteral;
|
||||||
description = "Wrap a lua expression into a lua function taking an argument named `context`";
|
description = "Wrap a lua expression into a lua function taking an argument named `context`";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lazy = lib.mkOption {
|
||||||
|
default = given: cfg.lib.thunk "return ${e.luaCodeOr e.anything given}";
|
||||||
|
type = types.functionTo myTypes.luaLiteral;
|
||||||
|
description = "Wrap a lua expression into a function returning said expression";
|
||||||
|
};
|
||||||
|
|
||||||
|
withContext = lib.mkOption {
|
||||||
|
default = given: cfg.lib.contextThunk "return ${e.luaCodeOr e.anything given}";
|
||||||
|
type = types.functionTo myTypes.luaLiteral;
|
||||||
|
description = "Wrap a lua expression into a lua function taking an argument named `context` and returning said expression";
|
||||||
|
};
|
||||||
|
|
||||||
|
tempest = lib.mkOption {
|
||||||
|
default = given: cfg.lib.lua /* lua */ ''
|
||||||
|
function(context)
|
||||||
|
require(${e.string cfg.runtime.tempest}).configure(
|
||||||
|
${cfg.lib.encodeTempestConfiguration given},
|
||||||
|
context
|
||||||
|
)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
type = types.functionTo myTypes.luaLiteral;
|
||||||
|
description = "Wrap a lua expression into a lua function taking an argument named `context`";
|
||||||
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Language server on attach
|
# {{{ Language server on attach
|
||||||
languageServerOnAttach = lib.mkOption {
|
languageServerOnAttach = lib.mkOption {
|
||||||
|
@ -490,12 +533,6 @@ in
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Neovim runtime module paths
|
# {{{ Neovim runtime module paths
|
||||||
runtime = {
|
runtime = {
|
||||||
env = lib.mkOption {
|
|
||||||
type = types.str;
|
|
||||||
example = "my.helpers.env";
|
|
||||||
description = "Module to import env flags from";
|
|
||||||
};
|
|
||||||
|
|
||||||
tempest = lib.mkOption {
|
tempest = lib.mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = "my.runtime.tempest";
|
example = "my.runtime.tempest";
|
||||||
|
@ -525,6 +562,7 @@ in
|
||||||
lib.strings.stringToCharacters
|
lib.strings.stringToCharacters
|
||||||
(e.listAsOneOrMany e.string));
|
(e.listAsOneOrMany e.string));
|
||||||
desc = e.nullOr e.string;
|
desc = e.nullOr e.string;
|
||||||
|
expr = e.nullOr e.bool;
|
||||||
ft = e.zeroOrMany e.string;
|
ft = e.zeroOrMany e.string;
|
||||||
});
|
});
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -546,19 +584,23 @@ in
|
||||||
main = e.nullOr e.string;
|
main = e.nullOr e.string;
|
||||||
dependencies = e.map (d: d.lua) (e.tryNonemptyList (e.stringOr lazyObjectEncoder));
|
dependencies = e.map (d: d.lua) (e.tryNonemptyList (e.stringOr lazyObjectEncoder));
|
||||||
lazy = e.nullOr e.bool;
|
lazy = e.nullOr e.bool;
|
||||||
cond = e.conjunction
|
cond = e.all [
|
||||||
(e.nullOr (e.luaCode "cond"))
|
(e.nullOr (e.luaCode "cond"))
|
||||||
(e.filter (_: opts.env.blacklist != [ ])
|
(e.filter (_: opts.env.blacklist != [ ] && opts.env.blacklist != null)
|
||||||
(e.const /* lua */ ''
|
(e.const /* lua */ ''
|
||||||
require(${e.string cfg.runtime.env}).blacklist(${e.listOf e.string opts.env.blacklist})
|
require(${e.string cfg.runtime.tempest}).blacklist(${e.oneOrMany e.string opts.env.blacklist})
|
||||||
''));
|
''))
|
||||||
|
(e.filter (_: opts.env.whitelist != [ ] && opts.env.whitelist != null)
|
||||||
|
(e.const /* lua */ ''
|
||||||
|
require(${e.string cfg.runtime.tempest}).whitelist(${e.oneOrMany e.string opts.env.blacklist})
|
||||||
|
''))
|
||||||
|
];
|
||||||
|
|
||||||
config = _:
|
config = _:
|
||||||
let
|
let
|
||||||
wrap = given: /* lua */''
|
wrap = given: /* lua */''
|
||||||
function(lazy, opts)
|
function(lazy, opts)
|
||||||
require(${e.string cfg.runtime.tempest}).configure(${given},
|
require(${e.string cfg.runtime.tempest}).lazy(lazy, opts, ${given})
|
||||||
{ lazy = lazy; opts = opts; })
|
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue