Skip to content

Commit cb1462f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into add-mini-nvim
2 parents 5f00d7d + 45a6d9b commit cb1462f

File tree

3 files changed

+42
-15
lines changed

3 files changed

+42
-15
lines changed

docs/manual/hacking/guidelines.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@ necessarily) before you start developing.
1414

1515
## Adding Documentation {#sec-guidelines-documentation}
1616

17-
Most, if not all, changes warrant changes to the documentation. Module options
18-
should be documented with
19-
[Nixpkgs-flavoured Markdown](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup),
20-
albeit with exceptions.
17+
[Nixpkgs Flavoured Markdown]: https://github.com/NixOS/nixpkgs/blob/master/doc/README.md#syntax
2118

22-
::: {.note} As of **v0.5**, **nvf** is itself documented using full markdown in
23-
both module options and the manual. With **v0.6**, this manual has also been
24-
converted to markdown in full. :::
19+
Almost all changes warrant updates to the documentation: at the very least, you
20+
must update the changelog. Both the manual and module options use
21+
[Nixpkgs Flavoured Markdown].
2522

2623
The HTML version of this manual containing both the module option descriptions
2724
and the documentation of **nvf** (such as this page) can be generated and opened
@@ -117,10 +114,11 @@ applies to string literals and module descriptions and documentation.
117114

118115
### Nix {#sec-code-style-nix}
119116

120-
**nvf** is formatted by the
121-
[alejandra](https://github.com/kamadorueda/alejandra) tool and the formatting is
122-
checked in the pull request and push workflows. Run the `nix fmt` command inside
123-
the project repository before submitting your pull request.
117+
[alejandra]: https://github.com/kamadorueda/alejandra
118+
119+
**nvf** is formatted by the [alejandra] tool and the formatting is checked in
120+
the pull request and push workflows. Run the `nix fmt` command inside the
121+
project repository before submitting your pull request.
124122

125123
While Alejandra is mostly opinionated on how code looks after formatting,
126124
certain changes are done at the user's discretion based on how the original code
@@ -138,10 +136,14 @@ module = {
138136
# same as parent modules, unfold submodules
139137
subModule = {
140138
# this is an option that contains more than one nested value
139+
# Note: try to be careful about the ordering of `mkOption` arguments.
140+
# General rule of thumb is to order from least to most likely to change.
141+
# This is, for most cases, type < default < description.
142+
# Example, if present, would be between default and description
141143
someOtherValue = mkOption {
142144
type = lib.types.bool;
143-
description = "Some other description";
144145
default = true;
146+
description = "Some other description";
145147
};
146148
};
147149
}

docs/release-notes/rl-0.8.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141

4242
[horriblename](https://github.com/horriblename):
4343

44-
[aerial.nvim](https://github.com/stevearc/aerial.nvim)
45-
[nvim-ufo](https://github.com/kevinhwang91/nvim-ufo)
44+
[aerial.nvim]: (https://github.com/stevearc/aerial.nvim)
45+
[nvim-ufo]: (https://github.com/kevinhwang91/nvim-ufo)
4646

4747
- Add [aerial.nvim]
4848
- Add [nvim-ufo]
@@ -52,7 +52,8 @@
5252
- Remove `vim.notes.obsidian.setupOpts.dir`, which was set by default. Fixes
5353
issue with setting the workspace directory.
5454
- Add `vim.snippets.luasnip.setupOpts`, which was previously missing.
55-
- Add `"prettierd"` as a formatter option in `vim.languages.markdown.format.type`.
55+
- Add `"prettierd"` as a formatter option in
56+
`vim.languages.markdown.format.type`.
5657
- Add the following plugins from [mini.nvim](https://github.com/echasnovski/mini.nvim)
5758
- `mini.ai`
5859
- `mini.align`
@@ -105,3 +106,9 @@
105106
[solargraph]: https://github.com/castwide/solargraph
106107

107108
- Add Ruby support under `vim.languages.ruby` using [solargraph].
109+
110+
[thamenato](https://github.com/thamenato):
111+
112+
[ruff]: (https://github.com/astral-sh/ruff)
113+
114+
- Add [ruff] as a formatter option in `vim.languages.python.format.type`.

modules/plugins/languages/python.nix

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,24 @@
106106
)
107107
'';
108108
};
109+
110+
ruff = {
111+
package = pkgs.writeShellApplication {
112+
name = "ruff";
113+
runtimeInputs = [pkgs.ruff];
114+
text = ''
115+
ruff format -
116+
'';
117+
};
118+
nullConfig = ''
119+
table.insert(
120+
ls_sources,
121+
null_ls.builtins.formatting.ruff.with({
122+
command = "${cfg.format.package}/bin/ruff",
123+
})
124+
)
125+
'';
126+
};
109127
};
110128

111129
defaultDebugger = "debugpy";

0 commit comments

Comments
 (0)