From 294b712c15e1f3b1452c38ea07a789b9d8e79701 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jun 2023 03:01:44 +0300 Subject: [PATCH] docs: clean up documentation directory --- .github/README.md | 20 +++---- docs/home-manager.adoc | 44 -------------- docs/manual.xml | 12 ++-- docs/{ => manual}/custom-configs.adoc | 0 docs/{ => manual}/custom-plugins.adoc | 0 docs/{ => manual}/default-configs.adoc | 0 docs/manual/home-manager.adoc | 80 ++++++++++++++++++++++++++ docs/{ => manual}/languages.adoc | 0 docs/{ => manual}/try-it-out.adoc | 0 docs/release-notes/rl-0.4.adoc | 4 ++ 10 files changed, 100 insertions(+), 60 deletions(-) delete mode 100644 docs/home-manager.adoc rename docs/{ => manual}/custom-configs.adoc (100%) rename docs/{ => manual}/custom-plugins.adoc (100%) rename docs/{ => manual}/default-configs.adoc (100%) create mode 100644 docs/manual/home-manager.adoc rename docs/{ => manual}/languages.adoc (100%) rename docs/{ => manual}/try-it-out.adoc (100%) diff --git a/.github/README.md b/.github/README.md index 719a711..e208bf3 100644 --- a/.github/README.md +++ b/.github/README.md @@ -41,10 +41,10 @@

**[
 Get Started 
][Get Started]** -**[
 Documentation 
][Documentation]** -**[
 Help 
][Help]** -**[
 Contribute 
][Contribute]** -**[
 FAQ 
][Faq]** +**[
 Documentation 
][Documentation]** +**[
 Help 
][Help]** +**[
 Contribute 
][Contribute]** +**[
 FAQ 
][Faq]** **[
 Credits 
][Credits]**

@@ -78,7 +78,7 @@ nix run github:notashelf/neovim-flake#tidal Similar instructions will apply for `nix profile install`. -P.S. The `maximal` configuration is *massive* and will take a while to build. To get a feel for the configuration, use the default `nix` or `tidal` configurations. +P.S. The `maximal` configuration is _massive_ and will take a while to build. To get a feel for the configuration, use the default `nix` or `tidal` configurations. ## Documentation @@ -103,8 +103,8 @@ I am always looking for new ways to help improve this flake. If you would like t ## Philosophy The philosophy behind this flake configuration is to create an easily configurable and reproducible Neovim environment. While it does sacrifice in size -(which I know some users will find *disagreeable*), it offers a lot of flexibility and customizability in exchange for the large size of the flake inputs. -The KISS (Keep it simple, stupid) principle has been abandoned here, however, you *can* ultimately leverage the flexibility of this flake to declare a configuration that follows KISS principles, it is very easy to bring your own plugins and configurations from non-nix. What this flake is meant to be does eventually fall into your hands. Whether you are a developer, writer, or live coder (see tidal cycles below!), you can quickly craft a config that suits every project's need. Think of it like a distribution of Neovim that takes advantage of pinning vim plugins and +(which I know some users will find _disagreeable_), it offers a lot of flexibility and customizability in exchange for the large size of the flake inputs. +The KISS (Keep it simple, stupid) principle has been abandoned here, however, you _can_ ultimately leverage the flexibility of this flake to declare a configuration that follows KISS principles, it is very easy to bring your own plugins and configurations from non-nix. What this flake is meant to be does eventually fall into your hands. Whether you are a developer, writer, or live coder, you can quickly craft a config that suits every project's need. Think of it like a distribution of Neovim that takes advantage of pinning vim plugins and third party dependencies (such as tree-sitter grammars, language servers, and more). One should never get a broken config when setting options. If setting multiple options results in a broken Neovim, file an issue! Each plugin knows when another plugin which allows for smart configuration of keybindings and automatic setup of things like completion sources and languages. @@ -128,9 +128,9 @@ instead of the `maximal` output. This will reduce size by a lot, but you will lo **A**: No. If you feel the need to ask that question, then you have missed the whole point of using nix and ultimately this flake. The whole reason we use nix is to be able to handle EVERYTHING declaratively, well including the LSP and plugin installations.

-**Q**: Can you add *X*? +**Q**: Can you add _X_?
-**A**: Maybe. Open an issue using the appropriate template and I will consider it. I do not intend to add *every plugin that is in existence*, but I will consider it, should it offer something useful to the flake. +**A**: Maybe. Open an issue using the appropriate template and I will consider it. I do not intend to add _every plugin that is in existence_, but I will consider it, should it offer something useful to the flake. ## Credits @@ -149,9 +149,9 @@ and everyone who has submitted issues or pull requests! This configuration borrows from and is based on a few other configurations, including: +- [@jordanisaacs's](https://github.com/jordanisaacs) [neovim-flake](https://github.com/jordanisaacs/neovim-flake) - [@sioodmy's](https://github.com/sioodmy) [dotfiles](https://github.com/sioodmy/dotfiles) - [@wiltaylor's](https://github.com/wiltaylor) [neovim-flake](https://github.com/wiltaylor/neovim-flake) -- [@jordanisaacs's](https://github.com/jordanisaacs) [neovim-flake](https://github.com/jordanisaacs/neovim-flake) - [@gvolpe's](https://github.com/gvolpe) [neovim-flake](https://github.com/gvolpe/neovim-flake) I am grateful for their previous work and inspiration. diff --git a/docs/home-manager.adoc b/docs/home-manager.adoc deleted file mode 100644 index bd24a16..0000000 --- a/docs/home-manager.adoc +++ /dev/null @@ -1,44 +0,0 @@ -[[ch-hm-module]] -== Home Manager - -The Home Manager module allows us to customize the different `vim` options. To use it, we first add the input flake. - -[source,nix] ----- -{ - neovim-flake = { - url = github:notashelf/neovim-flake; - # you can override input nixpkgs - inputs.nixpkgs.follows = "nixpkgs"; - }; -} ----- - -Followed by importing the HM module. - -[source,nix] ----- -{ - imports = [ neovim-flake.homeManagerModules.default ]; -} ----- - -Then we should be able to use the given module. E.g. - -[source,nix] ----- -{ - programs.neovim-flake = { - - enable = true; - # your settings need to go into the settings attrset - settings = { - vim.viAlias = false; - vim.vimAlias = true; - vim.lsp = { - enable = true; - }; - }; - }; -} ----- diff --git a/docs/manual.xml b/docs/manual.xml index 5597b36..7184dbb 100644 --- a/docs/manual.xml +++ b/docs/manual.xml @@ -16,12 +16,12 @@ - - - - - - + + + + + + Configuration Options diff --git a/docs/custom-configs.adoc b/docs/manual/custom-configs.adoc similarity index 100% rename from docs/custom-configs.adoc rename to docs/manual/custom-configs.adoc diff --git a/docs/custom-plugins.adoc b/docs/manual/custom-plugins.adoc similarity index 100% rename from docs/custom-plugins.adoc rename to docs/manual/custom-plugins.adoc diff --git a/docs/default-configs.adoc b/docs/manual/default-configs.adoc similarity index 100% rename from docs/default-configs.adoc rename to docs/manual/default-configs.adoc diff --git a/docs/manual/home-manager.adoc b/docs/manual/home-manager.adoc new file mode 100644 index 0000000..a937738 --- /dev/null +++ b/docs/manual/home-manager.adoc @@ -0,0 +1,80 @@ +[[ch-hm-module]] +== Home Manager + +The Home Manager module allows us to customize the different `vim` options. To use it, we first add the input flake. + +[source,nix] +---- +{ + neovim-flake = { + url = github:notashelf/neovim-flake; + # you can override input nixpkgs + inputs.nixpkgs.follows = "nixpkgs"; + }; +} +---- + +Followed by importing the HM module. + +[source,nix] +---- +{ + imports = [ neovim-flake.homeManagerModules.default ]; +} +---- + +Then we should be able to use the given module. E.g. + +[source,nix] +---- +{ + programs.neovim-flake = { + + enable = true; + # your settings need to go into the settings attrset + settings = { + vim.viAlias = false; + vim.vimAlias = true; + vim.lsp = { + enable = true; + }; + }; + }; +} +---- + +=== Custom vim/neovim plugins + +It is possible to add custom plugins to your configuration by using the `vim.startPlugins` option and the this flake's lua DAG library. + +Start by adding it to startPlugins. This example uses nvim-surround, but the process will be similar for other plugins as well. + +[source,nix] +---- +{ + programs.neovim-flake = { + enable = true; + settings = { + vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ]; + }; + }; +} +---- + +Followed by requiring the plugin, should it need one, in the lua DAG. Please note that you're able to name the DAG to however you want, the name will add a `--SECTION ` in the init.vim, under which it will be initialized. `lib.nvim.dag.entryAfter ["name"]` could also be used to initialize a plugin only after a previous plugin has beeni initialize +Your final setup will likely look like this, where nvim-flake refers to your flake input or fetch. + +[source,nix] +---- +{ + programs.neovim-flake = { + enable = true; + settings = { + vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ]; + 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() + ''; + }; + }; +} +---- diff --git a/docs/languages.adoc b/docs/manual/languages.adoc similarity index 100% rename from docs/languages.adoc rename to docs/manual/languages.adoc diff --git a/docs/try-it-out.adoc b/docs/manual/try-it-out.adoc similarity index 100% rename from docs/try-it-out.adoc rename to docs/manual/try-it-out.adoc diff --git a/docs/release-notes/rl-0.4.adoc b/docs/release-notes/rl-0.4.adoc index 9f3299b..4eff20b 100644 --- a/docs/release-notes/rl-0.4.adoc +++ b/docs/release-notes/rl-0.4.adoc @@ -55,3 +55,7 @@ https://github.com/notashelf[notashelf]: * `vim.utility.colorizer` has been renamed to `vim.utility.ccc` after the plugin it uses * Color preview via `nvim-colorizer.lua` + +* Updated Lualine statusline UI + +* Cleaned up documentation