-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bars-and-lines): add statusline with mode text
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
lua/astrocommunity/bars-and-lines/heirline-mode-text-statusline/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
24 changes: 24 additions & 0 deletions
24
lua/astrocommunity/bars-and-lines/heirline-mode-text-statusline/heirline.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |