Commit Graph

18 Commits

Author SHA1 Message Date
Acid Bong
49f6869f71
treewide: remove file-wide with lib; in nixos/modules/programs 2024-05-12 10:11:06 +03:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
linsui
c3a2ce47a1 nixos/neovim: fix runtime.text 2023-05-13 23:41:50 +02:00
linsui
7b6d5d4158
nixos/neovim: add runtime file to etc/xdg/nvim (#221832)
Else the files in the runtime can't be accessed from the vimrc. I also remove the /etc. I thought it's a leftover of the old runtime implementation which is replaced in 307b125.

Co-authored-by: linsui <linsui555@gmail.com>
2023-04-18 23:20:54 +02:00
ivanbrennan
418fda2293
nixos.programs.neovim: fix runtime
When this module was first introduced, it processed the runtime option
in a way that nested the resulting files and directories under an etc
directory.
https://github.com/NixOS/nixpkgs/pull/98506/files#diff-685092dbb1852fbf30857fe3505d25dc471dc79d0f31c466523b5f5822b68127R11-R21

That implementation relied on nixos/modules/system/etc/make-etc.sh, a
script that was later removed.
eb7120dc79

The implementation was updated to use linkFarm, which changed the
behavior slightly, in that the configured files and directories are no
longer automatically nested under an etc directory.
307b1253a7

But the module still configures neovim's runtimepath in a way that
assumes the old nesting behavior.
04f574a1c0/nixos/modules/programs/neovim.nix (L173)

Restore the original behavior, nesting runtime files and directories
under an etc directory.
2023-01-08 16:15:56 -05:00
pacien
4e1ffaca01 nixos/neovim: add note about not loading init.vim
Neovim does not load the user configuration when enabled through the
module, unlike when the package is added to the home or system packages
directly. I think this difference is worth mentioning in the module's
documentation, because it was confusing to some friends.
2022-10-10 17:26:15 +02:00
pennae
9547123258 nixos/*: convert internal option descriptions to MD
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae
9c8531c8a5 nixos/*: replace <replaceable>s with «thing»
we can't embed syntactic annotations of this kind in markdown code
blocks without yet another extension. replaceable is rare enough to make
this not much worth it, so we'll go with «thing» instead. the module
system already uses this format for its placeholder names in attrsOf
paths.
2022-08-03 21:08:58 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Thiago Kenji Okada
b142bd35d5 nixos/neovim: fix withRuby, add with{Python3,NodeJs}
`withRuby` was declared but not referenced before, this commit fixes
this issue.

It also adds support for `withPython3` and `withNodeJs`.
2021-11-07 19:40:07 +01:00
Christian Kögler
6c0804f1b0 nixos/neovim: Respect option defaultEditor 2021-10-28 18:51:44 +02:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Janne Heß
307b1253a7 nixos/neovim: Fix neovim runtime path generation 2021-08-04 09:44:04 +02:00
Matthieu Coudron
cd7db06935
programs.neovim: fix documentation (#99023)
brackets broke doc generation on master
2020-09-28 22:42:18 +02:00
Matthieu Coudron
1e510a65a3
programs.neovim: init (#98506)
* programs.neovim: init

Allows to build a proper runtime folder with after/ ftplugin/ parser/ subfolders etc.
(neo)vim expects a few different folders, for instance to load
treesitter parsers.

This PR reuses the builder from the etc module, notwithstanding the
different modes/uid/gid.

This allows to get rid of some autocmd in customRC (via proper use of
the folder hierarchy) which is a win in my opinion.
2020-09-28 17:07:45 +02:00