Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanarijit committed May 28, 2021
1 parent b284124 commit 6412856
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1140,8 +1140,7 @@ pub enum ExternalMsg {
CallSilently(Command),

/// Call a Lua function.
/// The complete app state (exportable using `PrintAppStateAndQuit` or `Debug`)
/// will be passed to the function as argument.
/// A `CallLuaArg` object will be passed to the function as argument.
/// The function can optionally return a list of messages for xplr to handle
/// after the executing the function.
///
Expand Down
16 changes: 10 additions & 6 deletions src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1995,8 +1995,9 @@ xplr.config.modes.builtin.switch_layout = {
xplr.config.modes.custom = {}

-- Function
---- Formaters
------ Index
---- Builtin
------ Formaters
-------- Format index column
xplr.fn.builtin.fmt_general_table_row_cols_0 = function(m)
local r = ""
if m.is_before_focus then
Expand All @@ -2010,7 +2011,7 @@ xplr.fn.builtin.fmt_general_table_row_cols_0 = function(m)
return r
end

------ Path
-------- Format path column
xplr.fn.builtin.fmt_general_table_row_cols_1 = function(m)
local r = m.tree .. m.prefix

Expand Down Expand Up @@ -2045,7 +2046,7 @@ xplr.fn.builtin.fmt_general_table_row_cols_1 = function(m)
return r
end

------ Permissions
-------- Format permissions column
xplr.fn.builtin.fmt_general_table_row_cols_2 = function(m)

local no_color = os.getenv("NO_COLOR")
Expand Down Expand Up @@ -2133,7 +2134,7 @@ xplr.fn.builtin.fmt_general_table_row_cols_2 = function(m)
return r
end

------ Size
-------- Format size column
xplr.fn.builtin.fmt_general_table_row_cols_3 = function(m)
if not m.is_dir then
return m.human_size
Expand All @@ -2142,11 +2143,14 @@ xplr.fn.builtin.fmt_general_table_row_cols_3 = function(m)
end
end

------ Mime
-------- Format mime column
xplr.fn.builtin.fmt_general_table_row_cols_4 = function(m)
if m.is_symlink and not m.is_broken then
return m.symlink.mime_essence
else
return m.mime_essence
end
end

---- Custom
xplr.fn.custom = {}

0 comments on commit 6412856

Please sign in to comment.