mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-31 23:40:12 +02:00
plugins: Introduce helpers.defaultNullOpts.mkLuaFn (#855)
This allows to avoid calling `mkRaw` on lua functions, as they will get applied automatically. This could also help in the future to refactor the use of Lua code to make it more user-friendly.
This commit is contained in:
parent
b38dbdb0dc
commit
1d8e7906c9
30 changed files with 140 additions and 119 deletions
|
@ -59,7 +59,7 @@ in {
|
|||
'';
|
||||
|
||||
modified =
|
||||
helpers.defaultNullOpts.mkStr
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
''
|
||||
function(bufnr)
|
||||
return vim.bo[bufnr].modified
|
||||
|
@ -75,7 +75,7 @@ in {
|
|||
'';
|
||||
|
||||
leadCustomSection =
|
||||
helpers.defaultNullOpts.mkStr
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
''
|
||||
function()
|
||||
return " "
|
||||
|
@ -87,7 +87,7 @@ in {
|
|||
'';
|
||||
|
||||
customSection =
|
||||
helpers.defaultNullOpts.mkStr
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
''
|
||||
function()
|
||||
return " "
|
||||
|
@ -173,10 +173,10 @@ in {
|
|||
show_dirname = showDirname;
|
||||
show_basename = showBasename;
|
||||
show_modified = showModified;
|
||||
modified = helpers.mkRaw modified;
|
||||
inherit modified;
|
||||
show_navic = showNavic;
|
||||
lead_custom_section = helpers.mkRaw leadCustomSection;
|
||||
custom_section = helpers.mkRaw customSection;
|
||||
lead_custom_section = leadCustomSection;
|
||||
custom_section = customSection;
|
||||
inherit theme;
|
||||
context_follow_icon_color = contextFollowIconColor;
|
||||
symbols = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue