From a935c15e0ae0dfd45323473f03c830cbc2e50bf1 Mon Sep 17 00:00:00 2001 From: jsw08 <46420489+jsw08@users.noreply.github.com> Date: Mon, 5 Jun 2023 15:39:33 +0000 Subject: [PATCH 1/2] updated docs to add a section for custom vim plugins. --- docs/home-manager.adoc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/home-manager.adoc b/docs/home-manager.adoc index bd24a16b..4d9c6497 100644 --- a/docs/home-manager.adoc +++ b/docs/home-manager.adoc @@ -42,3 +42,36 @@ Then we should be able to use the given module. E.g. }; } ---- + +=== Custom vim plugins + +It's possible to add custom vim plugins by using the startPlugins and lua DAG settings. First we install the plugin by adding it to startPlugins, I'll be using the nvim-surround plugin for example. This process should be very similar for nixos installations. + +[source,nix] +---- +{ + programs.neovim-flake = { + enable = true; + settings = { + vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ]; + }; + }; +} +---- + +Then we continue by requireing the plugin in lua using DAG settings. Please note that you're able to name this setting to however you want, in my situation I'll name it nvim-surround since that's the plugin that I'll be installing. + +[source,nix] +---- +{ + programs.neovim-flake = { + enable = true; + settings = { + vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ]; + luaConfigRC.nvim-surround = nvim-flake.lib.nvim.dag.entryAnywhere '' + require("nvim-surround").setup() + ''; + }; + }; +} +---- \ No newline at end of file From 6a82510ee1f03b270ca97719fd8df87280c6c01e Mon Sep 17 00:00:00 2001 From: jsw08 <46420489+jsw08@users.noreply.github.com> Date: Mon, 5 Jun 2023 19:49:31 +0000 Subject: [PATCH 2/2] fixed mistakes --- docs/home-manager.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/home-manager.adoc b/docs/home-manager.adoc index 4d9c6497..f2380928 100644 --- a/docs/home-manager.adoc +++ b/docs/home-manager.adoc @@ -45,7 +45,7 @@ Then we should be able to use the given module. E.g. === Custom vim plugins -It's possible to add custom vim plugins by using the startPlugins and lua DAG settings. First we install the plugin by adding it to startPlugins, I'll be using the nvim-surround plugin for example. This process should be very similar for nixos installations. +It's possible to add custom vim plugins by using the startPlugins and lua DAG settings. First we install the plugin by adding it to startPlugins. This example uses nvim-surround, but the process will be similar for other plugins as well. [source,nix] ---- @@ -59,7 +59,7 @@ It's possible to add custom vim plugins by using the startPlugins and lua DAG se } ---- -Then we continue by requireing the plugin in lua using DAG settings. Please note that you're able to name this setting to however you want, in my situation I'll name it nvim-surround since that's the plugin that I'll be installing. +Then we continue by requiring the plugin in lua using DAG settings. Please note that you're able to name this setting to however you want, the name will add a `--SECTION ` in the init.vim, under which it will be initialized. [source,nix] ---- @@ -68,7 +68,7 @@ Then we continue by requireing the plugin in lua using DAG settings. Please note enable = true; settings = { vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ]; - luaConfigRC.nvim-surround = nvim-flake.lib.nvim.dag.entryAnywhere '' + luaConfigRC.nvim-surround = nvim-flake.lib.nvim.dag.entryAnywhere '' # nvim-flake is a reference to the flake. Please change this accordingly to your config. require("nvim-surround").setup() ''; };