local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath, }) end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ { "catppuccin/nvim", name = "catppuccin", priority = 1000, config = function() require("catppuccin").setup({ flavour = "frappe", background = { light = "latte", dark = "frappe", }, transparent_background = false, show_end_of_buffer = false, term_colors = false, dim_inactive = { enabled = false, shade = "dark", percentage = 0.15, }, styles = { comments = { "italic" }, conditionals = { "italic" }, }, color_overrides = { frappe = { mauve = "#ca9ee6", }, }, integrations = { cmp = true, gitsigns = true, nvimtree = true, treesitter = true, notify = false, mini = { enabled = true, indentscope_color = "", }, }, }) vim.cmd.colorscheme("catppuccin") end, }, { "nvim-tree/nvim-tree.lua", dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() local function my_on_attach(bufnr) local api = require("nvim-tree.api") api.config.mappings.default_on_attach(bufnr) end require("nvim-tree").setup({ disable_netrw = true, hijack_netrw = true, update_focused_file = { enable = true, update_cwd = true, }, view = { width = 40, side = "left", }, renderer = { highlight_git = true, icons = { show = { file = true, folder = true, folder_arrow = true, git = true, }, }, }, on_attach = my_on_attach, }) vim.keymap.set("n", "", ":NvimTreeToggle", { noremap = true, silent = true }) end, }, { "lewis6991/gitsigns.nvim", config = function() require("gitsigns").setup() end, }, { "nvim-lualine/lualine.nvim", config = function() local function gitsigns_status() local gs = vim.b.gitsigns_status_dict if gs then local added = gs.added or 0 local changed = gs.changed or 0 local removed = gs.removed or 0 local status = "" if added > 0 then status = status .. "[+]" .. added .. " " end if changed > 0 then status = status .. "[~]" .. changed .. " " end if removed > 0 then status = status .. "[-]" .. removed .. " " end return status end return "" end require("lualine").setup({ options = { theme = "catppuccin", section_separators = { "", "" }, component_separators = { "", "" }, }, sections = { lualine_a = { "mode" }, lualine_b = { "branch" }, lualine_c = { "filename" }, lualine_x = { gitsigns_status, "encoding", "filetype", }, lualine_y = {}, lualine_z = {}, }, }) end, }, { "akinsho/bufferline.nvim", tag = "*", dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() vim.g.mapleader = "\\" require("bufferline").setup({ options = { show_buffer_close_icons = true, tab_size = 22, separator_style = "slant", }, }) for i = 1, 9 do vim.keymap.set("n", "" .. i, ":BufferLineGoToBuffer " .. i .. "", { noremap = true, silent = true }) end vim.keymap.set("n", "", ":BufferLineCycleNext", { noremap = true, silent = true }) vim.keymap.set("n", "", ":BufferLineCyclePrev", { noremap = true, silent = true }) end, }, { "petertriho/nvim-scrollbar", config = function() require("scrollbar").setup() end, }, { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" }, config = function() require("telescope").setup() end, }, { "stevearc/dressing.nvim", opts = {}, }, { "brenoprata10/nvim-highlight-colors", config = function() require("nvim-highlight-colors").setup({ render = "background", enable_named_colors = true, enable_tailwind = true, }) end, }, { "williamboman/mason.nvim", build = ":MasonUpdate", config = true, }, { "williamboman/mason-lspconfig.nvim", config = true, }, { "neovim/nvim-lspconfig", config = function() require("mason").setup() require("mason-lspconfig").setup({ automatic_installation = true, }) require("lspconfig").lua_ls.setup({}) end, }, { "hrsh7th/nvim-cmp", dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", }, config = function() local cmp = require("cmp") cmp.setup({ snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) end, }, mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.confirm({ select = true }), }), sources = { { name = "nvim_lsp" }, }, }) end, }, }) -- Общие настройки vim.opt.termguicolors = true vim.opt.number = true vim.opt.cursorline = true vim.opt.expandtab = true vim.opt.shiftwidth = 2 vim.opt.tabstop = 2 vim.opt.smartindent = true vim.opt.mouse = "a" vim.opt.clipboard = "unnamedplus" vim.opt.showcmd = false vim.keymap.set("n", "", "h", { noremap = true }) vim.keymap.set("n", "", "j", { noremap = true }) vim.keymap.set("n", "", "k", { noremap = true }) vim.keymap.set("n", "", "l", { noremap = true })