mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-09 03:56:11 +00:00
Merge branch 'main' into feat/gettext
This commit is contained in:
commit
c5a9c578ba
8 changed files with 486 additions and 446 deletions
|
|
@ -13,6 +13,9 @@ isMaximal: {
|
|||
logFile = "/tmp/nvim.log";
|
||||
};
|
||||
|
||||
# vim.opts and vim.options are aliased
|
||||
opts.expandtab = true;
|
||||
|
||||
spellcheck = {
|
||||
enable = true;
|
||||
programmingWordlist.enable = isMaximal;
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "blink-cmp";
|
||||
version = "1.9.1";
|
||||
version = "1.10.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Saghen";
|
||||
repo = "blink.cmp";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-GgodXdWpQoF2z1g1/WvnSpfuhskw0aMcOoyZM5l66q8=";
|
||||
hash = "sha256-y8f+bmPkb3M6DzcUkJMxd2woDLoBYslne7aB8A0ejCk=";
|
||||
};
|
||||
|
||||
forceShare = [
|
||||
|
|
@ -39,18 +39,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
# From the blink.cmp flake
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isAarch64 [rust-jemalloc-sys];
|
||||
|
||||
# NOTE: The only change in frizbee 0.7.0 was nixpkgs incompatible rust semantic changes
|
||||
# Patch just reverts https://github.com/saghen/blink.cmp/commit/cc824ec85b789a54d05241389993c6ab8c040810
|
||||
# Taken from Nixpkgs' blink.cmp derivation, available under the MIT license
|
||||
cargoPatches = [
|
||||
./patches/0001-pin-frizbee.patch
|
||||
];
|
||||
|
||||
cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs=";
|
||||
cargoHash = "sha256-3o2n4xwNF9Fc3VlPKf3lnvmN7FVus5jQB8gcXXwz50c=";
|
||||
|
||||
env = {
|
||||
RUSTC_BOOTSTRAP = true;
|
||||
|
||||
# Those are the Linker args used by upstream. Without those, the build fails.
|
||||
# See:
|
||||
# <https://github.com/saghen/blink.cmp/blob/main/.cargo/config.toml#L1C1-L11C2>
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ in
|
|||
sha256 = pin.hash;
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-D+gDdKiIG38jV+M/BqTKf0yYj1KXpbIodtQFdzocpn8=";
|
||||
npmDepsHash = "sha256-XVyLW0XDCvZCZxu8g1fP7fRfeU3Hz81o5FCi/i4BKQw=";
|
||||
})
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# Alias vim.options as vim.opts.
|
||||
# This is a convenience for people using frameworks like flake-parts or Den that use lib.types.deferredModule
|
||||
# and users would set `vim.options` but error when Nix confuses it with Nix Module's options-definitions.
|
||||
imports = [(lib.mkAliasOptionModule ["vim" "opts"] ["vim" "options"])];
|
||||
|
||||
config.vim = {
|
||||
# Set options that were previously interpolated in 'luaConfigRC.basic' as vim.options (vim.o)
|
||||
# and 'vim.globals' (vim.g). Future options, if possible, should be added here instead of the
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.binds) pushDownDefault;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notes.neorg;
|
||||
in {
|
||||
|
|
@ -19,17 +17,21 @@ in {
|
|||
"nvim-nio"
|
||||
"pathlib-nvim"
|
||||
"plenary-nvim"
|
||||
"neorg"
|
||||
"neorg-telescope"
|
||||
];
|
||||
|
||||
lazy.plugins.neorg = {
|
||||
package = "neorg";
|
||||
setupModule = "neorg";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
ft = ["norg"];
|
||||
cmd = ["Neorg"];
|
||||
};
|
||||
|
||||
binds.whichKey.register = pushDownDefault {
|
||||
"<leader>o" = "+Notes";
|
||||
};
|
||||
|
||||
pluginRC.neorg = entryAnywhere ''
|
||||
require('neorg').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,22 +5,32 @@
|
|||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notes.obsidian;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"obsidian-nvim"
|
||||
"vim-markdown"
|
||||
"tabular"
|
||||
"plenary-nvim"
|
||||
];
|
||||
|
||||
pluginRC.obsidian = entryAnywhere ''
|
||||
require("obsidian").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
lazy.plugins.obsidian-nvim = {
|
||||
package = "obsidian-nvim";
|
||||
# NOTE: packaged plugin directory is `obsidian.nvim`; loading by the
|
||||
# spec key (`obsidian-nvim`) misses and makes `require("obsidian")`
|
||||
# resolve to a loader function via lzn-auto-require.
|
||||
# I don't love this, but I can't think of anything better
|
||||
load = ''
|
||||
vim.cmd.packadd("obsidian.nvim")
|
||||
'';
|
||||
setupModule = "obsidian";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
ft = ["markdown"];
|
||||
cmd = ["Obsidian"];
|
||||
};
|
||||
|
||||
notes.obsidian.setupOpts = let
|
||||
# may not be defined
|
||||
|
|
|
|||
|
|
@ -14,6 +14,32 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [pkgs.vimPlugins.conjure];
|
||||
vim.lazy.plugins.conjure = {
|
||||
package = pkgs.vimPlugins.conjure;
|
||||
ft = [
|
||||
"clojure"
|
||||
"fennel"
|
||||
"janet"
|
||||
"hy"
|
||||
"julia"
|
||||
"racket"
|
||||
"scheme"
|
||||
"lua"
|
||||
"lisp"
|
||||
"python"
|
||||
"rust"
|
||||
"sql"
|
||||
"javascript"
|
||||
"typescript"
|
||||
"php"
|
||||
"r"
|
||||
];
|
||||
cmd = [
|
||||
"ConjureSchool"
|
||||
"ConjureEval"
|
||||
"ConjureConnect"
|
||||
"ConjureClientState"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue