Skip to content

Commit

Permalink
helix: updated languages to represent the whole file instead of just …
Browse files Browse the repository at this point in the history
…the language array
  • Loading branch information
Philipp-M committed Jul 7, 2022
1 parent ca390a8 commit 8bdd7cc
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions modules/programs/helix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ in {
example = literalExpression ''
{
theme = "base16";
lsp.display-messages = true;
keys.normal = {
lsp.display-messages = true;
space.space = "file_picker";
space.w = ":w";
space.q = ":q";
Expand All @@ -42,12 +42,16 @@ in {
};

languages = mkOption {
type = types.listOf tomlFormat.type;
default = [ ];
example = [{
name = "rust";
auto-format = false;
}];
type = tomlFormat.type;
default = { };
example = literalExpression ''
{
language = [{
name = "rust";
auto-format = false;
}];
# TODO grammars check if nixpkgs tree-sitter-libs are working here...
'';
description = ''
Language specific configuration at
<filename>$XDG_CONFIG_HOME/helix/languages.toml</filename>.
Expand Down Expand Up @@ -136,9 +140,8 @@ in {
"helix/config.toml" = mkIf (cfg.settings != { }) {
source = tomlFormat.generate "helix-config" cfg.settings;
};
"helix/languages.toml" = mkIf (cfg.languages != [ ]) {
source =
tomlFormat.generate "helix-config" { language = cfg.languages; };
"helix/languages.toml" = mkIf (cfg.languages != { }) {
source = tomlFormat.generate "helix-languages-config" cfg.languages;
};
};

Expand Down

0 comments on commit 8bdd7cc

Please sign in to comment.