mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
docs: rename all instances of neovim-flake
to nvf
This commit is contained in:
parent
ebe0d6c960
commit
227f80ac9d
36 changed files with 430 additions and 278 deletions
|
@ -1,6 +1,7 @@
|
|||
# Custom Neovim Package {#ch-custom-package}
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
```nix
|
||||
{inputs, pkgs, ...}: {
|
||||
|
@ -9,8 +10,9 @@ As of v0.5, you may now specify the neovim package that will be wrapped with you
|
|||
}
|
||||
```
|
||||
|
||||
The neovim-nightly-overlay always exposes an unwrapped package. If using a different source, you are highly
|
||||
recommended to get an "unwrapped" version of the neovim package, similar to `neovim-unwrapped` in nixpkgs.
|
||||
The neovim-nightly-overlay always exposes an unwrapped package. If using a
|
||||
different source, you are highly recommended to get an "unwrapped" version of
|
||||
the neovim package, similar to `neovim-unwrapped` in nixpkgs.
|
||||
|
||||
```nix
|
||||
{ pkgs, ...}: {
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# Custom Plugins {#ch-custom-plugins}
|
||||
|
||||
Neovim-flake, by default, exposes a wide variety of plugins as module options
|
||||
for your convience and bundles necessary dependencies into neovim-flake's
|
||||
runtime. In case a plugin is not available in neovim-flake, you may consider
|
||||
making a pull request to neovim-flake to include it as a module or you may add
|
||||
it to your configuration locally.
|
||||
**nvf**, by default, exposes a wide variety of plugins as module options
|
||||
for your convience and bundles necessary dependencies into **nvf**'s runtime.
|
||||
In case a plugin is not available in **nvf**, you may consider making a pull
|
||||
request to **nvf** to include it as a module or you may add it to your
|
||||
configuration locally.
|
||||
|
||||
## Adding Plugins {#ch-adding-plugins}
|
||||
|
||||
There are multiple ways of adding custom plugins to your neovim-flake
|
||||
configuration.
|
||||
There are multiple ways of adding custom plugins to your **nvf** configuration.
|
||||
|
||||
You can use custom plugins, before they are implemented in the flake. To add a
|
||||
plugin, you need to add it to your config's `vim.startPlugins` array.
|
||||
plugin to the runtime, you need to add it to the `vim.startPlugins` list in
|
||||
your configuration.
|
||||
|
||||
Adding a plugin to `startPlugins` will not allow you to configure the plugin
|
||||
that you have addeed, but neovim-flake provides multiple way of configuring any
|
||||
that you have adeed, but **nvf** provides multiple way of configuring any
|
||||
custom plugins that you might have added to your configuration.
|
||||
|
||||
```{=include=} sections
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
# Configuring {#sec-configuring-plugins}
|
||||
|
||||
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 `config.vim.configRC` or `config.vim.luaConfigRC`
|
||||
respectively. These options are attribute sets, and you need to give the configuration you're adding some name, like this:
|
||||
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:
|
||||
|
||||
```nix
|
||||
{
|
||||
|
@ -13,11 +15,12 @@ respectively. These options are attribute sets, and you need to give the configu
|
|||
```
|
||||
|
||||
:::{.note}
|
||||
If your configuration needs to be put in a specific place in the config, you can use functions from
|
||||
`inputs.neovim-flake.lib.nvim.dag` to order it.
|
||||
Refer to https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix to find out more about
|
||||
the DAG system.
|
||||
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
|
||||
https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix
|
||||
to find out more about the DAG system.
|
||||
:::
|
||||
|
||||
Also, if you successfully made your plugin work, please make a PR to add it to the flake, or open an issue
|
||||
with your findings so that we can make it available for everyone easily.
|
||||
If you successfully made your plugin work, please feel free to create a PR to
|
||||
add it to **nvf** or open an issue with your findings so that we can make it
|
||||
available for everyone easily.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# New Method {#sec-new-method}
|
||||
|
||||
As of version **0.5**, we have a more extensive API for configuring plugins, under `vim.extraPlugins`.
|
||||
|
||||
Instead of using DAGs exposed by the library, you may use the extra plugin module as follows:
|
||||
As of version **0.5**, we have a more extensive API for configuring plugins,
|
||||
under `vim.extraPlugins`. Instead of using DAGs exposed by the library, you may
|
||||
use the extra plugin module as follows:
|
||||
|
||||
```nix
|
||||
{
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
# Old Method {#sec-old-method}
|
||||
|
||||
Prior to version 0.5, the method of adding new plugins was adding the plugin package to `vim.startPlugins` and add
|
||||
its configuration as a DAG under `vim.configRC` or `vim.luaConfigRC`. Users who have not yet updated to 0.5, or prefer
|
||||
a more hands-on approach may use the old method where the load order of the plugins is determined by DAGs.
|
||||
Prior to version 0.5, the method of adding new plugins was adding the plugin
|
||||
package to `vim.startPlugins` and add its configuration as a DAG under one of
|
||||
`vim.configRC` or `vim.luaConfigRC`. Users who have not yet updated to 0.5, or
|
||||
prefer a more hands-on approach may use the old method where the load order of
|
||||
the plugins is determined by DAGs.
|
||||
|
||||
## Adding plugins {#sec-adding-plugins}
|
||||
|
||||
To add a plugin to neovim-flake's runtime, you may add it
|
||||
To add a plugin to **nvf**'s runtime, you may add it
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
|
@ -16,13 +18,13 @@ To add a plugin to neovim-flake's runtime, you may add it
|
|||
}
|
||||
```
|
||||
|
||||
And to configure the added plugin, you can use the `luaConfigRC` option to provide configuration
|
||||
as a DAG using the neovim-flake extended library.
|
||||
And to configure the added plugin, you can use the `luaConfigRC` option to
|
||||
provide configuration as a DAG using the **nvf** extended library.
|
||||
|
||||
```nix
|
||||
{inputs, ...}: let
|
||||
# assuming you have an input called neovim-flake pointing at the neovim-flake repo
|
||||
inherit (inputs.neovim-flake.lib.nvim.dag) entryAnywhere;
|
||||
# assuming you have an input called nvf pointing at the nvf repository
|
||||
inherit (inputs.nvf.lib.nvim.dag) entryAnywhere;
|
||||
in {
|
||||
vim.luaConfigRC.aerial-nvim= entryAnywhere ''
|
||||
require('aerial').setup {
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
# Using DAGs {#ch-using-dags}
|
||||
|
||||
We conform to the NixOS options types for the most part, however, a noteworthy addition
|
||||
for certain options is the [**DAG (Directed acyclic graph)**](https://en.wikipedia.org/wiki/Directed_acyclic_graph)
|
||||
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`.
|
||||
We conform to the NixOS options types for the most part, however, a noteworthy
|
||||
addition for certain options is the [**DAG
|
||||
(Directed acyclic graph)**](https://en.wikipedia.org/wiki/Directed_acyclic_graph)
|
||||
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 manual](https://raw.githubusercontent.com/nix-community/home-manager/master/docs/manual/writing-modules/types.md) explains the overal usage logic of the DAG typee
|
||||
The below section, mostly taken from the [home-manager
|
||||
manual](https://raw.githubusercontent.com/nix-community/home-manager/master/docs/manual/writing-modules/types.md)
|
||||
explains in more detail the overall usage logic of the DAG type.
|
||||
|
||||
## entryAnywhere {#sec-types-dag-entryAnywhere}
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# Language Support {#ch-languages}
|
||||
|
||||
Language specific support means there is a combination of language specific plugins, `treesitter` support, `nvim-lspconfig` language servers, and `null-ls`
|
||||
integration. This gets you capabilities ranging from autocompletion to formatting to diagnostics. The following languages have sections under the `vim.languages`
|
||||
Language specific support means there is a combination of language specific
|
||||
plugins, `treesitter` support, `nvim-lspconfig` language servers, and `null-ls`
|
||||
integration. This gets you capabilities ranging from autocompletion to formatting
|
||||
to diagnostics. The following languages have sections under the `vim.languages`
|
||||
attribute.
|
||||
|
||||
- Rust: [vim.languages.rust.enable](#opt-vim.languages.rust.enable)
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
# LSP Custom Packages/Command {#sec-languages-custom-lsp-packages}
|
||||
|
||||
In any of the `opt.languages.<language>.lsp.package` options you can provide your own LSP package, or provide
|
||||
the command to launch the language server, as a list of strings.
|
||||
|
||||
You can use this to skip automatic installation of a language server, and instead
|
||||
use the one found in your `$PATH` during runtime, for example:
|
||||
In any of the `opt.languages.<language>.lsp.package` options you can provide
|
||||
your own LSP package, or provide the command to launch the language server, as
|
||||
a list of strings. You can use this to skip automatic installation of a language
|
||||
server, and instead use the one found in your `$PATH` during runtime, for
|
||||
example:
|
||||
|
||||
```nix
|
||||
vim.languages.java = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
# this expects jdt-language-server to be in your PATH
|
||||
# or in `vim.extraPackages`
|
||||
package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue