mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
Merge branch 'main' into diniamo-moment
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled
This commit is contained in:
commit
4aa183d734
8 changed files with 215 additions and 99 deletions
|
@ -26,22 +26,6 @@
|
|||
then expToLua package
|
||||
else ''{"${package}/bin/${defaultCmd}"}'';
|
||||
servers = {
|
||||
rnix = {
|
||||
package = pkgs.rnix-lsp;
|
||||
internalFormatter = cfg.format.type == "nixpkgs-fmt";
|
||||
lspConfig = ''
|
||||
lspconfig.rnix.setup{
|
||||
capabilities = capabilities,
|
||||
${
|
||||
if (cfg.format.enable && cfg.format.type == "nixpkgs-fmt")
|
||||
then useFormat
|
||||
else noFormat
|
||||
},
|
||||
cmd = ${packageToCmd cfg.lsp.package "rnix-lsp"},
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
nil = {
|
||||
package = pkgs.nil;
|
||||
internalFormatter = true;
|
||||
|
@ -165,6 +149,7 @@ in {
|
|||
type = enum (attrNames formats);
|
||||
default = defaultFormat;
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
description = "Nix formatter package";
|
||||
type = package;
|
||||
|
@ -188,7 +173,18 @@ in {
|
|||
assertions = [
|
||||
{
|
||||
assertion = cfg.format.type != "nixpkgs-fmt";
|
||||
message = "nixpkgs-fmt has been archived upstream. Please use one of the following instead: ${concatStringsSep ", " (attrNames formats)}";
|
||||
message = ''
|
||||
nixpkgs-fmt has been archived upstream. Please use one of the following available formatters:
|
||||
${concatStringsSep ", " (attrNames formats)}
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
assertion = cfg.lsp.server != "rnix";
|
||||
message = ''
|
||||
rnix-lsp has been archived upstream. Please use one of the following available language servers:
|
||||
${concatStringsSep ", " (attrNames servers)}
|
||||
'';
|
||||
}
|
||||
];
|
||||
vim.pluginRC.nix = ''
|
||||
|
|
|
@ -24,12 +24,6 @@ in {
|
|||
enable = mkEnableOption "complementary neovim plugins for Obsidian editor";
|
||||
|
||||
setupOpts = mkPluginSetupOption "Obsidian.nvim" {
|
||||
dir = mkOption {
|
||||
type = str;
|
||||
default = "~/my-vault";
|
||||
description = "Obsidian vault directory";
|
||||
};
|
||||
|
||||
daily_notes = {
|
||||
folder = mkOption {
|
||||
type = nullOr str;
|
||||
|
|
|
@ -22,6 +22,12 @@ in {
|
|||
package = "telescope";
|
||||
setupModule = "telescope";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
# HACK: workaround until https://github.com/NotAShelf/nvf/issues/535 gets resolved
|
||||
before = ''
|
||||
vim.g.loaded_telescope = nil
|
||||
'';
|
||||
|
||||
after = ''
|
||||
local telescope = require("telescope")
|
||||
${optionalString config.vim.ui.noice.enable "telescope.load_extension('noice')"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue