mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	docs: 0.6 release notes; update developer documentation
This commit is contained in:
		
					parent
					
						
							
								ecbe60d57b
							
						
					
				
			
			
				commit
				
					
						534b837dab
					
				
			
		
					 3 changed files with 93 additions and 62 deletions
				
			
		|  | @ -1,13 +1,14 @@ | ||||||
| # Adding Plugins {#sec-additional-plugins} | # Adding Plugins {#sec-additional-plugins} | ||||||
| 
 | 
 | ||||||
| To add a new neovim plugin, first add the source url in the inputs section of `flake.nix` | To add a new neovim plugin, first add the source url in the inputs section of `flake.nix` | ||||||
|  | with the prefix `plugin-` | ||||||
| 
 | 
 | ||||||
| ```nix | ```nix | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   inputs = { |   inputs = { | ||||||
|     # ... |     # ... | ||||||
|     neodev-nvim = { |     plugin-neodev-nvim = { | ||||||
|       url = "github:folke/neodev.nvim"; |       url = "github:folke/neodev.nvim"; | ||||||
|       flake = false; |       flake = false; | ||||||
|     }; |     }; | ||||||
|  | @ -16,17 +17,13 @@ To add a new neovim plugin, first add the source url in the inputs section of `f | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Then add the name of the plugin into the `availablePlugins` variable in `lib/types/plugins.nix`: | The addition of the `plugin-` prefix will allow neovim-flake to autodiscover the | ||||||
|  | input from the flake inputs automatically, allowing you to refer to it in areas | ||||||
|  | that require a very specific plugin type as defined in `lib/types/plugins.nix` | ||||||
| 
 | 
 | ||||||
| ```nix | You can now reference this plugin using its string name, the plugin will be | ||||||
| # ... | built with the name and source URL from the flake input, allowing you to | ||||||
| availablePlugins = [ | refer to it as a **string**. | ||||||
|   # ... |  | ||||||
|   "neodev-nvim" |  | ||||||
| ]; |  | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| You can now reference this plugin using its string name: |  | ||||||
| 
 | 
 | ||||||
| ```nix | ```nix | ||||||
| config.vim.startPlugins = ["neodev-nvim"]; | config.vim.startPlugins = ["neodev-nvim"]; | ||||||
|  | @ -107,19 +104,23 @@ Now users can set any of the pre-defined option field, and can also add their ow | ||||||
| 
 | 
 | ||||||
| ## Details of toLuaObject {#sec-details-of-toluaobject} | ## Details of toLuaObject {#sec-details-of-toluaobject} | ||||||
| 
 | 
 | ||||||
| As you've seen above, `toLuaObject` is used to convert our nix attrSet `cfg.setupOpts`, into a lua | As you've seen above, `toLuaObject` is used to convert our nix attrSet | ||||||
| table. Here are some rules of the conversion: | `cfg.setupOpts`, into a lua table. Here are some rules of the conversion: | ||||||
| 
 | 
 | ||||||
| 1. nix `null` converts to lua `nil` | 1. nix `null` converts to lua `nil` | ||||||
| 2. number and strings convert to their lua counterparts | 2. number and strings convert to their lua counterparts | ||||||
| 3. nix attrSet/list converts into lua tables | 3. nix attrSet/list convert into lua tables | ||||||
| 4. you can write raw lua code using `lib.generators.mkLuaInline`. This function is part of nixpkgs. | 4. you can write raw lua code using `lib.generators.mkLuaInline`. This | ||||||
|    ```nix |    function is part of nixpkgs. | ||||||
|    vim.your-plugin.setupOpts = { | 
 | ||||||
|      on_init = lib.generators.mkLuaInline '' | Example: | ||||||
|        function() | 
 | ||||||
|          print('we can write lua!') | ```nix | ||||||
|        end | vim.your-plugin.setupOpts = { | ||||||
|      ''; |   on_init = lib.generators.mkLuaInline '' | ||||||
|    } |     function() | ||||||
|    ``` |       print('we can write lua!') | ||||||
|  |     end | ||||||
|  |   ''; | ||||||
|  | } | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | @ -7,12 +7,16 @@ To use it, we first add the input flake. | ||||||
| 
 | 
 | ||||||
| ```nix | ```nix | ||||||
| { | { | ||||||
|   neovim-flake = { |   inputs = { | ||||||
|     url = github:notashelf/neovim-flake; |     obsidian-nvim.url = "github:epwalsh/obsidian.nvim"; | ||||||
|     # you can override input nixpkgs |     neovim-flake = { | ||||||
|     inputs.nixpkgs.follows = "nixpkgs"; |       url = "github:notashelf/neovim-flake"; | ||||||
|     # you can also override individual plugins |       # you can override input nixpkgs | ||||||
|     # i.e inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- obsidian nvim needs to be in your inputs |       inputs.nixpkgs.follows = "nixpkgs"; | ||||||
|  |       # you can also override individual plugins | ||||||
|  |       # for example: | ||||||
|  |       inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs | ||||||
|  |     }; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
|  | @ -26,14 +30,15 @@ Followed by importing the home-manager module somewhere in your configuration. | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| An example installation for standalone home-manager would look like this: | An example installation for neovim-flake under standalone home-manager | ||||||
|  | would look like this: | ||||||
| 
 | 
 | ||||||
| ```nix | ```nix | ||||||
| { | { | ||||||
|   inputs = { |   inputs = { | ||||||
|     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; |     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||||||
|     home-manager.url = "github:nix-community/home-manager"; |     home-manager.url = "github:nix-community/home-manager"; | ||||||
|     stylix.url = "github:notashelf/neovim-flake"; |     neovim-flake.url = "github:notashelf/neovim-flake"; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   outputs = { nixpkgs, home-manager, neovim-flake ... }: let |   outputs = { nixpkgs, home-manager, neovim-flake ... }: let | ||||||
|  | @ -55,7 +60,6 @@ home-manager configuration. | ||||||
| 
 | 
 | ||||||
| ```nix{ | ```nix{ | ||||||
|   programs.neovim-flake = { |   programs.neovim-flake = { | ||||||
| 
 |  | ||||||
|     enable = true; |     enable = true; | ||||||
|     # your settings need to go into the settings attribute set |     # your settings need to go into the settings attribute set | ||||||
|     # most settings are documented in the appendix |     # most settings are documented in the appendix | ||||||
|  |  | ||||||
|  | @ -8,14 +8,6 @@ Release notes for release 0.6 | ||||||
| 
 | 
 | ||||||
| - Add Terraform language support | - Add Terraform language support | ||||||
| 
 | 
 | ||||||
| [horriblename](https://github.com/horriblename): |  | ||||||
| 
 |  | ||||||
| - Fixed empty winbar when breadcrumbs are disabled |  | ||||||
| 
 |  | ||||||
| - Added custom setupOpts for various plugins |  | ||||||
| 
 |  | ||||||
| - Removed support for deprecated plugin "nvim-compe" |  | ||||||
| 
 |  | ||||||
| [donnerinoern](https://github.com/donnerinoern): | [donnerinoern](https://github.com/donnerinoern): | ||||||
| 
 | 
 | ||||||
| - Added Gruvbox theme | - Added Gruvbox theme | ||||||
|  | @ -28,31 +20,20 @@ Release notes for release 0.6 | ||||||
| 
 | 
 | ||||||
| - Added `markdown-preview.nvim`, moved `glow.nvim` to a brand new `vim.utility.preview` category. | - Added `markdown-preview.nvim`, moved `glow.nvim` to a brand new `vim.utility.preview` category. | ||||||
| 
 | 
 | ||||||
| [notashelf](https://github.com/notashelf): |  | ||||||
| 
 |  | ||||||
| - Finished moving to `nixosOptionsDoc` in the documentation and changelog. We are fully free of asciidoc now |  | ||||||
| 
 |  | ||||||
| - Bumped plugin inputs to their latest versions |  | ||||||
| 
 |  | ||||||
| - Deprecated `presence.nvim` in favor of `neocord`. This means `vim.rich-presence.presence-nvim` is removed and will throw |  | ||||||
|   a warning if used. You are recommended to rewrite your neocord config from scratch based on the |  | ||||||
|   [official documentation](https://github.com/IogaMaster/neocord) |  | ||||||
| 
 |  | ||||||
| - Added support for css and tailwindcss through vscode-language-servers-extracted & tailwind-language-server. |  | ||||||
|   Those can be enabled through `vim.languages.css` and `vim.languages.tailwind` |  | ||||||
| 
 |  | ||||||
| - Lualine module now allows customizing `always_divide_middle`, `ignore_focus` and `disabled_filetypes` through the new |  | ||||||
|   options: [vim.statusline.lualine.alwaysDivideMiddle](vim.statusline.lualine.alwaysDivideMiddle), |  | ||||||
|   [vim.statusline.lualine.ignoreFocus](vim.statusline.lualine.ignoreFocus) and |  | ||||||
|   [vim.statusline.lualine.disabledFiletypes](vim.statusline.lualine.disabledFiletypes) |  | ||||||
| 
 |  | ||||||
| - Updated all plugin inputs to their latest versions (26.01.2024) - this brought minor color changess to the Catppuccin |  | ||||||
|   theme |  | ||||||
| 
 |  | ||||||
| [elijahimmer](https://github.com/elijahimmer) | [elijahimmer](https://github.com/elijahimmer) | ||||||
| 
 | 
 | ||||||
| - Added rose-pine theme | - Added rose-pine theme | ||||||
| 
 | 
 | ||||||
|  | [horriblename](https://github.com/horriblename): | ||||||
|  | 
 | ||||||
|  | - Fixed empty winbar when breadcrumbs are disabled | ||||||
|  | 
 | ||||||
|  | - Added custom `setupOpts` for various plugins | ||||||
|  | 
 | ||||||
|  | - Removed support for deprecated plugin "nvim-compe" | ||||||
|  | 
 | ||||||
|  | - Moved most plugins to `setupOpts` method | ||||||
|  | 
 | ||||||
| [frothymarrow](https://github.com/frothymarrow): | [frothymarrow](https://github.com/frothymarrow): | ||||||
| 
 | 
 | ||||||
| - Added option `vim.luaPackages` to wrap neovim with extra Lua packages. | - Added option `vim.luaPackages` to wrap neovim with extra Lua packages. | ||||||
|  | @ -62,3 +43,48 @@ Release notes for release 0.6 | ||||||
|   `top` and `bottom` values. `vim.fidget-nvim.align.right` has no longer any equivalent and also has been removed. |   `top` and `bottom` values. `vim.fidget-nvim.align.right` has no longer any equivalent and also has been removed. | ||||||
| 
 | 
 | ||||||
| - `which-key.nvim` categories can now be customized through [vim.binds.whichKey.register](vim.binds.whichKey.register). | - `which-key.nvim` categories can now be customized through [vim.binds.whichKey.register](vim.binds.whichKey.register). | ||||||
|  | 
 | ||||||
|  | - Added `magick` to `vim.luaPackages` for `image.nvim` | ||||||
|  | 
 | ||||||
|  | - Added `alejandra` to the default devShell. | ||||||
|  | 
 | ||||||
|  | - Migrated neovim-flake to `makeNeovimUnstable` wrapper | ||||||
|  | 
 | ||||||
|  | [notashelf](https://github.com/notashelf): | ||||||
|  | 
 | ||||||
|  | - Finished moving to `nixosOptionsDoc` in the documentation and changelog. We are fully free of asciidoc now | ||||||
|  | 
 | ||||||
|  | - Bumped plugin inputs to their latest versions | ||||||
|  | 
 | ||||||
|  | - Deprecated `presence.nvim` in favor of `neocord`. This means `vim.rich-presence.presence-nvim` is removed and will throw | ||||||
|  |   a warning if used. You are recommended to rewrite your neocord configuration from scratch based on the | ||||||
|  |   [official documentation](https://github.com/IogaMaster/neocord) | ||||||
|  | 
 | ||||||
|  | - Removed Tabnine plugin due to the usage of imperative tarball downloads. If you'd like to see it back, please make an issue. | ||||||
|  | 
 | ||||||
|  | - Added support for css and tailwindcss through vscode-language-servers-extracted & tailwind-language-server. | ||||||
|  |   Those can be enabled through `vim.languages.css` and `vim.languages.tailwind` | ||||||
|  | 
 | ||||||
|  | - Lualine module now allows customizing `always_divide_middle`, `ignore_focus` and `disabled_filetypes` through the new | ||||||
|  |   options: [vim.statusline.lualine.alwaysDivideMiddle](vim.statusline.lualine.alwaysDivideMiddle), | ||||||
|  |   [vim.statusline.lualine.ignoreFocus](vim.statusline.lualine.ignoreFocus) and | ||||||
|  |   [vim.statusline.lualine.disabledFiletypes](vim.statusline.lualine.disabledFiletypes) | ||||||
|  | 
 | ||||||
|  | - Updated all plugin inputs to their latest versions (14.04.2024) - this brought minor color changes to the Catppuccin | ||||||
|  |   theme. | ||||||
|  | 
 | ||||||
|  | - Moved home-manager module entrypoint to `flake/modules` and added an experimental Nixos module. This requires further testing | ||||||
|  |   before it can be considered ready for use. | ||||||
|  | 
 | ||||||
|  | - Made lib calls explicit. E.g. `lib.strings.optionalString` instead of `lib.optionalString`. This is a pattern expected | ||||||
|  |   to be followed by all contributors in the future. | ||||||
|  | 
 | ||||||
|  | - Added `image.nvim` for image previews. | ||||||
|  | 
 | ||||||
|  | - The final neovim package is now exposed. This means you can build the neovim package that will be added to your | ||||||
|  |   package list without rebuilding your system to test if your configuration yields a broken package. | ||||||
|  | 
 | ||||||
|  | - Changed the tree structure to distinguish between core options and plugin options. | ||||||
|  | 
 | ||||||
|  | - Added plugin auto-discovery from plugin inputs. This is mostly from | ||||||
|  |   [JordanIsaac's neovim-flake](https://github.com/jordanisaacs/neovim-flake) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue