aboutsummaryrefslogtreecommitdiff
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
parent752dbcbe2d6e344b8f317a2ad79913c692acf24b (diff)
update lualine conf
-rw-r--r--lua/config/lualine.lua1
-rw-r--r--lua/config/statusline.lua37
-rw-r--r--lua/plugins.lua2
3 files changed, 38 insertions, 2 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 = {},
+})
+
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 13c9a36..6362560 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -124,7 +124,7 @@ require("packer").startup({
use {
'nvim-lualine/lualine.nvim', event = 'VimEnter',
requires = {'kyazdani42/nvim-web-devicons', opt = true},
- config = [[require('config.lualine')]]
+ config = [[require('config.statusline')]]
}
use({ "akinsho/bufferline.nvim", event = "VimEnter", config = [[require('config.bufferline')]] })