From 4e55ed520d74e58f4fb78cdf3e1af9b84eee00ea Mon Sep 17 00:00:00 2001 From: Soliprem Date: Mon, 14 Oct 2024 19:58:10 +0200 Subject: [PATCH 1/6] Revert "leap: changed default binds" This reverts commit 92a7bfc4b8f788eeadf30c2ae858fd93a69dab26. --- modules/plugins/utility/motion/leap/leap.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/plugins/utility/motion/leap/leap.nix b/modules/plugins/utility/motion/leap/leap.nix index 4e98f20..a5d7243 100644 --- a/modules/plugins/utility/motion/leap/leap.nix +++ b/modules/plugins/utility/motion/leap/leap.nix @@ -9,22 +9,22 @@ in { leapForwardTo = mkOption { type = nullOr str; description = "Leap forward to"; - default = "ss"; + default = "s"; }; leapBackwardTo = mkOption { type = nullOr str; description = "Leap backward to"; - default = "sS"; + default = "S"; }; leapForwardTill = mkOption { type = nullOr str; description = "Leap forward till"; - default = "sx"; + default = "x"; }; leapBackwardTill = mkOption { type = nullOr str; description = "Leap backward till"; - default = "sX"; + default = "X"; }; leapFromWindow = mkOption { type = nullOr str; From da2bc3063c3c621ae45b064ea1e49906ffe5a21c Mon Sep 17 00:00:00 2001 From: Soliprem Date: Mon, 14 Oct 2024 22:52:03 +0200 Subject: [PATCH 2/6] Reapply "leap: changed default binds" This reverts commit ede1d4437e2d8d1a6ff31b4dc855676c6e16df36. --- modules/plugins/utility/motion/leap/leap.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/plugins/utility/motion/leap/leap.nix b/modules/plugins/utility/motion/leap/leap.nix index a5d7243..4e98f20 100644 --- a/modules/plugins/utility/motion/leap/leap.nix +++ b/modules/plugins/utility/motion/leap/leap.nix @@ -9,22 +9,22 @@ in { leapForwardTo = mkOption { type = nullOr str; description = "Leap forward to"; - default = "s"; + default = "ss"; }; leapBackwardTo = mkOption { type = nullOr str; description = "Leap backward to"; - default = "S"; + default = "sS"; }; leapForwardTill = mkOption { type = nullOr str; description = "Leap forward till"; - default = "x"; + default = "sx"; }; leapBackwardTill = mkOption { type = nullOr str; description = "Leap backward till"; - default = "X"; + default = "sX"; }; leapFromWindow = mkOption { type = nullOr str; From f4d3ceb790de1ee42e965067f715265c5ba283ee Mon Sep 17 00:00:00 2001 From: Soliprem Date: Wed, 23 Oct 2024 15:20:18 +0200 Subject: [PATCH 3/6] otter: fixed stupid typo --- modules/plugins/lsp/otter/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/lsp/otter/config.nix b/modules/plugins/lsp/otter/config.nix index e5df92f..c8a2d3c 100644 --- a/modules/plugins/lsp/otter/config.nix +++ b/modules/plugins/lsp/otter/config.nix @@ -32,7 +32,7 @@ in { pluginRC.otter-nvim = entryAnywhere '' -- Enable otter diagnostics viewer - require("otter").setup({${toLuaObject cfg.otter-nvim.setupOpts}}) + require("otter").setup(${toLuaObject cfg.otter-nvim.setupOpts}) ''; }; }; From 5e0b47f15c69ab92249e6c34e4ed08de4bdd3532 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Wed, 23 Oct 2024 15:32:57 +0200 Subject: [PATCH 4/6] otter: added changelog entry --- docs/release-notes/rl-0.7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/rl-0.7.md b/docs/release-notes/rl-0.7.md index 7cbdbaa..277b2e0 100644 --- a/docs/release-notes/rl-0.7.md +++ b/docs/release-notes/rl-0.7.md @@ -262,6 +262,7 @@ everyone. - 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 ccc +- Fixed typo in Otter's setupOpts - Add Neorg support under `vim.notes.neorg` - Add LSP, diagnostics, formatter and Treesitter support for Kotlin under `vim.languages.kotlin` From cced0d239f6b17ca336e89b7ae180b7304b3c46a Mon Sep 17 00:00:00 2001 From: Soliprem Date: Wed, 23 Oct 2024 16:08:35 +0200 Subject: [PATCH 5/6] notes/quarto: init --- configuration.nix | 1 + flake.lock | 17 ++++++++++++++ flake.nix | 4 ++++ modules/plugins/notes/default.nix | 1 + modules/plugins/notes/quarto/config.nix | 28 ++++++++++++++++++++++++ modules/plugins/notes/quarto/default.nix | 6 +++++ modules/plugins/notes/quarto/quarto.nix | 23 +++++++++++++++++++ 7 files changed, 80 insertions(+) create mode 100644 modules/plugins/notes/quarto/config.nix create mode 100644 modules/plugins/notes/quarto/default.nix create mode 100644 modules/plugins/notes/quarto/quarto.nix diff --git a/configuration.nix b/configuration.nix index 832bf95..7954ba2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -176,6 +176,7 @@ isMaximal: { obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled neorg.enable = false; orgmode.enable = false; + quarto-nvim.enable = isMaximal; mind-nvim.enable = isMaximal; todo-comments.enable = true; }; diff --git a/flake.lock b/flake.lock index 34a2243..aca95db 100644 --- a/flake.lock +++ b/flake.lock @@ -1565,6 +1565,22 @@ "type": "github" } }, + "plugin-quarto-nvim": { + "flake": false, + "locked": { + "lastModified": 1728470501, + "narHash": "sha256-JeRiyEPpCrFaNhlrS+CH8j2Sv8c9BnL8XoSG9aTnVVU=", + "owner": "quarto-dev", + "repo": "quarto-nvim", + "rev": "23083a0152799ca7263ac9ae53d768d4dd93d24e", + "type": "github" + }, + "original": { + "owner": "quarto-dev", + "repo": "quarto-nvim", + "type": "github" + } + }, "plugin-registers": { "flake": false, "locked": { @@ -2001,6 +2017,7 @@ "plugin-pathlib-nvim": "plugin-pathlib-nvim", "plugin-plenary-nvim": "plugin-plenary-nvim", "plugin-project-nvim": "plugin-project-nvim", + "plugin-quarto-nvim": "plugin-quarto-nvim", "plugin-registers": "plugin-registers", "plugin-rose-pine": "plugin-rose-pine", "plugin-rustaceanvim": "plugin-rustaceanvim", diff --git a/flake.nix b/flake.nix index d12bdc5..dd42712 100644 --- a/flake.nix +++ b/flake.nix @@ -170,6 +170,10 @@ flake = false; }; + plugin-quarto-nvim = { + url = "github:quarto-dev/quarto-nvim"; + flake = false; + }; plugin-otter-nvim = { url = "github:jmbuhr/otter.nvim"; flake = false; diff --git a/modules/plugins/notes/default.nix b/modules/plugins/notes/default.nix index 6c34272..ada1df0 100644 --- a/modules/plugins/notes/default.nix +++ b/modules/plugins/notes/default.nix @@ -3,6 +3,7 @@ ./obsidian ./orgmode ./neorg + ./quarto ./mind-nvim ./todo-comments ]; diff --git a/modules/plugins/notes/quarto/config.nix b/modules/plugins/notes/quarto/config.nix new file mode 100644 index 0000000..602ec0b --- /dev/null +++ b/modules/plugins/notes/quarto/config.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf mkMerge; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.notes.quarto-nvim; +in { + config = mkIf cfg.enable (mkMerge [ + { + vim = { + startPlugins = [ "otter-nvim" "quarto-nvim" ]; + + pluginRC.quarto-nvim = entryAnywhere '' + require('quarto').setup(${toLuaObject cfg.setupOpts}) + ''; + }; + } + + (mkIf cfg.treesitter.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.quartoPackage]; + }) + ]); +} diff --git a/modules/plugins/notes/quarto/default.nix b/modules/plugins/notes/quarto/default.nix new file mode 100644 index 0000000..906f9ec --- /dev/null +++ b/modules/plugins/notes/quarto/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./quarto.nix + ./config.nix + ]; +} diff --git a/modules/plugins/notes/quarto/quarto.nix b/modules/plugins/notes/quarto/quarto.nix new file mode 100644 index 0000000..d12bdc1 --- /dev/null +++ b/modules/plugins/notes/quarto/quarto.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; +in { + options.vim.notes.quarto-nvim = { + enable = mkEnableOption '' + Quarto-nvim, which provides tools for working on Quarto manuscripts in Neovim. + ''; + + setupOpts = mkPluginSetupOption "quarto-nvim" {}; + + treesitter = { + enable = mkEnableOption "Quarto treesitter" // {default = config.vim.languages.enableTreesitter;}; + quartoPackage = mkGrammarOption pkgs "markdown"; + quartoInlinePackage = mkGrammarOption pkgs "markdown-inline"; + }; + }; +} From 68ad67369e749f953f80d254163dc8342b6bea23 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Wed, 23 Oct 2024 16:25:08 +0200 Subject: [PATCH 6/6] quarto: formatting --- modules/plugins/notes/quarto/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/notes/quarto/config.nix b/modules/plugins/notes/quarto/config.nix index 602ec0b..70e399f 100644 --- a/modules/plugins/notes/quarto/config.nix +++ b/modules/plugins/notes/quarto/config.nix @@ -12,7 +12,7 @@ in { config = mkIf cfg.enable (mkMerge [ { vim = { - startPlugins = [ "otter-nvim" "quarto-nvim" ]; + startPlugins = ["otter-nvim" "quarto-nvim"]; pluginRC.quarto-nvim = entryAnywhere '' require('quarto').setup(${toLuaObject cfg.setupOpts})