Skip to content

Commit

Permalink
feat(bars-and-lines): add statusline with mode text
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored and luxus committed Mar 14, 2023
1 parent cdc12ce commit 3836d18
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# heirline.nvim mode text statusline

**Website:** https://astronvim.com/Recipes/status#default-statusline-with-mode-text

This plugin specification configures the `statusline` in AstroNvim to show the mode text

![Screenshot of the statusline with mode text](https://astronvim.com/assets/images/mode_text_statusline-151d63106be999f3ac1ec3147b4e4f5a.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
return {
"rebelot/heirline.nvim",
opts = function(_, opts)
local status = require "astronvim.utils.status"

opts.statusline = { -- statusline
hl = { fg = "fg", bg = "bg" },
status.component.mode { mode_text = { padding = { left = 1, right = 1 } } }, -- add the mode text
status.component.git_branch(),
status.component.file_info { filetype = {}, filename = false, file_modified = false },
status.component.git_diff(),
status.component.diagnostics(),
status.component.fill(),
status.component.cmd_info(),
status.component.fill(),
status.component.lsp(),
status.component.treesitter(),
status.component.nav(),
-- remove the 2nd mode indicator on the right
}

return opts
end,
}

0 comments on commit 3836d18

Please sign in to comment.