mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
docs: wording
This commit is contained in:
parent
9e23ff355e
commit
48219eba74
1 changed files with 10 additions and 11 deletions
21
.github/CONTRIBUTING.md
vendored
21
.github/CONTRIBUTING.md
vendored
|
@ -30,22 +30,21 @@ Here are the overall boundaries I would like you to follow while contributing to
|
||||||
|
|
||||||
#### Documentation
|
#### Documentation
|
||||||
|
|
||||||
If you are making a pull request to add a
|
If you are making a pull request to add a
|
||||||
|
|
||||||
|
|
||||||
#### Style
|
#### Style
|
||||||
|
|
||||||
**Nix**
|
**Nix**
|
||||||
We use Alejandra for formatting nix code, which can be invoked directly with `nix fmt` in the repository.
|
We use Alejandra for formatting nix code, which can be invoked directly by running `nix fmt` in the repository.
|
||||||
|
|
||||||
While Alejandra is mostly opinionated on how code looks after formatting, certain formattings are done at the user's discretion.
|
While Alejandra is mostly opinionated on how code looks after formatting, certain formattings are done at the user's discretion.
|
||||||
|
|
||||||
Please use one line code for attribute sets that contain only one subset.
|
Please use one line code for attribute sets that contain only one subset.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
# parent modules should always be unfolded
|
# parent modules should always be unfolded
|
||||||
module = {
|
module = {
|
||||||
value = mkEnableOption "some description" // { default = true; };
|
value = mkEnableOption "some description" // { default = true; };
|
||||||
# same as parent modules, unfold submodules
|
# same as parent modules, unfold submodules
|
||||||
subModule = {
|
subModule = {
|
||||||
|
@ -65,15 +64,16 @@ If you move a line down after the merge operator, Alejandra will automatically u
|
||||||
module = {
|
module = {
|
||||||
key = mkEnableOption "some description" // {
|
key = mkEnableOption "some description" // {
|
||||||
default = true; # we want this to be inline
|
default = true; # we want this to be inline
|
||||||
};
|
};
|
||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
For lists, it's up mostly to your discretion but please try to avoid unfolded lists if there is only one item in the list.
|
For lists, it's up mostly to your discretion but please try to avoid unfolded lists if there is only one item in the list.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
|
|
||||||
# ok
|
# ok
|
||||||
acceptableList = [
|
acceptableList = [
|
||||||
item1
|
item1
|
||||||
item2
|
item2
|
||||||
|
@ -85,10 +85,11 @@ acceptableList = [
|
||||||
listToBeAvoided = [item1 item2 item3 item4];
|
listToBeAvoided = [item1 item2 item3 item4];
|
||||||
```
|
```
|
||||||
|
|
||||||
*This will be moved elsewhere, disregard unless you are adding a new plugin with keybinds*
|
_This will be moved elsewhere, disregard unless you are adding a new plugin with keybinds_
|
||||||
|
|
||||||
#### Keybinds
|
#### Keybinds
|
||||||
|
|
||||||
##### Custom key mappings support for a plugin
|
##### Custom key mappings support for a plugin
|
||||||
|
|
||||||
To add custom keymappings to a plugin, a couple of helper functions are available in the project.
|
To add custom keymappings to a plugin, a couple of helper functions are available in the project.
|
||||||
|
|
||||||
|
@ -237,5 +238,3 @@ in {
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have come across a plugin that has an API that doesn't seem to easily allow custom keybindings, don't be scared to implement a draft PR. We'll help you get it done.
|
If you have come across a plugin that has an API that doesn't seem to easily allow custom keybindings, don't be scared to implement a draft PR. We'll help you get it done.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue