mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-14 09:25:30 +00:00
Merge branch 'main' into catppuccin-lspsaga-integration
This commit is contained in:
commit
762e031a67
8 changed files with 319 additions and 216 deletions
|
|
@ -22,7 +22,7 @@
|
|||
package = pkgs.astro-language-server;
|
||||
lspConfig = ''
|
||||
lspconfig.astro.setup {
|
||||
capabilities = capabilities;
|
||||
capabilities = capabilities,
|
||||
on_attach = attach_keymaps,
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
|
|
@ -41,6 +41,10 @@
|
|||
package = pkgs.nodePackages.prettier;
|
||||
};
|
||||
|
||||
prettierd = {
|
||||
package = pkgs.prettierd;
|
||||
};
|
||||
|
||||
biome = {
|
||||
package = pkgs.biome;
|
||||
};
|
||||
|
|
@ -84,16 +88,16 @@ in {
|
|||
enable = mkEnableOption "Astro LSP support" // {default = config.vim.languages.enableLSP;};
|
||||
|
||||
server = mkOption {
|
||||
description = "Astro LSP server to use";
|
||||
type = enum (attrNames servers);
|
||||
default = defaultServer;
|
||||
description = "Astro LSP server to use";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
description = "Astro LSP server package, or the command to run as a list of strings";
|
||||
example = ''[lib.getExe pkgs.astro-language-server "--minify" "--stdio"]'';
|
||||
type = either package (listOf str);
|
||||
default = servers.${cfg.lsp.server}.package;
|
||||
example = ''[lib.getExe pkgs.astro-language-server "--minify" "--stdio"]'';
|
||||
description = "Astro LSP server package, or the command to run as a list of strings";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./flash
|
||||
./hop
|
||||
./leap
|
||||
./precognition
|
||||
|
|
|
|||
34
modules/plugins/utility/motion/flash/config.nix
Normal file
34
modules/plugins/utility/motion/flash/config.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.binds) mkKeymap;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.utility.motion.flash-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
lazy.plugins = {
|
||||
"flash-nvim" = {
|
||||
package = "flash-nvim";
|
||||
setupModule = "flash";
|
||||
setupOpts = cfg.setupOpts;
|
||||
|
||||
lazy = true;
|
||||
|
||||
keys = [
|
||||
(mkKeymap ["n" "o" "x"] cfg.mappings.jump "<cmd>lua require(\"flash\").jump()<cr>" {desc = "Flash";})
|
||||
(mkKeymap ["n" "o" "x"] cfg.mappings.treesitter "<cmd>lua require(\"flash\").treesitter()<cr>" {desc = "Flash Treesitter";})
|
||||
(mkKeymap "o" cfg.mappings.remote "<cmd>lua require(\"flash\").remote()<cr>" {desc = "Remote Flash";})
|
||||
(mkKeymap ["o" "x"] cfg.mappings.treesitter_search "<cmd>lua require(\"flash\").treesitter_search()<cr>" {desc = "Treesitter Search";})
|
||||
(mkKeymap "c" cfg.mappings.toggle "<cmd>lua require(\"flash\").toggle()<cr>" {desc = "Toggle Flash Search";})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/motion/flash/default.nix
Normal file
6
modules/plugins/utility/motion/flash/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./flash.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
38
modules/plugins/utility/motion/flash/flash.nix
Normal file
38
modules/plugins/utility/motion/flash/flash.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) nullOr str;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.utility.motion.flash-nvim = {
|
||||
enable = mkEnableOption "enhanced code navigation with flash.nvim";
|
||||
setupOpts = mkPluginSetupOption "flash-nvim" {};
|
||||
|
||||
mappings = {
|
||||
jump = mkOption {
|
||||
type = nullOr str;
|
||||
default = "s";
|
||||
description = "Jump";
|
||||
};
|
||||
treesitter = mkOption {
|
||||
type = nullOr str;
|
||||
default = "S";
|
||||
description = "Treesitter";
|
||||
};
|
||||
remote = mkOption {
|
||||
type = nullOr str;
|
||||
default = "r";
|
||||
description = "Remote Flash";
|
||||
};
|
||||
treesitter_search = mkOption {
|
||||
type = nullOr str;
|
||||
default = "R";
|
||||
description = "Treesitter Search";
|
||||
};
|
||||
toggle = mkOption {
|
||||
type = nullOr str;
|
||||
default = "<c-s>";
|
||||
description = "Toggle Flash Search";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["oil-nvim"];
|
||||
pluginRC.snacks-nvim = entryAnywhere ''
|
||||
pluginRC.oil-nvim = entryAnywhere ''
|
||||
require("oil").setup(${toLuaObject cfg.setupOpts});
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue