gabagool
This commit is contained in:
parent
e13f982d3f
commit
b5aad4bee9
1 changed files with 7 additions and 7 deletions
|
|
@ -26,7 +26,8 @@ function M.statusline(options)
|
|||
api.nvim_set_hl(id, "WARNS", { fg = "yellow" })
|
||||
api.nvim_set_hl(id, "HINTS", { fg = "lightblue" })
|
||||
|
||||
table.insert(parts,
|
||||
table.insert(
|
||||
parts,
|
||||
[[%*%{luaeval("vim.bo.filetype")} %#HINTS#[%{luaeval("require'darioline'.hints()")}] %#WARNS#[%{luaeval("require'darioline'.warns()")}] %#ERRORS#[%{luaeval("require'darioline'.errors()")}] ]]
|
||||
)
|
||||
end
|
||||
|
|
@ -34,8 +35,7 @@ function M.statusline(options)
|
|||
table.insert(parts, [[%=%*%{luaeval("require'darioline'.pos()")}]])
|
||||
end
|
||||
|
||||
|
||||
return table.concat(parts, '')
|
||||
return table.concat(parts, "")
|
||||
end
|
||||
|
||||
function M.pos()
|
||||
|
|
@ -46,11 +46,11 @@ function M.pos()
|
|||
end
|
||||
|
||||
function M.errors()
|
||||
return (vim.diagnostic.count(0)[vim.diagnostic.severity.E] or 0)
|
||||
return (vim.diagnostic.count(0)[vim.diagnostic.severity.ERROR] or 0)
|
||||
end
|
||||
|
||||
function M.warns()
|
||||
return (vim.diagnostic.count(0)[vim.diagnostic.severity.W] or 0)
|
||||
return (vim.diagnostic.count(0)[vim.diagnostic.severity.WARN] or 0)
|
||||
end
|
||||
|
||||
function M.hints()
|
||||
|
|
@ -59,8 +59,8 @@ end
|
|||
|
||||
function M.file(hilight_id)
|
||||
local buf = api.nvim_get_current_buf()
|
||||
local mode = api.nvim_get_mode().mode;
|
||||
local filename = vim.fn.fnamemodify(vim.uri_to_fname(vim.uri_from_bufnr(buf)), ':.')
|
||||
local mode = api.nvim_get_mode().mode
|
||||
local filename = vim.fn.fnamemodify(vim.uri_to_fname(vim.uri_from_bufnr(buf)), ":.")
|
||||
|
||||
if vim.bo[buf].readonly then
|
||||
filename = "[RO]" .. filename
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue