Commit graph

13 commits

Author SHA1 Message Date
polykernel c7592b747b
treewide: prefer XDG variables over dot directories
Currently, dot directories and XDG base directories are used
inconsistently in the Home Manager option declarations. This creates
ambiguity for the user as to where the location of the file should be
albeit this is rarely encountered in practice as it is sufficient to
read upstream documentation. The rationale is to make declarations
consistent and make a clear distinction between hardcoded and modular
specifications.

References to ~/.config in relevant nixpkgs modules were untouched as
the location is hardcoded upstream[1]. Furthermore, modules of
programs which do not follow XDG specifications were also untouched.

Generalization of tilde(~) expansions to $HOME were also considered,
however there isn't sufficient rationale despite the use of $HOME
being more universal. The expansion is standardized in POSIX[2] and is
essentially portable across all shells, thus there is no pragmatic
value to introducing the change.

[1] https://github.com/nixos/nixpkgs/blob/master/pkgs/top-level/impure.nix
[2] https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_01
2021-12-10 23:51:44 +01:00
Naïm Favier bd11e2c5e6
Replace usage of literalExample
Instead use the new function `literalExpression`. See

  https://github.com/NixOS/nixpkgs/pull/136909
2021-10-13 00:16:10 +02:00
Manuel Mendez 7582090eb0
kakoune: Fix reference to group in hook config (#1820)
Fixes "undefined variable 'group' at .../kakoune.nix:577
2021-02-22 22:21:36 +01:00
Daniel Gorin 96e2f1bdf0
kakoune: add support for plugins
The kakoune editor has a plugin mechanism and several plugins are
already packaged under `pkgs.kakounePlugins`. However, adding these
packages to `home.packages` is not enough: the `kakoune` package needs
to be configured with the list of plugins to include, so that they get
sourced on start-up.

We add a `programs.kakoune.plugins` option, analogous to
`programs.vim.plugins`.

The change is backwards compatible since `pkgs.kakoune` is defined as

    wrapKakoune kakoune-unwrapped { };

and `wrapKakoune` defaults the list of plugins to empty.

PR #1356
2020-08-13 23:45:49 +02:00
Daniel Gorin d1f4d1514d
kakoune: escape showWhitespace separators
We were passing the separators for the `show-whitespaces` highlighter
verbatim. This was problematic in case one wanted to use, spaces,
quotes or `%` as separators since the resulting kakoune configuration
would be invalid.

According to kakoune's docs, the separator has to be one character
long, so we can use a simple rule for escaping them. It is possible
that people has been working this around by passing, e.g. `"' '"` as
separator in order to get a space (i.e., escaped explicitly by the
user), so we just let longer strings be used verbatim.

PR #1357
2020-08-12 22:44:33 +02:00
Robin Stumm 7dc322c1eb
kakoune: support user modes in keyMappings
kakoune: support user modes in keyMappings

User modes are declared automatically.

PR #1286
2020-07-03 22:43:18 +02:00
Robin Stumm f0710115c5
kakoune: add missing hook name
PR #1185
2020-04-22 23:18:23 +02:00
Robin Stumm 86ccd8fecb
kakoune: implement whitespace highlighter config
The options under `programs.kakoune.config.showWhitespace` existed
but were not implemented.

PR #1162
2020-04-16 22:34:31 +02:00
Michael Millwood 14f83a46d0
kakoune: fix set option
The old `set-option global/ autoreload` code causes an error.

PR #1117
2020-03-30 21:33:24 +02:00
Robert Helgesson 45abf3d38a
Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
Robert Helgesson 1b987952b5 kakoune: prepend extra configuration with newline (#870)
Fixes #869
2019-10-23 20:39:52 +09:00
Robert Helgesson 35752e07fa
kakoune: add missing period at end of description 2019-08-21 20:34:43 +02:00
Sebastian Zivota 7d68c46feb
kakoune: add module 2019-07-17 22:40:26 +02:00