feat: initial commit
- basic config according to spec
This commit is contained in:
commit
9b0446c5f6
36 files changed
+1114
No files matched your search
@@ -0,0 +1,46 @@
|
||||
local function lsp_names()
|
||||
local names = vim.tbl_map(function(c)
|
||||
return c.name
|
||||
end, vim.lsp.get_clients({ bufnr = 0 }))
|
||||
return table.concat(names, ",")
|
||||
end
|
||||
|
||||
local function agent_marker()
|
||||
if not package.loaded["sidekick"] then
|
||||
return ""
|
||||
end
|
||||
local ok, sessions = pcall(function()
|
||||
return require("sidekick.status").cli()
|
||||
end)
|
||||
return (ok and sessions and #sessions > 0) and "agent" or ""
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-mini/mini.statusline",
|
||||
lazy = false,
|
||||
config = function()
|
||||
local sl = require("mini.statusline")
|
||||
sl.setup({
|
||||
content = {
|
||||
active = function()
|
||||
local mode, mode_hl = sl.section_mode({ trunc_width = 120 })
|
||||
local git = sl.section_git({ trunc_width = 40 })
|
||||
local diagnostics = sl.section_diagnostics({ trunc_width = 75 })
|
||||
local filename = sl.section_filename({ trunc_width = 140 })
|
||||
local location = sl.section_location({ trunc_width = 75 })
|
||||
return sl.combine_groups({
|
||||
{ hl = mode_hl, strings = { mode } },
|
||||
{ hl = "MiniStatuslineDevinfo", strings = { git, diagnostics } },
|
||||
"%<",
|
||||
{ hl = "MiniStatuslineFilename", strings = { filename } },
|
||||
"%=",
|
||||
{ hl = "MiniStatuslineFileinfo", strings = { agent_marker(), lsp_names() } },
|
||||
{ hl = mode_hl, strings = { location } },
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user