Merge branch 'main' into diniamo-moment
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled

This commit is contained in:
raf 2025-01-10 17:23:29 +03:00 committed by GitHub
commit 4aa183d734
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 215 additions and 99 deletions

View file

@ -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 = ''

View file

@ -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;

View file

@ -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')"}