
* refactor: remove extra themes * feat: clean up theme setup * refactor: move highlights/colors to galaxyline plugin * feat: add lualine sections * feat: add lualine icons * feat: add user config override for lualine * refactor: remove galaxy line :D * refactor: clean out notify-nvim configs * refactor: clean up utils * refactor: clean up utils - icons
56 lines
1.2 KiB
Lua
56 lines
1.2 KiB
Lua
local config = require('cosmic.core.user')
|
|
local icons = require('cosmic.utils.icons')
|
|
local u = require('cosmic.utils')
|
|
local augroup_name = 'CosmicNvimNvimTree'
|
|
local group = vim.api.nvim_create_augroup(augroup_name, { clear = true })
|
|
|
|
-- set up args
|
|
local args = {
|
|
respect_buf_cwd = true,
|
|
diagnostics = {
|
|
enable = true,
|
|
icons = {
|
|
hint = icons.hint,
|
|
info = icons.info,
|
|
warning = icons.warn,
|
|
error = icons.error,
|
|
},
|
|
},
|
|
ignore_ft_on_setup = {
|
|
'startify',
|
|
'dashboard',
|
|
'alpha',
|
|
},
|
|
update_focused_file = {
|
|
enable = true,
|
|
},
|
|
view = {
|
|
width = 35,
|
|
number = true,
|
|
relativenumber = true,
|
|
},
|
|
git = {
|
|
ignore = true,
|
|
},
|
|
renderer = {
|
|
highlight_git = true,
|
|
special_files = {},
|
|
icons = {
|
|
glyphs = {
|
|
default = '',
|
|
symlink = icons.symlink,
|
|
git = icons.git,
|
|
folder = icons.folder,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
-- Autoclose nvim is nvim-tree is only buffer open
|
|
vim.api.nvim_create_autocmd('BufEnter', {
|
|
command = [[if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif]],
|
|
group = group,
|
|
nested = true,
|
|
})
|
|
|
|
require('nvim-tree').setup(u.merge(args, config.nvim_tree or {}))
|