mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-16 04:14:29 +02:00
add: reconfig
This commit is contained in:
parent
3af64d720d
commit
1d2a590c80
66 changed files with 1547 additions and 5121 deletions
|
@ -1,168 +0,0 @@
|
|||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
branch = "main",
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
config = function()
|
||||
local status_ok, bufferline = pcall(require, "bufferline")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local icons = require("user.icons")
|
||||
local use_icons = true
|
||||
|
||||
-- get folder name from current directory
|
||||
local _get_folder_name = function()
|
||||
local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
|
||||
return " " .. icons.ui.ProjekFolder .. " " .. str:lower():gsub("^%l", string.upper) .. " "
|
||||
end
|
||||
|
||||
local function diagnostics_indicator(num, _, diagnostics, _)
|
||||
local result = {}
|
||||
local symbols = {
|
||||
error = icons.diagnostics.Error,
|
||||
warning = icons.diagnostics.Warning,
|
||||
info = icons.diagnostics.Information,
|
||||
}
|
||||
if not use_icons then
|
||||
return "(" .. num .. ")"
|
||||
end
|
||||
for name, count in pairs(diagnostics) do
|
||||
if symbols[name] and count > 0 then
|
||||
table.insert(result, symbols[name] .. " " .. count)
|
||||
end
|
||||
end
|
||||
result = table.concat(result, " ")
|
||||
return #result > 0 and result or ""
|
||||
end
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
bufferline.setup({
|
||||
options = {
|
||||
color_icons = true,
|
||||
numbers = "none", -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
|
||||
close_command = function(bufnum)
|
||||
require("bufdelete").bufdelete(bufnum, true)
|
||||
end,
|
||||
right_mouse_command = function(bufnum)
|
||||
require("bufdelete").bufdelete(bufnum, true)
|
||||
end,
|
||||
-- close_command = "bdelete! %d",
|
||||
-- right_mouse_command = "bdelete! %d",
|
||||
left_mouse_command = "buffer %d",
|
||||
middle_mouse_command = nil,
|
||||
|
||||
indicator_icon = nil,
|
||||
indicator = { style = "icon", icon = icons.ui.BoldLineLeft },
|
||||
buffer_close_icon = icons.ui.Close,
|
||||
modified_icon = icons.ui.Circle,
|
||||
close_icon = icons.ui.BoldClose,
|
||||
left_trunc_marker = icons.ui.ArrowCircleLeft,
|
||||
right_trunc_marker = icons.ui.ArrowCircleRight,
|
||||
max_name_length = 30,
|
||||
max_prefix_length = 30,
|
||||
tab_size = 21,
|
||||
diagnostics = false, -- | "nvim_lsp" | "coc",
|
||||
diagnostics_update_in_insert = false,
|
||||
diagnostics_indicator = diagnostics_indicator,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = _get_folder_name(),
|
||||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
padding = 1,
|
||||
},
|
||||
{
|
||||
filetype = "neo-tree",
|
||||
text = _get_folder_name(),
|
||||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
padding = 1,
|
||||
},
|
||||
},
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = true,
|
||||
show_tab_indicators = true,
|
||||
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
||||
separator_style = { "", "" }, -- | "thick" | "thin" | { 'any', 'any' },
|
||||
enforce_regular_tabs = true,
|
||||
always_show_bufferline = true,
|
||||
},
|
||||
highlights = {
|
||||
background = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "none", highlight = "TabLine" },
|
||||
},
|
||||
buffer_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "none", highlight = "TabLine" },
|
||||
},
|
||||
close_button = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "none", highlight = "TabLine" },
|
||||
},
|
||||
close_button_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "none", highlight = "TabLine" },
|
||||
},
|
||||
tab_selected = {
|
||||
fg = { attribute = "fg", highlight = "Normal" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
tab = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
tab_close = {
|
||||
-- fg = {attribute='fg',highlight='LspDiagnosticsDefaultError'},
|
||||
fg = { attribute = "fg", highlight = "TabLineSel" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
duplicate_selected = {
|
||||
fg = { attribute = "fg", highlight = "TabLineSel" },
|
||||
bg = { attribute = "bg", highlight = "TabLineSel" },
|
||||
underline = true,
|
||||
},
|
||||
duplicate_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
underline = true,
|
||||
},
|
||||
duplicate = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
underline = true,
|
||||
},
|
||||
|
||||
modified = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
modified_selected = {
|
||||
fg = { attribute = "fg", highlight = "Normal" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
modified_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
|
||||
separator = {
|
||||
fg = { attribute = "bg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
separator_selected = {
|
||||
fg = { attribute = "bg", highlight = "Normal" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
indicator_selected = {
|
||||
fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -70,11 +70,11 @@ return {
|
|||
-- ["@operator.html"] = { fg = "#faa356" },
|
||||
-- ["@tag.html"] = { fg = "#fa7970" },
|
||||
-- ["@tag.delimiter.html"] = { fg = "#faa356" },
|
||||
-- ["@tag.javascript"] = { fg = "#faa356" },
|
||||
["@tag.javascript"] = { fg = "#faa356" },
|
||||
-- ["@tag.javascript"] = { fg = "#8ddb8c" },
|
||||
-- ["@tag.tsx"] = { fg = "#8ddb8c" },
|
||||
-- ["@tag.delimiter.javascript"] = { fg = "fg1" },
|
||||
-- ["@tag.tsx"] = { fg = "#faa356" },
|
||||
["@tag.delimiter.javascript"] = { fg = "fg1" },
|
||||
["@tag.tsx"] = { fg = "#faa356" },
|
||||
["@lsp.type.parameter"] = { fg = "#faa356" },
|
||||
["@property.lua"] = { fg = "#91cbff", bg = is_transparent and "NONE" or "bg1" },
|
||||
["@lsp.type.property.lua"] = { fg = "fg1", bg = is_transparent and "NONE" or "bg1" },
|
||||
|
|
|
@ -43,13 +43,13 @@ return {
|
|||
"hrsh7th/cmp-nvim-lua",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"gbprod/yanky.nvim",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
require("user.yanky")
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "gbprod/yanky.nvim",
|
||||
-- event = "BufReadPre",
|
||||
-- config = function()
|
||||
-- require("user.yanky")
|
||||
-- end,
|
||||
-- },
|
||||
-- {
|
||||
-- "is0n/jaq-nvim",
|
||||
-- event = "BufRead",
|
||||
|
|
|
@ -47,7 +47,10 @@ return {
|
|||
|
||||
local linter_list_registered = function(filetype)
|
||||
local registered_providers = list_registered_providers_names(filetype)
|
||||
local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
|
||||
-- local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
|
||||
-- return registered_providers[m] or {}
|
||||
-- end, alternative_methods))
|
||||
local providers_for_methods = vim.iter(vim.tbl_map(function(m)
|
||||
return registered_providers[m] or {}
|
||||
end, alternative_methods))
|
||||
|
||||
|
@ -59,9 +62,8 @@ return {
|
|||
function()
|
||||
local msg = "LS Inactive"
|
||||
local buf_ft = vim.bo.filetype
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
-- start register
|
||||
local buf_clients = vim.lsp.buf_get_clients()
|
||||
local buf_clients = vim.lsp.get_clients()
|
||||
local buf_client_names = {}
|
||||
if next(buf_clients) == nil then
|
||||
-- TODO: clean up this if statement
|
||||
|
@ -120,7 +122,7 @@ return {
|
|||
|
||||
local spaces = function()
|
||||
-- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||
return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||
return icons.ui.Tab .. " " .. vim.api.nvim_get_option_value(0, "shiftwidth")
|
||||
end
|
||||
|
||||
local mode = {
|
||||
|
@ -151,7 +153,8 @@ return {
|
|||
lsp_progress = lspprogress.progress
|
||||
end
|
||||
-- stylua: ignore
|
||||
local github=vim.fn.fnamemodify("auto", ":t")
|
||||
-- local github=vim.fn.fnamemodify("auto", ":t")
|
||||
local github={}
|
||||
local status_ok, _ = pcall(require, "github-theme")
|
||||
if status_ok then
|
||||
local C = require("github-theme.lib.color")
|
||||
|
@ -192,7 +195,7 @@ return {
|
|||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = github,
|
||||
theme = github or "auto",
|
||||
-- theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
|
|
|
@ -47,7 +47,7 @@ return {
|
|||
--
|
||||
-- local linter_list_registered = function(filetype)
|
||||
-- local registered_providers = list_registered_providers_names(filetype)
|
||||
-- local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
|
||||
-- local providers_for_methods = vim.iter(vim.tbl_map(function(m)
|
||||
-- return registered_providers[m] or {}
|
||||
-- end, alternative_methods))
|
||||
--
|
||||
|
@ -59,9 +59,8 @@ return {
|
|||
-- function()
|
||||
-- local msg = "LS Inactive"
|
||||
-- local buf_ft = vim.bo.filetype
|
||||
-- local clients = vim.lsp.get_active_clients()
|
||||
-- -- start register
|
||||
-- local buf_clients = vim.lsp.buf_get_clients()
|
||||
-- local buf_clients = vim.lsp.get_clients()
|
||||
-- local buf_client_names = {}
|
||||
-- if next(buf_clients) == nil then
|
||||
-- -- TODO: clean up this if statement
|
||||
|
@ -120,7 +119,7 @@ return {
|
|||
--
|
||||
-- local spaces = function()
|
||||
-- -- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||
-- return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||
-- return icons.ui.Tab .. " " .. vim.api.nvim_get_option_value(0, "shiftwidth")
|
||||
-- end
|
||||
--
|
||||
-- local mode = {
|
||||
|
@ -151,7 +150,8 @@ return {
|
|||
-- lsp_progress = lspprogress.progress
|
||||
-- end
|
||||
-- -- stylua: ignore
|
||||
-- local onedark=vim.fn.fnamemodify("auto", ":t")
|
||||
-- -- local onedark=vim.fn.fnamemodify("auto", ":t")
|
||||
-- local onedark={}
|
||||
-- local is_transparat = true
|
||||
-- local status_ok, onedarkpro = pcall(require, "onedarkpro.helpers")
|
||||
-- if status_ok then
|
||||
|
|
|
@ -1,279 +1,279 @@
|
|||
return {
|
||||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
lazy = true,
|
||||
event = "VeryLazy",
|
||||
cmd = { "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||
-- dependencies = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
local data_exists, treeconfig = pcall(require, "core.config")
|
||||
if data_exists then
|
||||
if treeconfig.loadnvimtree_lazy then
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- set termguicolors to enable highlight groups
|
||||
vim.opt.termguicolors = true
|
||||
local status_ok, nvim_tree = pcall(require, "nvim-tree")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local HEIGHT_RATIO = 0.9 -- You can change this
|
||||
local WIDTH_RATIO = 0.5 -- You can change this too
|
||||
|
||||
local icons = require("user.icons")
|
||||
nvim_tree.setup({
|
||||
auto_reload_on_write = false,
|
||||
disable_netrw = false,
|
||||
hijack_cursor = false,
|
||||
hijack_netrw = true,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
sort_by = "name",
|
||||
root_dirs = {},
|
||||
prefer_startup_root = false,
|
||||
sync_root_with_cwd = true,
|
||||
reload_on_bufenter = false,
|
||||
respect_buf_cwd = false,
|
||||
on_attach = "default",
|
||||
select_prompts = false,
|
||||
view = {
|
||||
adaptive_size = false,
|
||||
centralize_selection = true,
|
||||
-- width = 30,
|
||||
side = "left",
|
||||
preserve_window_proportions = false,
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes",
|
||||
-- float = {
|
||||
-- enable = true,
|
||||
-- quit_on_focus_loss = true,
|
||||
-- open_win_config = {
|
||||
-- relative = "editor",
|
||||
-- border = "rounded",
|
||||
-- width = 30,
|
||||
-- height = 30,
|
||||
-- row = 1,
|
||||
-- col = 1,
|
||||
-- },
|
||||
-- },
|
||||
float = {
|
||||
enable = true,
|
||||
open_win_config = function()
|
||||
local screen_w = vim.opt.columns:get()
|
||||
local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||
local window_w = screen_w * WIDTH_RATIO
|
||||
local window_h = screen_h * HEIGHT_RATIO
|
||||
local window_w_int = math.floor(window_w)
|
||||
local window_h_int = math.floor(window_h)
|
||||
local center_x = (screen_w - window_w) / 2
|
||||
local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||
return {
|
||||
border = "rounded",
|
||||
relative = "editor",
|
||||
row = center_y,
|
||||
col = center_x,
|
||||
width = window_w_int,
|
||||
height = window_h_int,
|
||||
}
|
||||
end,
|
||||
},
|
||||
width = function()
|
||||
return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
|
||||
end,
|
||||
},
|
||||
renderer = {
|
||||
add_trailing = false,
|
||||
group_empty = false,
|
||||
highlight_git = true,
|
||||
full_name = false,
|
||||
highlight_opened_files = "none",
|
||||
root_folder_label = ":t",
|
||||
-- root_folder_label = false,
|
||||
indent_width = 2,
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
inline_arrows = true,
|
||||
icons = {
|
||||
corner = "└",
|
||||
edge = "│",
|
||||
item = "│",
|
||||
none = " ",
|
||||
},
|
||||
},
|
||||
icons = {
|
||||
webdev_colors = true,
|
||||
git_placement = "before",
|
||||
padding = " ",
|
||||
symlink_arrow = " ➛ ",
|
||||
show = {
|
||||
file = true,
|
||||
folder = true,
|
||||
folder_arrow = true,
|
||||
git = true,
|
||||
},
|
||||
glyphs = {
|
||||
default = icons.ui.Text,
|
||||
symlink = icons.ui.FileSymlink,
|
||||
bookmark = icons.ui.BookMark,
|
||||
folder = {
|
||||
-- arrow_closed = icons.ui.TriangleShortArrowRight,
|
||||
arrow_closed = icons.ui.ChevronShortRight,
|
||||
-- arrow_open = icons.ui.TriangleShortArrowDown,
|
||||
arrow_open = icons.ui.ChevronShortDown,
|
||||
default = icons.ui.Folder,
|
||||
open = icons.ui.FolderOpen,
|
||||
empty = icons.ui.EmptyFolder,
|
||||
empty_open = icons.ui.EmptyFolderOpen,
|
||||
symlink = icons.ui.FolderSymlink,
|
||||
symlink_open = icons.ui.FolderOpen,
|
||||
},
|
||||
git = {
|
||||
unstaged = icons.git.FileUnstaged,
|
||||
staged = icons.git.FileStaged,
|
||||
unmerged = icons.git.FileUnmerged,
|
||||
renamed = icons.git.FileRenamed,
|
||||
untracked = icons.git.FileUntracked,
|
||||
deleted = icons.git.FileDeleted,
|
||||
ignored = icons.git.FileIgnored,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
|
||||
symlink_destination = true,
|
||||
},
|
||||
hijack_directories = {
|
||||
enable = false,
|
||||
auto_open = true,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
debounce_delay = 15,
|
||||
update_root = true,
|
||||
ignore_list = {},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = false,
|
||||
show_on_open_dirs = true,
|
||||
debounce_delay = 50,
|
||||
severity = {
|
||||
min = vim.diagnostic.severity.HINT,
|
||||
max = vim.diagnostic.severity.ERROR,
|
||||
},
|
||||
icons = {
|
||||
hint = icons.diagnostics.BoldHint,
|
||||
info = icons.diagnostics.BoldInformation,
|
||||
warning = icons.diagnostics.BoldWarning,
|
||||
error = icons.diagnostics.BoldError,
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
git_clean = false,
|
||||
no_buffer = false,
|
||||
custom = { "node_modules", "\\.cache", "\\.git" },
|
||||
exclude = {
|
||||
".gitignore",
|
||||
".prettierignore",
|
||||
},
|
||||
},
|
||||
filesystem_watchers = {
|
||||
enable = true,
|
||||
debounce_delay = 50,
|
||||
ignore_dirs = {},
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
show_on_dirs = true,
|
||||
show_on_open_dirs = true,
|
||||
disable_for_dirs = {},
|
||||
timeout = 400,
|
||||
},
|
||||
actions = {
|
||||
use_system_clipboard = true,
|
||||
change_dir = {
|
||||
enable = true,
|
||||
global = false,
|
||||
restrict_above_cwd = false,
|
||||
},
|
||||
expand_all = {
|
||||
max_folder_discovery = 300,
|
||||
exclude = {},
|
||||
},
|
||||
file_popup = {
|
||||
open_win_config = {
|
||||
col = 1,
|
||||
row = 1,
|
||||
relative = "cursor",
|
||||
border = "shadow",
|
||||
style = "minimal",
|
||||
},
|
||||
},
|
||||
open_file = {
|
||||
quit_on_open = false,
|
||||
resize_window = false,
|
||||
window_picker = {
|
||||
enable = true,
|
||||
picker = "default",
|
||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
||||
exclude = {
|
||||
filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||
buftype = { "nofile", "terminal", "help" },
|
||||
},
|
||||
},
|
||||
},
|
||||
remove_file = {
|
||||
close_window = true,
|
||||
},
|
||||
},
|
||||
trash = {
|
||||
cmd = "trash",
|
||||
require_confirm = true,
|
||||
},
|
||||
live_filter = {
|
||||
prefix = "[FILTER]: ",
|
||||
always_show_folders = true,
|
||||
},
|
||||
tab = {
|
||||
sync = {
|
||||
open = false,
|
||||
close = false,
|
||||
ignore = {},
|
||||
},
|
||||
},
|
||||
notify = {
|
||||
threshold = vim.log.levels.INFO,
|
||||
-- threshold = vim.log.levels.ERROR,
|
||||
},
|
||||
log = {
|
||||
enable = false,
|
||||
truncate = false,
|
||||
types = {
|
||||
all = false,
|
||||
config = false,
|
||||
copy_paste = false,
|
||||
dev = false,
|
||||
diagnostics = false,
|
||||
git = false,
|
||||
profile = false,
|
||||
watcher = false,
|
||||
},
|
||||
},
|
||||
system_open = {
|
||||
cmd = nil,
|
||||
args = {},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
-- auto open file if creation
|
||||
local api = require("nvim-tree.api")
|
||||
api.events.subscribe(api.events.Event.FileCreated, function(file)
|
||||
vim.cmd("edit " .. file.fname)
|
||||
end)
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "kyazdani42/nvim-tree.lua",
|
||||
-- lazy = true,
|
||||
-- event = "VeryLazy",
|
||||
-- cmd = { "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||
-- -- dependencies = "kyazdani42/nvim-web-devicons",
|
||||
-- config = function()
|
||||
-- local data_exists, treeconfig = pcall(require, "core.config")
|
||||
-- if data_exists then
|
||||
-- if treeconfig.loadnvimtree_lazy then
|
||||
-- vim.g.loaded_netrw = 1
|
||||
-- vim.g.loaded_netrwPlugin = 1
|
||||
--
|
||||
-- -- set termguicolors to enable highlight groups
|
||||
-- vim.opt.termguicolors = true
|
||||
-- local status_ok, nvim_tree = pcall(require, "nvim-tree")
|
||||
-- if not status_ok then
|
||||
-- return
|
||||
-- end
|
||||
--
|
||||
-- local HEIGHT_RATIO = 0.9 -- You can change this
|
||||
-- local WIDTH_RATIO = 0.5 -- You can change this too
|
||||
--
|
||||
-- local icons = require("user.icons")
|
||||
-- nvim_tree.setup({
|
||||
-- auto_reload_on_write = false,
|
||||
-- disable_netrw = false,
|
||||
-- hijack_cursor = false,
|
||||
-- hijack_netrw = true,
|
||||
-- hijack_unnamed_buffer_when_opening = false,
|
||||
-- sort_by = "name",
|
||||
-- root_dirs = {},
|
||||
-- prefer_startup_root = false,
|
||||
-- sync_root_with_cwd = true,
|
||||
-- reload_on_bufenter = false,
|
||||
-- respect_buf_cwd = false,
|
||||
-- on_attach = "default",
|
||||
-- select_prompts = false,
|
||||
-- view = {
|
||||
-- adaptive_size = false,
|
||||
-- centralize_selection = true,
|
||||
-- -- width = 30,
|
||||
-- side = "left",
|
||||
-- preserve_window_proportions = false,
|
||||
-- number = false,
|
||||
-- relativenumber = false,
|
||||
-- signcolumn = "yes",
|
||||
-- -- float = {
|
||||
-- -- enable = true,
|
||||
-- -- quit_on_focus_loss = true,
|
||||
-- -- open_win_config = {
|
||||
-- -- relative = "editor",
|
||||
-- -- border = "rounded",
|
||||
-- -- width = 30,
|
||||
-- -- height = 30,
|
||||
-- -- row = 1,
|
||||
-- -- col = 1,
|
||||
-- -- },
|
||||
-- -- },
|
||||
-- float = {
|
||||
-- enable = true,
|
||||
-- open_win_config = function()
|
||||
-- local screen_w = vim.opt.columns:get()
|
||||
-- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||
-- local window_w = screen_w * WIDTH_RATIO
|
||||
-- local window_h = screen_h * HEIGHT_RATIO
|
||||
-- local window_w_int = math.floor(window_w)
|
||||
-- local window_h_int = math.floor(window_h)
|
||||
-- local center_x = (screen_w - window_w) / 2
|
||||
-- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||
-- return {
|
||||
-- border = "rounded",
|
||||
-- relative = "editor",
|
||||
-- row = center_y,
|
||||
-- col = center_x,
|
||||
-- width = window_w_int,
|
||||
-- height = window_h_int,
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
-- width = function()
|
||||
-- return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
|
||||
-- end,
|
||||
-- },
|
||||
-- renderer = {
|
||||
-- add_trailing = false,
|
||||
-- group_empty = false,
|
||||
-- highlight_git = true,
|
||||
-- full_name = false,
|
||||
-- highlight_opened_files = "none",
|
||||
-- root_folder_label = ":t",
|
||||
-- -- root_folder_label = false,
|
||||
-- indent_width = 2,
|
||||
-- indent_markers = {
|
||||
-- enable = true,
|
||||
-- inline_arrows = true,
|
||||
-- icons = {
|
||||
-- corner = "└",
|
||||
-- edge = "│",
|
||||
-- item = "│",
|
||||
-- none = " ",
|
||||
-- },
|
||||
-- },
|
||||
-- icons = {
|
||||
-- webdev_colors = true,
|
||||
-- git_placement = "before",
|
||||
-- padding = " ",
|
||||
-- symlink_arrow = " ➛ ",
|
||||
-- show = {
|
||||
-- file = true,
|
||||
-- folder = true,
|
||||
-- folder_arrow = true,
|
||||
-- git = true,
|
||||
-- },
|
||||
-- glyphs = {
|
||||
-- default = icons.ui.Text,
|
||||
-- symlink = icons.ui.FileSymlink,
|
||||
-- bookmark = icons.ui.BookMark,
|
||||
-- folder = {
|
||||
-- -- arrow_closed = icons.ui.TriangleShortArrowRight,
|
||||
-- arrow_closed = icons.ui.ChevronShortRight,
|
||||
-- -- arrow_open = icons.ui.TriangleShortArrowDown,
|
||||
-- arrow_open = icons.ui.ChevronShortDown,
|
||||
-- default = icons.ui.Folder,
|
||||
-- open = icons.ui.FolderOpen,
|
||||
-- empty = icons.ui.EmptyFolder,
|
||||
-- empty_open = icons.ui.EmptyFolderOpen,
|
||||
-- symlink = icons.ui.FolderSymlink,
|
||||
-- symlink_open = icons.ui.FolderOpen,
|
||||
-- },
|
||||
-- git = {
|
||||
-- unstaged = icons.git.FileUnstaged,
|
||||
-- staged = icons.git.FileStaged,
|
||||
-- unmerged = icons.git.FileUnmerged,
|
||||
-- renamed = icons.git.FileRenamed,
|
||||
-- untracked = icons.git.FileUntracked,
|
||||
-- deleted = icons.git.FileDeleted,
|
||||
-- ignored = icons.git.FileIgnored,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
|
||||
-- symlink_destination = true,
|
||||
-- },
|
||||
-- hijack_directories = {
|
||||
-- enable = false,
|
||||
-- auto_open = true,
|
||||
-- },
|
||||
-- update_focused_file = {
|
||||
-- enable = true,
|
||||
-- debounce_delay = 15,
|
||||
-- update_root = true,
|
||||
-- ignore_list = {},
|
||||
-- },
|
||||
-- diagnostics = {
|
||||
-- enable = true,
|
||||
-- show_on_dirs = false,
|
||||
-- show_on_open_dirs = true,
|
||||
-- debounce_delay = 50,
|
||||
-- severity = {
|
||||
-- min = vim.diagnostic.severity.HINT,
|
||||
-- max = vim.diagnostic.severity.ERROR,
|
||||
-- },
|
||||
-- icons = {
|
||||
-- hint = icons.diagnostics.BoldHint,
|
||||
-- info = icons.diagnostics.BoldInformation,
|
||||
-- warning = icons.diagnostics.BoldWarning,
|
||||
-- error = icons.diagnostics.BoldError,
|
||||
-- },
|
||||
-- },
|
||||
-- filters = {
|
||||
-- dotfiles = false,
|
||||
-- git_clean = false,
|
||||
-- no_buffer = false,
|
||||
-- custom = { "node_modules", "\\.cache", "\\.git" },
|
||||
-- exclude = {
|
||||
-- ".gitignore",
|
||||
-- ".prettierignore",
|
||||
-- },
|
||||
-- },
|
||||
-- filesystem_watchers = {
|
||||
-- enable = true,
|
||||
-- debounce_delay = 50,
|
||||
-- ignore_dirs = {},
|
||||
-- },
|
||||
-- git = {
|
||||
-- enable = true,
|
||||
-- ignore = false,
|
||||
-- show_on_dirs = true,
|
||||
-- show_on_open_dirs = true,
|
||||
-- disable_for_dirs = {},
|
||||
-- timeout = 400,
|
||||
-- },
|
||||
-- actions = {
|
||||
-- use_system_clipboard = true,
|
||||
-- change_dir = {
|
||||
-- enable = true,
|
||||
-- global = false,
|
||||
-- restrict_above_cwd = false,
|
||||
-- },
|
||||
-- expand_all = {
|
||||
-- max_folder_discovery = 300,
|
||||
-- exclude = {},
|
||||
-- },
|
||||
-- file_popup = {
|
||||
-- open_win_config = {
|
||||
-- col = 1,
|
||||
-- row = 1,
|
||||
-- relative = "cursor",
|
||||
-- border = "shadow",
|
||||
-- style = "minimal",
|
||||
-- },
|
||||
-- },
|
||||
-- open_file = {
|
||||
-- quit_on_open = false,
|
||||
-- resize_window = false,
|
||||
-- window_picker = {
|
||||
-- enable = true,
|
||||
-- picker = "default",
|
||||
-- chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
||||
-- exclude = {
|
||||
-- filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||
-- buftype = { "nofile", "terminal", "help" },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- remove_file = {
|
||||
-- close_window = true,
|
||||
-- },
|
||||
-- },
|
||||
-- trash = {
|
||||
-- cmd = "trash",
|
||||
-- require_confirm = true,
|
||||
-- },
|
||||
-- live_filter = {
|
||||
-- prefix = "[FILTER]: ",
|
||||
-- always_show_folders = true,
|
||||
-- },
|
||||
-- tab = {
|
||||
-- sync = {
|
||||
-- open = false,
|
||||
-- close = false,
|
||||
-- ignore = {},
|
||||
-- },
|
||||
-- },
|
||||
-- notify = {
|
||||
-- threshold = vim.log.levels.INFO,
|
||||
-- -- threshold = vim.log.levels.ERROR,
|
||||
-- },
|
||||
-- log = {
|
||||
-- enable = false,
|
||||
-- truncate = false,
|
||||
-- types = {
|
||||
-- all = false,
|
||||
-- config = false,
|
||||
-- copy_paste = false,
|
||||
-- dev = false,
|
||||
-- diagnostics = false,
|
||||
-- git = false,
|
||||
-- profile = false,
|
||||
-- watcher = false,
|
||||
-- },
|
||||
-- },
|
||||
-- system_open = {
|
||||
-- cmd = nil,
|
||||
-- args = {},
|
||||
-- },
|
||||
-- })
|
||||
-- end
|
||||
-- end
|
||||
-- -- auto open file if creation
|
||||
-- local api = require("nvim-tree.api")
|
||||
-- api.events.subscribe(api.events.Event.FileCreated, function(file)
|
||||
-- vim.cmd("edit " .. file.fname)
|
||||
-- end)
|
||||
-- end,
|
||||
-- },
|
||||
}
|
||||
|
|
|
@ -1,110 +1,110 @@
|
|||
return {
|
||||
{ "navarasu/onedark.nvim", enabled = false },
|
||||
{
|
||||
"olimorris/onedarkpro.nvim",
|
||||
priority = 1000, -- Ensure it loads first
|
||||
config = function()
|
||||
local is_transparent = false
|
||||
require("onedarkpro").setup({
|
||||
styles = {
|
||||
types = "NONE",
|
||||
methods = "NONE",
|
||||
numbers = "NONE",
|
||||
strings = "NONE",
|
||||
comments = "italic",
|
||||
keywords = "bold,italic",
|
||||
constants = "NONE",
|
||||
functions = "italic",
|
||||
operators = "NONE",
|
||||
variables = "NONE",
|
||||
parameters = "NONE",
|
||||
conditionals = "italic",
|
||||
virtual_text = "NONE",
|
||||
tags = "italic",
|
||||
},
|
||||
colors = {
|
||||
onedark = {
|
||||
green = "#99c379",
|
||||
gray = "#8094b4",
|
||||
red = "#e06c75",
|
||||
purple = "#c678dd",
|
||||
yellow = "#e5c07a",
|
||||
blue = "#61afef",
|
||||
cyan = "#56b6c2",
|
||||
bg_statusline = "#282c34",
|
||||
indentline = "#3b4261",
|
||||
float_bg = "#282c34",
|
||||
},
|
||||
},
|
||||
options = {
|
||||
cursorline = true,
|
||||
transparency = is_transparent,
|
||||
terminal_colors = true,
|
||||
},
|
||||
highlights = {
|
||||
-- overide cursor line fill colors
|
||||
LineNr = { fg = "#49505E" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
|
||||
CursorLineNr = { fg = "${blue}" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
||||
CursorLine = { bg = "#333842" },
|
||||
Cursor = { fg = "${bg}", bg = "${fg}" }, -- character under the cursor
|
||||
lCursor = { fg = "${bg}", bg = "${fg}" }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
|
||||
CursorIM = { fg = "${bg}", bg = "${fg}" }, -- like Cursor, but used when in IME mode |CursorIM|
|
||||
CursorColumn = { bg = "#333842" }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
|
||||
-- overide nvimtree folder icon fill color
|
||||
NvimTreeFolderIcon = { fg = "${gray}" },
|
||||
-- overide nvimtree text fill color folder opened
|
||||
NvimTreeOpenedFolderName = { fg = "${blue}" },
|
||||
-- overide nvimtree text fill color root folder
|
||||
NvimTreeRootFolder = { fg = "${yellow}" },
|
||||
NvimTreeSpecialFile = { fg = "${orange}" },
|
||||
NvimTreeWinSeparator = { fg = "#202329" },
|
||||
NvimTreeIndentMarker = { fg = "#3E4450" },
|
||||
-- overide indenline fill color
|
||||
IblIndent = { fg = "#3E4450" },
|
||||
-- overide cmp cursorline fill color with #333842
|
||||
PmenuSel = { bg = "#333842" },
|
||||
illuminatedWord = { bg = "#3b4261" },
|
||||
illuminatedCurWord = { bg = "#3b4261" },
|
||||
IlluminatedWordText = { bg = "#3b4261" },
|
||||
IlluminatedWordRead = { bg = "#3b4261" },
|
||||
IlluminatedWordWrite = { bg = "#3b4261" },
|
||||
StatusLine = { fg = "#f8f8f2", bg = is_transparent and "NONE" or "${bg}" },
|
||||
StatusLineTerm = { fg = "#f8f8f2", bg = "${bg}" },
|
||||
BufferLineFill = { bg = is_transparent and "NONE" or "${bg}" },
|
||||
["@string.special.url.html"] = { fg = "${green}" },
|
||||
["@text.uri.html"] = { fg = "${green}" },
|
||||
["@tag.javascript"] = { fg = "${red}" },
|
||||
["@tag.attribute"] = { fg = "${orange}", style = "italic" },
|
||||
["@constructor.javascript"] = { fg = "${red}" },
|
||||
["@variable"] = { fg = "${fg}", style = "NONE" }, -- various variable names
|
||||
["@variable.builtin"] = { fg = "${red}", style = "NONE" },
|
||||
["@variable.member"] = "${cyan}",
|
||||
["@variable.parameter"] = "${red}",
|
||||
["@property"] = { fg = "${cyan}" }, -- similar to `@field`
|
||||
NvimTreeGitDirty = { fg = "${yellow}" },
|
||||
Pmenu = { fg = "${fg}", bg = "${bg}" },
|
||||
PmenuThumb = { bg = "${gray}" }, -- Popup menu: Thumb of the scrollbar.
|
||||
-- overide lualine fill color with bg color
|
||||
LualineNormal = { bg = "${bg}" },
|
||||
-- overide lualine_c fill color with bg color
|
||||
LualineC = { bg = "${bg}" },
|
||||
-- overide lualine_x fill color with bg color
|
||||
LualineX = { bg = "${bg}" },
|
||||
-- overide which-key fill color with bg color
|
||||
-- WhichKey = { bg = "${bg}" },
|
||||
-- -- overide which-key fill color with bg color
|
||||
-- WhichKeySeperator = { bg = "${bg}" },
|
||||
-- -- overide which-key fill color with bg color
|
||||
-- WhichKeyDesc = { fg = "${red}" },
|
||||
-- -- overide which-key fill color with bg color
|
||||
-- WhichKeyFloat = { bg = "${bg}" },
|
||||
WhichKeyFloat = { bg = is_transparent and "NONE" or "${bg}" },
|
||||
-- -- overide which-key fill color with bg color
|
||||
-- WhichKeyValue = { bg = "${bg}" },
|
||||
-- -- overide which-key fill color with bg color
|
||||
-- WhichKeyBorder = { bg = "${bg}" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- { "navarasu/onedark.nvim", enabled = false },
|
||||
-- {
|
||||
-- "olimorris/onedarkpro.nvim",
|
||||
-- priority = 1000, -- Ensure it loads first
|
||||
-- config = function()
|
||||
-- local is_transparent = false
|
||||
-- require("onedarkpro").setup({
|
||||
-- styles = {
|
||||
-- types = "NONE",
|
||||
-- methods = "NONE",
|
||||
-- numbers = "NONE",
|
||||
-- strings = "NONE",
|
||||
-- comments = "italic",
|
||||
-- keywords = "bold,italic",
|
||||
-- constants = "NONE",
|
||||
-- functions = "italic",
|
||||
-- operators = "NONE",
|
||||
-- variables = "NONE",
|
||||
-- parameters = "NONE",
|
||||
-- conditionals = "italic",
|
||||
-- virtual_text = "NONE",
|
||||
-- tags = "italic",
|
||||
-- },
|
||||
-- colors = {
|
||||
-- onedark = {
|
||||
-- green = "#99c379",
|
||||
-- gray = "#8094b4",
|
||||
-- red = "#e06c75",
|
||||
-- purple = "#c678dd",
|
||||
-- yellow = "#e5c07a",
|
||||
-- blue = "#61afef",
|
||||
-- cyan = "#56b6c2",
|
||||
-- bg_statusline = "#282c34",
|
||||
-- indentline = "#3b4261",
|
||||
-- float_bg = "#282c34",
|
||||
-- },
|
||||
-- },
|
||||
-- options = {
|
||||
-- cursorline = true,
|
||||
-- transparency = is_transparent,
|
||||
-- terminal_colors = true,
|
||||
-- },
|
||||
-- highlights = {
|
||||
-- -- overide cursor line fill colors
|
||||
-- LineNr = { fg = "#49505E" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
|
||||
-- CursorLineNr = { fg = "${blue}" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
||||
-- CursorLine = { bg = "#333842" },
|
||||
-- Cursor = { fg = "${bg}", bg = "${fg}" }, -- character under the cursor
|
||||
-- lCursor = { fg = "${bg}", bg = "${fg}" }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
|
||||
-- CursorIM = { fg = "${bg}", bg = "${fg}" }, -- like Cursor, but used when in IME mode |CursorIM|
|
||||
-- CursorColumn = { bg = "#333842" }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
|
||||
-- -- overide nvimtree folder icon fill color
|
||||
-- NvimTreeFolderIcon = { fg = "${gray}" },
|
||||
-- -- overide nvimtree text fill color folder opened
|
||||
-- NvimTreeOpenedFolderName = { fg = "${blue}" },
|
||||
-- -- overide nvimtree text fill color root folder
|
||||
-- NvimTreeRootFolder = { fg = "${yellow}" },
|
||||
-- NvimTreeSpecialFile = { fg = "${orange}" },
|
||||
-- NvimTreeWinSeparator = { fg = "#202329" },
|
||||
-- NvimTreeIndentMarker = { fg = "#3E4450" },
|
||||
-- -- overide indenline fill color
|
||||
-- IblIndent = { fg = "#3E4450" },
|
||||
-- -- overide cmp cursorline fill color with #333842
|
||||
-- PmenuSel = { bg = "#333842" },
|
||||
-- illuminatedWord = { bg = "#3b4261" },
|
||||
-- illuminatedCurWord = { bg = "#3b4261" },
|
||||
-- IlluminatedWordText = { bg = "#3b4261" },
|
||||
-- IlluminatedWordRead = { bg = "#3b4261" },
|
||||
-- IlluminatedWordWrite = { bg = "#3b4261" },
|
||||
-- StatusLine = { fg = "#f8f8f2", bg = is_transparent and "NONE" or "${bg}" },
|
||||
-- StatusLineTerm = { fg = "#f8f8f2", bg = "${bg}" },
|
||||
-- BufferLineFill = { bg = is_transparent and "NONE" or "${bg}" },
|
||||
-- ["@string.special.url.html"] = { fg = "${green}" },
|
||||
-- ["@text.uri.html"] = { fg = "${green}" },
|
||||
-- ["@tag.javascript"] = { fg = "${red}" },
|
||||
-- ["@tag.attribute"] = { fg = "${orange}", style = "italic" },
|
||||
-- ["@constructor.javascript"] = { fg = "${red}" },
|
||||
-- ["@variable"] = { fg = "${fg}", style = "NONE" }, -- various variable names
|
||||
-- ["@variable.builtin"] = { fg = "${red}", style = "NONE" },
|
||||
-- ["@variable.member"] = "${cyan}",
|
||||
-- ["@variable.parameter"] = "${red}",
|
||||
-- ["@property"] = { fg = "${cyan}" }, -- similar to `@field`
|
||||
-- NvimTreeGitDirty = { fg = "${yellow}" },
|
||||
-- Pmenu = { fg = "${fg}", bg = "${bg}" },
|
||||
-- PmenuThumb = { bg = "${gray}" }, -- Popup menu: Thumb of the scrollbar.
|
||||
-- -- overide lualine fill color with bg color
|
||||
-- LualineNormal = { bg = "${bg}" },
|
||||
-- -- overide lualine_c fill color with bg color
|
||||
-- LualineC = { bg = "${bg}" },
|
||||
-- -- overide lualine_x fill color with bg color
|
||||
-- LualineX = { bg = "${bg}" },
|
||||
-- -- overide which-key fill color with bg color
|
||||
-- -- WhichKey = { bg = "${bg}" },
|
||||
-- -- -- overide which-key fill color with bg color
|
||||
-- -- WhichKeySeperator = { bg = "${bg}" },
|
||||
-- -- -- overide which-key fill color with bg color
|
||||
-- -- WhichKeyDesc = { fg = "${red}" },
|
||||
-- -- -- overide which-key fill color with bg color
|
||||
-- -- WhichKeyFloat = { bg = "${bg}" },
|
||||
-- WhichKeyFloat = { bg = is_transparent and "NONE" or "${bg}" },
|
||||
-- -- -- overide which-key fill color with bg color
|
||||
-- -- WhichKeyValue = { bg = "${bg}" },
|
||||
-- -- -- overide which-key fill color with bg color
|
||||
-- -- WhichKeyBorder = { bg = "${bg}" },
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@ return {
|
|||
-- require("user.lualine")
|
||||
-- end,
|
||||
-- },
|
||||
{ "RRethy/vim-illuminate", event = "InsertEnter", enabled = true },
|
||||
-- { "RRethy/vim-illuminate", event = "InsertEnter", enabled = true },
|
||||
-- { "cpea2506/one_monokai.nvim" },
|
||||
-- { "luisiacc/gruvbox-baby", lazy = true, enabled = false },
|
||||
-- { "projekt0n/github-nvim-theme", version = "v0.0.7" },
|
||||
-- { "stevearc/dressing.nvim", enabled = false },
|
||||
{ "karb94/neoscroll.nvim", enabled = false },
|
||||
-- { "karb94/neoscroll.nvim", enabled = false },
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue