-
I am trying to get lualine to display relative paths. The lua should look like this: {'filename', path = 1} But I can't figure out what my string should look like to produce this lua. I've tried many variations along the lines of: {
plugins.lualine.sections.lualine_c = [ "filename" "path = 1" ];
} and {
plugins.lualine.sections.lualine_c = [ "filename, path = 1" ];
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Very important remark indeed ! {
plugins.lualine.sections.lualine_c = {
"@" = "filename";
path = 1;
};
} The " |
Beta Was this translation helpful? Give feedback.
-
I see, thanks for the reply. I did see this syntax in the source but didn't know what it meant. Unfortunately this solution results in an error because it isn't in a list (is this conversion supposed to happen automatically in the helper functions?): error: A definition for option `plugins.lualine.sections.lualine_c' is not of type `null or (list of (string or (submodule)))'. Definition values:
- In `/nix/store/5qjm9v9ifrwhzv7zywb71g04gmn7hl90-source/config/lualine.nix':
{
"@" = "filename";
path = 1;
}
Sticking it in a list also causes an error: error: The option `plugins.lualine.sections.lualine_c."[definition 1-entry 1]"."@"' does not exist. Definition values:
- In `/nix/store/jkbgyjjfzbqvkfzv325y8wbp4nqdzwvy-source/config/lualine.nix': "filename" Do I need to define this option as a full module? Is it possible to accomplish this with a list of strings? |
Beta Was this translation helpful? Give feedback.
-
I think you can do: {
plugins.lualine.sections.lualine_c = [{
name = "filename";
extraConfig = {
path = 1;
};
}];
} |
Beta Was this translation helpful? Give feedback.
I think you can do: