mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
neorg: init (#413)
* neorg: init * neorg: setupOpts work * neorg: disable by default * neorg: added changelog entry * neorg: setupOpts setup correctly * neorg: sane default for setupOpts * neorg: changed description and removed reduntant treesitter activation * neorg: added vim.treesitter.enable * neorg: fixing capitalisation * neorg: adding descriptions * neorg: formatting * neorg: added newline at the end of docs
This commit is contained in:
parent
94d2b837cf
commit
a7e0542fd0
8 changed files with 189 additions and 0 deletions
|
@ -174,6 +174,7 @@ isMaximal: {
|
||||||
|
|
||||||
notes = {
|
notes = {
|
||||||
obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled
|
obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled
|
||||||
|
neorg.enable = false;
|
||||||
orgmode.enable = false;
|
orgmode.enable = false;
|
||||||
mind-nvim.enable = isMaximal;
|
mind-nvim.enable = isMaximal;
|
||||||
todo-comments.enable = true;
|
todo-comments.enable = true;
|
||||||
|
|
|
@ -262,6 +262,7 @@ everyone.
|
||||||
- Add LSP and Treesitter support for R under `vim.languages.R`.
|
- Add LSP and Treesitter support for R under `vim.languages.R`.
|
||||||
- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
|
- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
|
||||||
ccc
|
ccc
|
||||||
|
- Add Neorg support under `vim.notes.neorg`
|
||||||
- Add LSP, diagnostics, formatter and Treesitter support for Kotlin under
|
- Add LSP, diagnostics, formatter and Treesitter support for Kotlin under
|
||||||
`vim.languages.kotlin`
|
`vim.languages.kotlin`
|
||||||
- changed default keybinds for leap.nvim to avoid altering expected behavior
|
- changed default keybinds for leap.nvim to avoid altering expected behavior
|
||||||
|
@ -276,3 +277,4 @@ everyone.
|
||||||
|
|
||||||
- Add LSP support for Scala via
|
- Add LSP support for Scala via
|
||||||
[nvim-metals](https://github.com/scalameta/nvim-metals)
|
[nvim-metals](https://github.com/scalameta/nvim-metals)
|
||||||
|
|
||||||
|
|
68
flake.lock
68
flake.lock
|
@ -828,6 +828,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plugin-lua-utils-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1708177208,
|
||||||
|
"narHash": "sha256-9ildzQEMkXKZ3LHq+khGFgRQFxlIXQclQ7QU3fcU1C4=",
|
||||||
|
"owner": "nvim-neorg",
|
||||||
|
"repo": "lua-utils.nvim",
|
||||||
|
"rev": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-neorg",
|
||||||
|
"repo": "lua-utils.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugin-lualine": {
|
"plugin-lualine": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -956,6 +972,38 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plugin-neorg": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727821831,
|
||||||
|
"narHash": "sha256-yfWQ6yKytu1jkWUtRZTVICslUWej6jVYv7frmSB7/6Q=",
|
||||||
|
"owner": "nvim-neorg",
|
||||||
|
"repo": "neorg",
|
||||||
|
"rev": "afc9a37bf021acb0853e95714c4c6436e1588286",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-neorg",
|
||||||
|
"repo": "neorg",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugin-neorg-telescope": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722358034,
|
||||||
|
"narHash": "sha256-ei4uUqpIQjGKzu5ryu0Hlmis9TS9FJsYnjt4J4QdWlw=",
|
||||||
|
"owner": "nvim-neorg",
|
||||||
|
"repo": "neorg-telescope",
|
||||||
|
"rev": "ddb2556644cae922699a239bbb0fe16e25b084b7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-neorg",
|
||||||
|
"repo": "neorg-telescope",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugin-new-file-template-nvim": {
|
"plugin-new-file-template-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1469,6 +1517,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plugin-pathlib-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724943804,
|
||||||
|
"narHash": "sha256-YhCJeNKlcjgg3q51UWFhuIEPzNueC8YTpeuPPJDndvw=",
|
||||||
|
"owner": "pysan3",
|
||||||
|
"repo": "pathlib.nvim",
|
||||||
|
"rev": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "pysan3",
|
||||||
|
"repo": "pathlib.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugin-plenary-nvim": {
|
"plugin-plenary-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1891,6 +1955,7 @@
|
||||||
"plugin-lsp-signature": "plugin-lsp-signature",
|
"plugin-lsp-signature": "plugin-lsp-signature",
|
||||||
"plugin-lspkind": "plugin-lspkind",
|
"plugin-lspkind": "plugin-lspkind",
|
||||||
"plugin-lspsaga": "plugin-lspsaga",
|
"plugin-lspsaga": "plugin-lspsaga",
|
||||||
|
"plugin-lua-utils-nvim": "plugin-lua-utils-nvim",
|
||||||
"plugin-lualine": "plugin-lualine",
|
"plugin-lualine": "plugin-lualine",
|
||||||
"plugin-luasnip": "plugin-luasnip",
|
"plugin-luasnip": "plugin-luasnip",
|
||||||
"plugin-mind-nvim": "plugin-mind-nvim",
|
"plugin-mind-nvim": "plugin-mind-nvim",
|
||||||
|
@ -1899,6 +1964,8 @@
|
||||||
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",
|
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",
|
||||||
"plugin-neocord": "plugin-neocord",
|
"plugin-neocord": "plugin-neocord",
|
||||||
"plugin-neodev-nvim": "plugin-neodev-nvim",
|
"plugin-neodev-nvim": "plugin-neodev-nvim",
|
||||||
|
"plugin-neorg": "plugin-neorg",
|
||||||
|
"plugin-neorg-telescope": "plugin-neorg-telescope",
|
||||||
"plugin-new-file-template-nvim": "plugin-new-file-template-nvim",
|
"plugin-new-file-template-nvim": "plugin-new-file-template-nvim",
|
||||||
"plugin-noice-nvim": "plugin-noice-nvim",
|
"plugin-noice-nvim": "plugin-noice-nvim",
|
||||||
"plugin-none-ls": "plugin-none-ls",
|
"plugin-none-ls": "plugin-none-ls",
|
||||||
|
@ -1931,6 +1998,7 @@
|
||||||
"plugin-orgmode-nvim": "plugin-orgmode-nvim",
|
"plugin-orgmode-nvim": "plugin-orgmode-nvim",
|
||||||
"plugin-otter-nvim": "plugin-otter-nvim",
|
"plugin-otter-nvim": "plugin-otter-nvim",
|
||||||
"plugin-oxocarbon": "plugin-oxocarbon",
|
"plugin-oxocarbon": "plugin-oxocarbon",
|
||||||
|
"plugin-pathlib-nvim": "plugin-pathlib-nvim",
|
||||||
"plugin-plenary-nvim": "plugin-plenary-nvim",
|
"plugin-plenary-nvim": "plugin-plenary-nvim",
|
||||||
"plugin-project-nvim": "plugin-project-nvim",
|
"plugin-project-nvim": "plugin-project-nvim",
|
||||||
"plugin-registers": "plugin-registers",
|
"plugin-registers": "plugin-registers",
|
||||||
|
|
20
flake.nix
20
flake.nix
|
@ -646,6 +646,26 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugin-lua-utils-nvim = {
|
||||||
|
url = "github:nvim-neorg/lua-utils.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
plugin-pathlib-nvim = {
|
||||||
|
url = "github:pysan3/pathlib.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
plugin-neorg = {
|
||||||
|
url = "github:nvim-neorg/neorg";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
plugin-neorg-telescope = {
|
||||||
|
url = "github:nvim-neorg/neorg-telescope";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
plugin-nui-nvim = {
|
plugin-nui-nvim = {
|
||||||
# (required by noice.nvim)
|
# (required by noice.nvim)
|
||||||
url = "github:MunifTanjim/nui.nvim";
|
url = "github:MunifTanjim/nui.nvim";
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./obsidian
|
./obsidian
|
||||||
./orgmode
|
./orgmode
|
||||||
|
./neorg
|
||||||
./mind-nvim
|
./mind-nvim
|
||||||
./todo-comments
|
./todo-comments
|
||||||
];
|
];
|
||||||
|
|
41
modules/plugins/notes/neorg/config.nix
Normal file
41
modules/plugins/notes/neorg/config.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: 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 {
|
||||||
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
{
|
||||||
|
vim = {
|
||||||
|
startPlugins = [
|
||||||
|
"lua-utils-nvim"
|
||||||
|
"nui-nvim"
|
||||||
|
"nvim-nio"
|
||||||
|
"pathlib-nvim"
|
||||||
|
"plenary-nvim"
|
||||||
|
"neorg"
|
||||||
|
"neorg-telescope"
|
||||||
|
];
|
||||||
|
|
||||||
|
binds.whichKey.register = pushDownDefault {
|
||||||
|
"<leader>o" = "+Notes";
|
||||||
|
};
|
||||||
|
|
||||||
|
pluginRC.neorg = entryAnywhere ''
|
||||||
|
require('neorg').setup(${toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
(mkIf cfg.treesitter.enable {
|
||||||
|
vim.treesitter.enable = true;
|
||||||
|
vim.treesitter.grammars = [cfg.treesitter.norgPackage];
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
6
modules/plugins/notes/neorg/default.nix
Normal file
6
modules/plugins/notes/neorg/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./neorg.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
50
modules/plugins/notes/neorg/neorg.nix
Normal file
50
modules/plugins/notes/neorg/neorg.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) submodule listOf str;
|
||||||
|
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.notes.neorg = {
|
||||||
|
enable = mkEnableOption ''
|
||||||
|
Neorg: An intuitive note-taking and organization tool with a structured nested syntax.
|
||||||
|
'';
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "Neorg" {
|
||||||
|
load = {
|
||||||
|
"core.defaults" = mkOption {
|
||||||
|
default = {};
|
||||||
|
description = ''
|
||||||
|
all of the most important modules that any user would want to have a "just works" experience
|
||||||
|
'';
|
||||||
|
|
||||||
|
type = submodule {
|
||||||
|
options = {
|
||||||
|
enable = mkEnableOption ''
|
||||||
|
all of the most important modules that any user would want to have a "just works" experience
|
||||||
|
'';
|
||||||
|
config = {
|
||||||
|
disable = mkOption {
|
||||||
|
description = ''
|
||||||
|
list of modules from to be disabled from core.defaults
|
||||||
|
'';
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
example = ["core.autocommands" "core.itero"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = mkEnableOption "Neorg treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
|
norgPackage = mkGrammarOption pkgs "norg";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue