diff --git a/index.xhtml b/index.xhtml index 3d2511e..909a076 100644 --- a/index.xhtml +++ b/index.xhtml @@ -33,7 +33,7 @@
Table of Contents
Table of Contents
If you noticed a bug caused by nvf then please consider reporting it over the issue tracker.
Bugfixes, feature additions and upstreamed changes from your local configurations are always welcome in the the pull requests tab.
@@ -292,7 +292,7 @@ in theAs of v0.5, you may now specify the Neovim package that will be wrapped with +
As of v0.5, you may now specify the Neovim package that will be wrapped with
your configuration. This is done with the vim.package
option.
{inputs, pkgs, ...}: {
# using the neovim-nightly overlay
vim.package = inputs.neovim-overlay.packages.${pkgs.system}.neovim;
@@ -313,13 +313,30 @@ plugin to the runtime, you need to add it to the vim.start
your configuration.Adding a plugin to startPlugins
will not allow you to configure the plugin
that you have adeed, but nvf provides multiple way of configuring any
custom plugins that you might have added to your configuration.
Configuring
Just making the plugin to your Neovim configuration available might not always
-be enough. In that case, you can write custom vimscript or lua config, using
-either config.vim.configRC
or config.vim.luaConfigRC
respectively. Both of
-these options are attribute sets, and you need to give the configuration you’re
-adding some name, like this:
{
- # this will create an "aquarium" section in your init.vim with the contents of your custom config
+be enough. In that case, you can write custom lua config using either
+config.vim.extraPlugins
(which has the setup
field) or
+config.vim.luaConfigRC
. The first option uses an attribute set, which maps DAG
+section names to a custom type, which has the fields package
, after
,
+setup
. They allow you to set the package of the plugin, the sections its setup
+code should be after (note that the extraPlugins
option has its own DAG
+scope), and the its setup code respectively. For example:config.vim.extraPlugins = with pkgs.vimPlugins; {
+ aerial = {
+ package = aerial-nvim;
+ setup = "require('aerial').setup {}";
+ };
+
+ harpoon = {
+ package = harpoon;
+ setup = "require('harpoon').setup {}";
+ after = ["aerial"]; # place harpoon configuration after aerial
+ };
+}
+
The second option also uses an attribute set, but this one is resolved as a DAG
+directly. The attribute names denote the section names, and the values lua code.
+For example:
{
+ # this will create an "aquarium" section in your init.lua with the contents of your custom config
# which will be *appended* to the rest of your configuration, inside your init.vim
- config.vim.configRC.aquarium = "colorscheme aquiarum";
+ config.vim.luaConfigRC.aquarium = "vim.cmd('colorscheme aquiarum')";
}
Note
If your configuration needs to be put in a specific place in the config, you
can use functions from inputs.nvf.lib.nvim.dag
to order it. Refer to
@@ -400,7 +417,7 @@ type which is borrowed from home-manager’s extended library. This type is most
used for topologically sorting strings. The DAG type allows the attribute set
entries to express dependency relations among themselves. This can, for
example, be used to control the order of configuration sections in your
-configRC
or luaConfigRC
.
The below section, mostly taken from the home-manager
+luaConfigRC
.
The below section, mostly taken from the home-manager
manual
explains in more detail the overall usage logic of the DAG type.
entryAnywhere
lib.dag.entryAnywhere (value: T) : DagEntry<T>
Indicates that value
can be placed anywhere within the DAG.
This is also the default for plain attribute set entries, that
@@ -476,6 +493,14 @@ attribute names in afters
. For example
+ DAG entries in nvf
From the previous chapter, it should be clear that DAGs are useful, because you
+can add code that relies on other code. However, if you don’t know what the
+entries are called, it’s hard to do that, so here is a list of the internal
+entries in nvf:
vim.luaConfigRC
(top-level DAG):
(luaConfigPre
) - not a part of the actual DAG, instead, it’s simply
+inserted before the rest of the DAG
globalsScript
- used to set globals defined in vim.globals
basic
- used to set basic configuration options
theme
- used to set up the theme, which has to be done before other plugins
pluginConfigs
- the result of the nested vim.pluginRC
(internal option,
+see the Custom Plugins page for adding your own
+plugins) DAG, used to set up internal plugins
extraPluginConfigs
- the result of vim.extraPlugins
, which is not a
+direct DAG, but is converted to, and resolved as one internally
mappings
- the result of vim.maps
Hacking nvf
Table of Contents
nvf is designed for developers as much as it is for the end user. I would like any potential contributor
to be able to propagate their desired changes into the repository without the extra effort. As such, below are guides
diff --git a/options.html b/options.html
index 23849e3..b16694b 100644
--- a/options.html
+++ b/options.html
@@ -1735,38 +1735,6 @@ null or string
-
-
- vim.configRC
-
-
-
-
-Contents of vimrc, either as a string or a DAG.
If this option is passed as a DAG, it will be resolved
-according to the DAG resolution rules (e.g. entryBefore
-or entryAfter) as per the nvf extended library.
-
-Type:
-(DAG of strings concatenated with “\n”) or string
-
-Default:
-{ }
-
-Example:
" Set the tab size to 4 spaces
-set tabstop=4
-set shiftwidth=4
-set expandtab
-
-
-Declared by:
-
-
-
-<nvf/modules/wrapper/rc/options.nix>
-
-
-
-
vim.cursorlineOpt
@@ -7877,8 +7845,8 @@ boolean
An attribute set containing global variable values
for storing vim variables as early as possible. If
-populated, this soption will set vim variables in the
-built configRC as the first item.
E.g. {foo = “bar”} will set g:foo
to “bar” where
+populated, this option will set vim variables in the
+built luaConfigRC as the first item.
E.g. {foo = “bar”} will set vim.g.foo
to “bar” where
the type of bar
in the resulting vimscript will be
infered from the type of the value in the {name = value}
pair.
@@ -13507,13 +13475,13 @@ package
-The leader key to be used internally
+The leader key used for <leader>
mappings
Type:
-null or string
+string
Default:
-null
+" "
Declared by:
@@ -15384,30 +15352,6 @@ list of string
-
-
- vim.mapLeaderSpace
-
-
-
-
-Map the space key to leader key
-
-Type:
-boolean
-
-Default:
-true
-
-Declared by:
-
-
-
-<nvf/modules/neovim/init/basic.nix>
-
-
-
-
vim.mapTimeout
@@ -19047,6 +18991,30 @@ list of (null or package or one of “alpha-nvim”, “bufdelete-nvim”, “ca
+
+
+ vim.pluginRC
+
+
+
+
+The DAG used to configure plugins. If a string is passed, entryAnywhere is automatically applied.
+
+Type:
+(DAG of strings concatenated with “\n”) or string
+
+Default:
+{ }
+
+Declared by:
+
+
+
+<nvf/modules/wrapper/rc/options.nix>
+
+
+
+
vim.presence.neocord.enable
@@ -24504,7 +24472,7 @@ strings concatenated with “\n”
-Supported themes can be found in supported_themes.nix
+Supported themes can be found in supportedThemes.nix
Type:
one of “catppuccin”, “dracula”, “gruvbox”, “onedark”, “oxocarbon”, “rose-pine”, “tokyonight”
diff --git a/release-notes.html b/release-notes.html
index c6a8b2f..3d2cf4c 100644
--- a/release-notes.html
+++ b/release-notes.html
@@ -141,19 +141,27 @@ a lua function. The default is “compact”, but you may change it according to
nvim-notify documentation.
Table of Contents
Release notes for release 0.7
Add support for typst under vim.languages.typst
This
+
Table of Contents
Release notes for release 0.7
In v0.7 we are removing vim.configRC
in favor of making vim.luaConfigRC
the
+top-level DAG, and thereby making the entire configuration Lua based. This
+change introduces a few breaking changes:
vim.configRC
has been removed, which means that you have to convert all of
+your custom vimscript-based configuration to Lua. As for how to do that, you
+will have to consult the Neovim documentation and your search engine.
After migrating your Vimscript-based configuration to Lua, you might not be
+able to use the same entry names in vim.luaConfigRC
, because those have also
+slightly changed. See the new DAG entries in nvf manual for more details.
Why?
Neovim being an aggressive refactor of Vim, is designed to be mainly Lua based; +making good use of its extensive Lua API. Additionally, Vimscript is slow and +brings unnecessary performance overhead while working with different +configuration formats.
+Add support for typst under vim.languages.typst
This
will enable the typst-lsp
language server, and the typstfmt
formatter
Modified type for
-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides
-from anything
to a submodule
for better type checking.
Fix null vim.lsp.mappings
generating an error and not being filtered out.
Add basic transparency support for oxocarbon
theme by setting the highlight
+vim.visuals.fidget-nvim.setupOpts.progress.display.overrides
from
+anything
to a submodule
for better type checking.
Fix null vim.lsp.mappings
generating an error and not being filtered out.
Add basic transparency support for oxocarbon
theme by setting the highlight
group for Normal
, NormalFloat
, LineNr
, SignColumn
and optionally
-NvimTreeNormal
to none
.
Fix
-vim.ui.smartcolumn.setupOpts.custom_colorcolumn
-using the wrong type int
instead of the expected type string
.
Fix unused src and version attributes in buildPlug
.
Fix broken treesitter-context keybinds in visual mode
Deprecate use of __empty
to define empty tables in lua. Empty attrset are no
-longer filtered and thus should be used instead.
Add dap-go for better dap configurations
Make noice.nvim customizable
Switch from rust-tools.nvim -to the more feature-packed [rustacean.nvim](https://github.com/mrcjkb/rustaceanvim. -This switch entails a whole bunch of new features and options, so you are -recommended to go through rustacean.nvim’s README to take a closer look at -its features and usage.
Add ocaml-lsp support.
Fix Emac typo
Move the theme
dag entry to before luaScript
.
Add rustfmt as the default formatter for Rust.
Enabled the terminal integration of catppuccin for theming Neovim’s built-in
+NvimTreeNormal
to none
.
Fix vim.ui.smartcolumn.setupOpts.custom_colorcolumn
using the wrong
+type int
instead of the expected type string
.
Fix unused src and version attributes in buildPlug
.
Fix broken treesitter-context keybinds in visual mode
Deprecate use of __empty
to define empty tables in Lua. Empty attrset are no
+longer filtered and thus should be used instead.
Add dap-go for better dap configurations
Make noice.nvim customizable
Switch from rust-tools.nvim to the more feature-packed rustaceanvim. This +switch entails a whole bunch of new features and options, so you are +recommended to go through rustacean.nvim’s README to take a closer look at its +features and usage
Add ocaml-lsp support
Fix “Emac” typo
Move the theme
dag entry to before luaScript
.
Add rustfmt as the default formatter for Rust.
Enabled the terminal integration of catppuccin for theming Neovim’s built-in terminal (this also affects toggleterm).
Migrate bufferline to setupOpts for more customizability
Use clangd
as the default language server for C languages
Expose lib.nvim.types.pluginType
, which for example allows the user to
create abstractions for adding plugins
Migrate indent-blankline to setupOpts for more customizability. While the
plugin’s options can now be found under indentBlankline.setupOpts
, the
@@ -162,13 +170,19 @@ which have been removed for the time being. These are:
eolChar
- this also had nothing to do with the plugin, please configure it
yourself by adding vim.opt.listchars:append({ eol = '<char>' })
to your
-lua configuration
Add deno fmt
as the default Markdown formatter. This will be enabled
+lua configuration
Make Neovim’s configuration file entirely Lua based. This comes with a few +breaking changes:
vim.configRC
has been removed. You will need to migrate your entries to
+Neovim-compliant Lua code, and add them to vim.luaConfigRC
instead.
+Existing vimscript configurations may be preserved in vim.cmd
functions.
+Please see Neovim documentation on vim.cmd
vim.luaScriptRC
is now the top-level DAG, and the internal vim.pluginRC
+has been introduced for setting up internal plugins. See the “DAG entries in
+nvf” manual page for more information.
Add deno fmt
as the default Markdown formatter. This will be enabled
automatically if you have autoformatting enabled, but can be disabled manually
if you choose to.
Add vim.extraLuaFiles
for optionally sourcing additional lua files in your
configuration.
Refactor programs.languages.elixir
to use lspconfig and none-ls for LSP and
formatter setups respectively. Diagnostics support is considered, and may be
-added once the credo linter has been added
-to nixpkgs. A pull request is currently open.
Remove vim-tidal and friends.
Clean up Lualine module to reduce theme dependency on Catppuccin, and fixed +added once the credo linter has been added to nixpkgs. A pull request is +currently open.
Remove vim-tidal and friends.
Clean up Lualine module to reduce theme dependency on Catppuccin, and fixed blending issues in component separators.
Add [ts-ereror-translator.nvim] extension of the TS language module, under
vim.languages.ts.extensions.ts-error-translator
to aid with Typescript
development.
Add [neo-tree.nvim] as an alternative file-tree plugin. It will be available