Merge branch 'main' into main

This commit is contained in:
Farouk Brown 2025-05-03 18:04:20 +01:00 committed by GitHub
commit e946799757
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 317 additions and 108 deletions

View file

@ -81,9 +81,11 @@ in {
(mkIf cfg.codeActions.enable {
vim.lsp.null-ls = {
enable = true;
setupOpts.sources.gitsigns-ca = mkLuaInline ''
require("null-ls").builtins.code_actions.gitsigns
'';
setupOpts.sources = [
(mkLuaInline ''
require("null-ls").builtins.code_actions.gitsigns
'')
];
};
})
]);

View file

@ -1,4 +1,8 @@
{lib, ...}: let
{
config,
lib,
...
}: let
inherit (lib.nvim.languages) mkEnable;
in {
imports = [
@ -47,7 +51,11 @@ in {
];
options.vim.languages = {
enableLSP = mkEnable "LSP";
# LSPs are now built into Neovim, and we should enable them by default
# if `vim.lsp.enable` is true.
enableLSP = mkEnable "LSP" // {default = config.vim.lsp.enable;};
# Those are still managed by plugins, and should be enabled here.
enableDAP = mkEnable "Debug Adapter";
enableTreesitter = mkEnable "Treesitter";
enableFormat = mkEnable "Formatting";

View file

@ -2,5 +2,6 @@ _: {
imports = [
./which-key
./cheatsheet
./hardtime
];
}

View file

@ -0,0 +1,21 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.binds.hardtime-nvim;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["hardtime-nvim"];
pluginRC.hardtime = entryAnywhere ''
require("hardtime").setup (${toLuaObject cfg.setupOpts})
'';
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./hardtime.nix
./config.nix
];
}

View file

@ -0,0 +1,10 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.binds.hardtime-nvim = {
enable = mkEnableOption "hardtime helper for no repeat keybinds";
setupOpts = mkPluginSetupOption "hardtime-nvim" {};
};
}