From 206e17bbe4acfd287e2e3dd1c072ff46446c4097 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 6 Feb 2023 21:10:37 +0300 Subject: [PATCH] docs: streamline manpages --- docs/custom-configs.adoc | 2 +- docs/default-configs.adoc | 5 ++- docs/man-configuration.xml | 2 +- docs/man-pages.xml | 4 +-- docs/manual.xml | 6 +++- docs/plugins.adoc | 70 ++++++++++++++++++++------------------ docs/try-it-out.adoc | 32 +++++++++++++++++ modules/lib/hm.nix | 53 +++++++++++++++++++++++++++++ 8 files changed, 133 insertions(+), 41 deletions(-) create mode 100644 docs/try-it-out.adoc create mode 100644 modules/lib/hm.nix diff --git a/docs/custom-configs.adoc b/docs/custom-configs.adoc index 74417cb..17994f7 100644 --- a/docs/custom-configs.adoc +++ b/docs/custom-configs.adoc @@ -18,7 +18,7 @@ The following is an example of a barebones vim configuration with the default th [source,nix] ---- { - inputs.neovim-flake.url = "github:notashelf/neovim-flake"; + inputs.neovim-flake.url = "github:jordanisaacs/neovim-flake"; outputs = {nixpkgs, neovim-flake, ...}: let system = "x86_64-linux"; diff --git a/docs/default-configs.adoc b/docs/default-configs.adoc index 4cb0563..981d859 100644 --- a/docs/default-configs.adoc +++ b/docs/default-configs.adoc @@ -26,12 +26,11 @@ Enables all the of neovim plugins, with language support for specifically Nix. T === Maximal [source,console] -$ nix run github:notashelf/neovim-flake#maximal test.nix +$ nix shell github:notashelf/neovim-flake#maximal test.nix It is the same fully configured neovim as with the <> config, but with every supported language enabled. [NOTE] ==== -Running the maximal config will download *a lot* of packages, as it will be downloading language servers, formatters, and more. You are recommended to use the binary cache if -using the default configs. +Running the maximal config will download *a lot* of packages as it is downloading language servers, formatters, and more. ==== diff --git a/docs/man-configuration.xml b/docs/man-configuration.xml index c39a729..498c0a0 100644 --- a/docs/man-configuration.xml +++ b/docs/man-configuration.xml @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/docs/man-pages.xml b/docs/man-pages.xml index a89a8e8..2526aea 100644 --- a/docs/man-pages.xml +++ b/docs/man-pages.xml @@ -5,9 +5,9 @@ neovim-flake contributors - 2021–2023 + 2023 neovim-flake contributors - \ No newline at end of file + diff --git a/docs/manual.xml b/docs/manual.xml index 57ec8ac..4f33e91 100644 --- a/docs/manual.xml +++ b/docs/manual.xml @@ -11,8 +11,12 @@ If your problem is caused by a bug in neovim-flake then it should be reported on the neovim-flake issue tracker. + Alongside bug reports, feature requests are also welcome over + neovim-flake pull requests. + + @@ -22,4 +26,4 @@ - \ No newline at end of file + diff --git a/docs/plugins.adoc b/docs/plugins.adoc index a369b4f..12e6f50 100644 --- a/docs/plugins.adoc +++ b/docs/plugins.adoc @@ -3,8 +3,13 @@ The following are the neovim plugins used within neovim-flake. Some plugins are explicitly enabled by the user, while others are enabled implicitly. +[[sec-plugins-autopairs]] +=== Autopairs -[[sec-plugins-buffer]] +* https://github.com/windwp/nvim-autopairs[nvim-autopairs] an autopair plugin for neovim + + +[[sec-plugins-assistant]] === Coding Assistants * https://github.com/zbirenbaum/copilot.lua[copilot.lua] a lua replacement for github.vim, the license nightmare AI assistant @@ -50,6 +55,7 @@ The following are the neovim plugins used within neovim-flake. Some plugins are * https://github.com/ray-x/lsp_signature.nvim[lsp-signature] show function signatures as you type * https://github.com/onsails/lspkind-nvim[lspkind-nvim] for pictograms in lsp (with support for nvim-cmp) + [[sec-plugins-statuslines]] === Statuslines @@ -78,7 +84,7 @@ The following are the neovim plugins used within neovim-flake. Some plugins are * https://github.com/declancm/cinnamon.nvim[cinnamon.nvim] smooth scrolling for ANY movement command * https://github.com/nvim-cursorline[nvim-cursorline] a plugin for neovim that highlights cursor words and lines * https://github.com/petertriho/nvim-scrollbar[nvim-scrollbar] a scrollbar plugin for neovim -* https://github.com/Eandrju/cellular-automaton.nvim[cellular-automatan] a vanity to plugin to help you procrastinate more efficiently +* https://github.com/Eandrju/cellular-automaton.nvim[cellular-automaton] a vanity to plugin to help you procrastinate more efficiently [[sec-plugins-minimap]] === Minimap @@ -91,51 +97,27 @@ The following are the neovim plugins used within neovim-flake. Some plugins are * https://github.com/rcarriga/nvim-notify[nvim-notify] simple notification plugin that also integrates with noice.nvim -[sec-plugins-notes]] +[[sec-plugins-notes]] === Note-taking * https://github.com/obsidian.nvim[obsidian.nvim] a neovim plugin that deeply integrates with the obsidian markdown editor. Also works standalone * https://github.com/nvim-orgmode/orgmode[orgmode] a neovim replacement for emac orgmode -[sec-plugins-session-management]] +[[sec-plugins-session-management]] === Session Management * https://github.com/Shatur/neovim-session-manager[neovim-session-manager] a simple wrapper around :mksession -[sec-plugins-terminal]] -=== Terminal - -* https://github.com/akinsho/toggleterm.nvim[toggleterm.nvim] a simple terminal plugin that opens a terminal buffer on demand - -[[sec-plugins-presence]] -=== Rich Presence - -* https://github.com/andweeb/presence.nvim[presence.nvim] light and powerful discord rich presence plugin - -[[sec-plugins-utilities]] -=== Utilities - -* https://github.com/nvim-telescope/telescope.nvim[telescope] an extendable fuzzy finder of lists. Working ripgrep and fd -* https://github.com/folke/which-key.nvim[which-key] a popup that displays possible keybindings of command being typed -* https://github.com/sudormrfbin/cheatsheet.nvim[cheatsheet.nvim] a searchable cheatsheet for neovim from within the editor using Telescope -* https://github.com/ga-rosa/ccc.nvim[ccc.nvim] super powerful color picker / colorizer plugin. -* https://github.com/ziontee113/icon-picker.nvim[icon-picker.nvim] an icon picker plugin that provides access to thousands of icons -* https://github.com/jbyuki/venn.nvim[venn.nvim] draw venn diagrams inside neovim - -[[sec-plugins-utilities]] -=== Utilities - -* https://github.com/folke/noice.nvim[noice.nvim] an experimental neovim plugin that replaces some UI components of neovim - [[sec-plugins-snippets]] === Snippets * https://github.com/hrsh7th/vim-vsnip[vim-vsnip] a snippet plugin that supports LSP/VSCode's snippet format -[[sec-plugins-autopairs]] -=== Autopairs -* https://github.com/windwp/nvim-autopairs[nvim-autopairs] an autopair plugin for neovim +[[sec-plugins-terminal]] +=== Terminal + +* https://github.com/akinsho/toggleterm.nvim[toggleterm.nvim] a simple terminal plugin that opens a terminal buffer on demand [[sec-plugins-themes]] === Themes @@ -144,6 +126,28 @@ The following are the neovim plugins used within neovim-flake. Some plugins are * https://github.com/folke/tokyonight.nvim[tokyonight-nvim] a neovim theme with multiple color options * https://github.com/catppuccin/nvim[catppuccin] a pastel theme with 4 color options + +[[sec-plugins-utilities]] +=== Utilities + +* https://github.com/nvim-telescope/telescope.nvim[telescope] an extendable fuzzy finder of lists. Working ripgrep and fd +* https://github.com/folke/which-key.nvim[which-key] a popup that displays possible keybindings of command being typed +* https://github.com/sudormrfbin/cheatsheet.nvim[cheatsheet.nvim] a searchable cheatsheet for neovim from within the editor using Telescope +* https://github.com/ga-rosa/ccc.nvim[ccc.nvim] super powerful color picker and colorizer plugin. +* https://github.com/ziontee113/icon-picker.nvim[icon-picker.nvim] an icon picker plugin that provides access to thousands of icons +* https://github.com/jbyuki/venn.nvim[venn.nvim] draw venn diagrams inside neovim + +[[sec-plugins-ui]] +=== UI Elements + +* https://github.com/folke/noice.nvim[noice.nvim] an experimental neovim plugin that replaces some UI components of neovim + + +[[sec-plugins-presence]] +=== Rich Presence + +* https://github.com/andweeb/presence.nvim[presence.nvim] light and powerful discord rich presence plugin + [[sec-plugins-markdown]] === Markdown @@ -177,4 +181,4 @@ The following are the neovim plugins used within neovim-flake. Some plugins are * https://github.comstevearc/dressing.nvim[dressing.nvim] which is a dependency for icon-picker.nvim * https://github.com/preservim/vim-markdown[vim-markdown] which is a dependency for obsidian.nvim * https://github.comgodlygeek/tabular[tabular] which is a dependency for vim-markdown -* https://github.com/MunifTanjim/nui.nvim[nui.nvim] which is a dependency for nui-nvim \ No newline at end of file +* https://github.com/MunifTanjim/nui.nvim[nui.nvim] which is a dependency for nui-nvim diff --git a/docs/try-it-out.adoc b/docs/try-it-out.adoc new file mode 100644 index 0000000..c2b58d6 --- /dev/null +++ b/docs/try-it-out.adoc @@ -0,0 +1,32 @@ +[[ch-try-it-out]] +== Try it out + +[source,console] +---- +$ cachix use neovim-flake # Optional: it'll save you CPU resources and time +$ nix run github:notashelf/neovim-flake +---- + + +=== Nix + +By default LSP support for Nix is enabled alongside all complementary Neovim plugins. By running `nix run .`, which is the default package, +you will build Neovim with this config. + +=== Tidal + +Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration. + +=== Maximal + +Maximal is the ultimate configuration that will enable basically everything. Keep in mind, however, that this will pull a lot of dependencies. + + +=== Using Prebuilt Configs + +[source,console] +---- +$ nix run github:notashelf/neovim-flake#nix +$ nix run github:notashelf/neovim-flake#tidal +$ nix run github:notashelf/neovim-flake#maximal +---- diff --git a/modules/lib/hm.nix b/modules/lib/hm.nix new file mode 100644 index 0000000..b5f5932 --- /dev/null +++ b/modules/lib/hm.nix @@ -0,0 +1,53 @@ +# Home Manager module +{ + config, + pkgs, + lib ? pkgs.lib, + ... +}: let + cfg = config.programs.neovim-ide; + set = pkgs.neovimBuilder {config = cfg.settings;}; +in + with lib; { + meta.maintainers = [maintainers.notashelf]; + + options.programs.neovim-ide = { + enable = mkEnableOption "NeoVim with LSP enabled for Scala, Haskell, Rust and more."; + + settings = mkOption { + type = types.attrsOf types.anything; + default = {}; + example = literalExpression '' + { + vim.viAlias = false; + vim.vimAlias = true; + vim.lsp = { + enable = true; + formatOnSave = true; + lightbulb.enable = true; + lspsaga.enable = false; + nvimCodeActionMenu.enable = true; + trouble.enable = true; + lspSignature.enable = true; + rust.enable = false; + nix = true; + dhall = true; + elm = true; + haskell = true; + scala = true; + sql = true; + python = false; + clang = false; + ts = false; + go = false; + }; + } + ''; + description = "Attribute set of neoflake preferences."; + }; + }; + + config = mkIf cfg.enable { + home.packages = [set.neovim]; + }; + }