You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -30,19 +30,19 @@ This is done by making most of the options of the type `types.nullOr ....`, and
30
30
Most of nixvim is dedicated to wrapping neovim plugins such that we can configure them in Nix.
31
31
To add a new plugin you need to do the following.
32
32
33
-
1. Add a file in the correct sub-directory of [`plugins`](plugins).
33
+
1. Add a file in the correct sub-directory of [`plugins`](./plugins).
34
34
35
-
- Most plugins should be added to [`plugins/by-name/<name>`](plugins/by-name).
35
+
- Most plugins should be added to [`plugins/by-name/<name>`](./plugins/by-name).
36
36
Plugins in `by-name` are automatically imported 🚀
37
-
- Occasionally, you may wish to add a plugin to a directory outside of `by-name`, such as [`plugins/colorschemes`](plugins/colorschemes).
38
-
If so, you will also need to add your plugin to [`plugins/default.nix`](plugins/default.nix) to ensure it gets imported.
37
+
- Occasionally, you may wish to add a plugin to a directory outside of `by-name`, such as [`plugins/colorschemes`](./plugins/colorschemes).
38
+
If so, you will also need to add your plugin to [`plugins/default.nix`](./plugins/default.nix) to ensure it gets imported.
39
39
Note: the imports list is sorted and grouped. In vim, you can usually use `V` (visual-line mode) with the `:sort` command to achieve the desired result.
40
40
41
41
2. The vast majority of plugins fall into one of those two categories:
42
42
43
43
-_vim plugins_: They are configured through **global variables** (`g:plugin_foo_option` in vimscript and `vim.g.plugin_foo_option` in lua).\
44
44
For those, you should use the `lib.nixvim.plugins.mkVimPlugin`.\
45
-
-> See [this plugin](plugins/by-name/direnv/default.nix) for an example.
45
+
-> See [this plugin](./plugins/by-name/direnv/default.nix) for an example.
46
46
-_neovim plugins_: They are configured through a `setup` function (`require('plugin').setup({opts})`).\
47
47
For those, you should use the `lib.nixvim.plugins.mkNeovimPlugin`.\
48
48
-> See the [template](plugins/TEMPLATE.nix).
@@ -54,7 +54,7 @@ To add a new plugin you need to do the following.
54
54
The `mkNeovimPlugin` function provides a standardize way to create a `Neovim` plugin.
55
55
This is intended to be used with lua plugins that have a `setup` function,
56
56
although it is flexible enough to be used with similar variants of plugins.
57
-
A template plugin can be found in (plugins/TEMPLATE.nix)[https://github.com/nix-community/nixvim/blob/main/plugins/TEMPLATE.nix].
57
+
A template plugin can be found in [`plugins/TEMPLATE.nix`](./plugins/TEMPLATE.nix).
58
58
59
59
| Parameter | Description | Required | Default Value |
@@ -113,7 +113,7 @@ thanks to package referring to the `name` attribute.
113
113
114
114
See the [template](plugins/TEMPLATE.nix) for a starting point.
115
115
116
-
Here's a simple plugin using `mkNeovimPlugin` for reference: [lsp_lines.nvim](plugins/by-name/lsp-lines/default.nix).
116
+
Here's a simple plugin using `mkNeovimPlugin` for reference: [lsp_lines.nvim](./plugins/by-name/lsp-lines/default.nix).
117
117
118
118
#### `mkVimPlugin`
119
119
@@ -214,7 +214,7 @@ In either case, you don't need to bother implementing this part. It is done auto
214
214
215
215
Most of the tests of nixvim consist of creating a neovim derivation with the supplied nixvim configuration, and then try to execute neovim to check for any output. All output is considered to be an error.
216
216
217
-
The tests are located in the [tests/test-sources](tests/test-sources) directory, and should be added to a file in the same hierarchy than the repository. For example if a plugin is defined in `./plugins/ui/foo.nix` the test should be added in `./tests/test-sources/ui/foo.nix`.
217
+
The tests are located in the [tests/test-sources](./tests/test-sources) directory, and should be added to a file in the same hierarchy than the repository. For example if a plugin is defined in `./plugins/ui/foo.nix` the test should be added in `./tests/test-sources/ui/foo.nix`.
218
218
219
219
Tests can either be a simple attribute set, or a function taking `{pkgs}` as an input. The keys of the set are configuration names, and the values are a nixvim configuration.
0 commit comments