mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/lightline: extraConfiguLua -> luaConfig
This commit is contained in:
parent
455c5bff3e
commit
e60af13695
1 changed files with 11 additions and 11 deletions
|
@ -22,20 +22,20 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
settings.component_function = {
|
settings.component_function = {
|
||||||
readonly = "LightlineReadonly";
|
readonly = "LightlineReadonly";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
extraConfigLua = '''
|
luaConfig.pre= '''
|
||||||
function LightlineReadonly()
|
function LightlineReadonly()
|
||||||
local is_readonly = vim.bo.readonly == 1
|
local is_readonly = vim.bo.readonly == 1
|
||||||
local filetype = vim.bo.filetype
|
local filetype = vim.bo.filetype
|
||||||
|
|
||||||
if is_readonly and filetype ~= "help" then
|
if is_readonly and filetype ~= "help" then
|
||||||
return "RO"
|
return "RO"
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
''';
|
||||||
''';
|
};
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: Added 2024-08-23, remove after 24.11
|
# TODO: Added 2024-08-23, remove after 24.11
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue