diff --git a/.config/nvim/lua/goodhumored/appearance/theme/gruvbox.lua b/.config/nvim/lua/goodhumored/appearance/theme/gruvbox.lua index 44b8731..88bac3b 100644 --- a/.config/nvim/lua/goodhumored/appearance/theme/gruvbox.lua +++ b/.config/nvim/lua/goodhumored/appearance/theme/gruvbox.lua @@ -1,32 +1,11 @@ return { - "ellisonleao/gruvbox.nvim", + "sainnhe/gruvbox-material", + lazy = false, priority = 1000, config = function() - require("gruvbox").setup({ - terminal_colors = true, -- add neovim terminal colors - undercurl = true, - underline = true, - bold = true, - italic = { - strings = true, - emphasis = true, - comments = true, - operators = false, - folds = true, - }, - strikethrough = true, - invert_selection = false, - invert_signs = false, - invert_tabline = false, - invert_intend_guides = false, - inverse = true, -- invert background for search, diffs, statuslines and errors - contrast = "", -- can be "hard", "soft" or empty string - palette_overrides = {}, - overrides = {}, - dim_inactive = false, - transparent_mode = false, - }) - vim.o.background = "dark" - vim.cmd("colorscheme gruvbox") + -- Optionally configure and load the colorscheme + -- directly inside the plugin declaration. + vim.g.gruvbox_material_enable_italic = true + vim.cmd.colorscheme("gruvbox-material") end, } diff --git a/.config/nvim/lua/goodhumored/appearance/ui/barbar.lua b/.config/nvim/lua/goodhumored/appearance/ui/barbar.lua index 0a73e0e..53d0080 100644 --- a/.config/nvim/lua/goodhumored/appearance/ui/barbar.lua +++ b/.config/nvim/lua/goodhumored/appearance/ui/barbar.lua @@ -42,6 +42,16 @@ return { -- Or, specify all three Outline = { event = "BufWinLeave", text = "symbols-outline", align = "right" }, }, + custom_buffer_name = function(bufnr) + local filetype = vim.api.nvim_buf_get_option(bufnr, "filetype") + if filetype == "markdown" and vim.b[bufnr].obsidian_note then + local note = vim.b[bufnr].obsidian_note + return note.title + or table.concat(note.aliases, ", ") + or vim.fn.fnamemodify(vim.api.nvim_buf_get_name(bufnr), ":t:r") + end + return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(bufnr), ":t") + end, }, version = "^1.0.0", -- optional: only update when a new 1.x version is released } diff --git a/.config/nvim/lua/goodhumored/appearance/ui/lualine.lua b/.config/nvim/lua/goodhumored/appearance/ui/lualine.lua index 21921dc..28aff34 100644 --- a/.config/nvim/lua/goodhumored/appearance/ui/lualine.lua +++ b/.config/nvim/lua/goodhumored/appearance/ui/lualine.lua @@ -4,32 +4,33 @@ return { config = function() require("lualine").setup({ options = { - theme = "iceberg_dark", - component_separators = "", - section_separators = { left = "", right = "" }, + icons_enabled = true, -- Включить иконки + theme = "gruvbox-material", + component_separators = { left = " ", right = " " }, + section_separators = { left = " ", right = " " }, + disabled_filetypes = { -- Отключить lualine для определённых типов файлов + statusline = {}, + winbar = {}, + }, + -- always_divide_middle = true, + globalstatus = true, -- Один статусбар для всех окон }, sections = { - lualine_a = { { "mode", separator = { left = "" }, right_padding = 2 } }, - lualine_b = { "filename", "branch" }, - lualine_c = { - "%=", --[[ add your center compoentnts here in place of this comment ]] - }, - lualine_x = {}, - lualine_y = { "filetype", "progress" }, - lualine_z = { - { "location", separator = { right = "" }, left_padding = 2 }, - }, + lualine_a = { "mode" }, -- Режим (Normal, Insert, etc.) + lualine_b = { "branch", "diagnostics" }, -- Git и диагностика + lualine_c = { "filename" }, -- Имя файла + lualine_x = { "fileformat", "filetype" }, -- Кодировка, формат, тип файла + lualine_y = { "progress" }, -- Прогресс в файле + lualine_z = { "location" }, -- Положение курсора }, inactive_sections = { - lualine_a = { "filename" }, + lualine_a = {}, lualine_b = {}, - lualine_c = {}, - lualine_x = {}, + lualine_c = { "filename" }, + lualine_x = { "location" }, lualine_y = {}, - lualine_z = { "location" }, + lualine_z = {}, }, - tabline = {}, - extensions = {}, }) end, } diff --git a/.config/nvim/lua/goodhumored/appearance/ui/nvim-tree.lua b/.config/nvim/lua/goodhumored/appearance/ui/nvim-tree.lua index 66a201d..e2ca0df 100644 --- a/.config/nvim/lua/goodhumored/appearance/ui/nvim-tree.lua +++ b/.config/nvim/lua/goodhumored/appearance/ui/nvim-tree.lua @@ -58,7 +58,9 @@ return { local api = require("nvim-tree.api") vim.keymap.set("n", "e", api.tree.toggle, { desc = "[E]xplorer" }) vim.keymap.set("n", "E", function() + -- api.tree.open() -- Просто открываем дерево api.tree.find_file({ open = true, focus = true }) + -- api.tree.find_file({ focus = true }) end, { desc = "Focus file in [E]xplorer" }) end, }