Archived
0
0
Fork 0

Revert "lualine and colorscheme changes"

This reverts commit a95d9001b2.
This commit is contained in:
Daryl Ronningen 2022-07-23 23:02:53 -05:00
parent e595c391b0
commit d733f59df7
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
7 changed files with 39 additions and 48 deletions

View file

@ -7,6 +7,7 @@ require("user.notify")
require("user.navic")
require("user.cmp")
require("user.lsp")
require("user.colorscheme")
require("user.telescope")
require("user.treesitter")
require("user.autopairs")

View file

@ -21,7 +21,7 @@ bufferline.setup({
tab_size = 21,
diagnostics = "nvim_lsp",
diagnostics_update_in_insert = true,
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
offsets = { { filetype = "NvimTree", text = "" } },
show_buffer_icons = true,
show_buffer_close_icons = true,
show_close_icon = true,

5
lua/user/colorscheme.lua Normal file
View file

@ -0,0 +1,5 @@
vim.g.nord_italic = false
vim.g.nord_contrast = true
vim.g.nord_borders = true
require("nord").set()
require("lsp-colors").setup()

View file

@ -6,26 +6,10 @@ end
lualine.setup({
options = {
icons_enabled = true,
theme = "onenord",
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = { "alpha", "NvimTree" },
winbar = {
"help",
"startify",
"dashboard",
"packer",
"neogitstatus",
"NvimTree",
"Trouble",
"alpha",
"lir",
"Outline",
"spectre_panel",
"toggleterm",
},
},
disabled_filetypes = { "alpha", "NvimTree" },
always_divide_middle = true,
},
sections = {
@ -44,22 +28,6 @@ lualine.setup({
lualine_y = {},
lualine_z = {},
},
winbar = {
lualine_a = { require("user.winbar").get_winbar() },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {},
},
inactive_winbar = {
lualine_a = {},
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {},
},
tabline = {},
extensions = {
"nvim-tree",

View file

@ -36,6 +36,7 @@ vim.opt.incsearch = true
vim.opt.colorcolumn = "120"
vim.opt.list = true
vim.opt.listchars:append("lead:.")
vim.opt.winbar = "%{%v:lua.require'user.winbar'.get_winbar()%}"
vim.opt.foldcolumn = "2"
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = -1

View file

@ -48,19 +48,9 @@ return packer.startup(function(use)
use("antoinemadec/FixCursorHold.nvim")
use("kevinhwang91/promise-async")
-- Theme
use({
"rmehri01/onenord.nvim",
config = function()
require("onenord").setup()
end,
})
use({
"folke/lsp-colors.nvim",
config = function()
require("lsp-colors").setup()
end,
})
-- Themes
use("shaunsingh/nord.nvim")
use("folke/lsp-colors.nvim")
-- Completion
use("hrsh7th/nvim-cmp")

View file

@ -7,6 +7,29 @@ local function is_empty(s)
return s == nil or s == ""
end
M.winbar_filetype_exclude = {
"help",
"startify",
"dashboard",
"packer",
"neogitstatus",
"NvimTree",
"Trouble",
"alpha",
"lir",
"Outline",
"spectre_panel",
"toggleterm",
}
local excludes = function()
if vim.tbl_contains(M.winbar_filetype_exclude, vim.bo.filetype) then
vim.opt_local.winbar = nil
return true
end
return false
end
local function get_filename()
return "%#WinBarFilename#" .. "%t" .. "%*"
end
@ -45,6 +68,9 @@ local function get_fileicon()
end
function M.get_winbar()
if excludes() then
return ""
end
if navic.is_available() then
return get_fileicon() .. get_filename() .. get_location()
else