aboutsummaryrefslogtreecommitdiff
path: root/lua/config
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-12-05 14:59:08 +0800
committerjdhao <jdhao@hotmail.com>2021-12-05 14:59:08 +0800
commit4d497ec8a76d9ded8a99c0e33b51fd4e99974ee7 (patch)
tree425c70b64924e1a49a28be45eef26078ad73ac2e /lua/config
parent752dbcbe2d6e344b8f317a2ad79913c692acf24b (diff)
update lualine conf
Diffstat (limited to 'lua/config')
-rw-r--r--lua/config/lualine.lua1
-rw-r--r--lua/config/statusline.lua37
2 files changed, 37 insertions, 1 deletions
diff --git a/lua/config/lualine.lua b/lua/config/lualine.lua
deleted file mode 100644
index 90e6db2..0000000
--- a/lua/config/lualine.lua
+++ /dev/null
@@ -1 +0,0 @@
-require('lualine').setup()
diff --git a/lua/config/statusline.lua b/lua/config/statusline.lua
new file mode 100644
index 0000000..6b6dad7
--- /dev/null
+++ b/lua/config/statusline.lua
@@ -0,0 +1,37 @@
+local function spell()
+ if vim.o.spell then
+ return "[SPELL]"
+ end
+
+ return ""
+end
+
+require("lualine").setup({
+ options = {
+ icons_enabled = true,
+ theme = "auto",
+ component_separators = { left = "", right = "" },
+ section_separators = { left = "", right = "" },
+ disabled_filetypes = {},
+ always_divide_middle = true,
+ },
+ sections = {
+ lualine_a = { "mode" },
+ lualine_b = { "branch", "diff", },
+ lualine_c = { spell, "filename" },
+ lualine_x = { "encoding", "fileformat", "filetype" },
+ lualine_y = { "progress" },
+ lualine_z = { "location", { "diagnostics", sources = { "nvim_lsp" } }},
+ },
+ inactive_sections = {
+ lualine_a = {},
+ lualine_b = {},
+ lualine_c = { "filename" },
+ lualine_x = { "location" },
+ lualine_y = {},
+ lualine_z = {},
+ },
+ tabline = {},
+ extensions = {},
+})
+