diff --git a/init.lua b/init.lua index 2c9360f..b861c09 100644 --- a/init.lua +++ b/init.lua @@ -3,22 +3,34 @@ require("config.lazy") require("config.common-settings") + require("config.mason") + require("config.nvim-tree") + require("config.nvim-treesitter") + require("config.lualine") + require("config.nvim-cmp") + require("config.nvim-lspconfig") + +require("config.indent-blankline") + +require("config.fzf") + +require("config.mkdx") + +require("config.mutton") + +require("config.noice") + +require("config.notify") + + +--require('config.cigan') --require("config.render-markdown") --require("config.markview") -require("config.indent-blankline") -require("config.fzf") -require("config.mkdx") - ---require("config.mutton") - - -require('config.cigan') - vim.api.nvim_set_keymap('n', '', [[lua require('config.cigan').run_script()]], { noremap = true, silent = true }) diff --git a/lua/config/bufferline.lua b/lua/config/archive/bufferline.lua similarity index 100% rename from lua/config/bufferline.lua rename to lua/config/archive/bufferline.lua diff --git a/lua/config/cigan.lua b/lua/config/archive/cigan.lua similarity index 100% rename from lua/config/cigan.lua rename to lua/config/archive/cigan.lua diff --git a/lua/config/archive/plugins-meandering.lua b/lua/config/archive/plugins-meandering.lua new file mode 100644 index 0000000..46f7e58 --- /dev/null +++ b/lua/config/archive/plugins-meandering.lua @@ -0,0 +1,205 @@ +return { + -- ============================== + -- Визуальные плагины + -- ============================== + + -- Темы оформления + { + "bluz71/vim-nightfly-colors", -- Nightfly тема + }, + { + "folke/tokyonight.nvim", -- TokyoNight тема + }, + { + "morhetz/gruvbox", -- Gruvbox тема + }, + { + "rebelot/kanagawa.nvim", -- Kanagawa тема + }, + { + "navarasu/onedark.nvim", + config = function() + require("onedark").setup({ + style = "dark", -- Выберите стиль: 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' + }) + require("onedark").load() -- Активируйте тему + end, + }, + + -- Иконки + { + "nvim-tree/nvim-web-devicons", -- Провайдер иконок для других плагинов + }, + +-- Интерфейс и UI + -- { + -- "MeanderingProgrammer/render-markdown.nvim", -- Рендеринг Markdown + -- dependencies = { "echasnovski/mini.nvim", opt = true }, + -- config = function() + -- require("config.render-markdown") + -- end, + -- }, + { + "nvim-lualine/lualine.nvim", -- Статусная строка + dependencies = { "kyazdani42/nvim-web-devicons", optional = true }, + }, + { + "lukas-reineke/indent-blankline.nvim", -- Визуализация отступов + config = function() + require("config.indent-blankline") + end, + }, + { + "folke/noice.nvim", + event = "VeryLazy", + opts = { + -- add any options here + }, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + "rcarriga/nvim-notify", + } + }, + { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = "cd app && yarn install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdowm.css.css") + --vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdown_black_writer.css") + end, + ft = { "markdown" }, + }, + -- ============================== + -- Функциональные плагины + -- ============================== + + -- LSP и автодополнение + { + "hrsh7th/cmp-nvim-lsp", -- Интеграция nvim-cmp с LSP + }, + { + "hrsh7th/cmp-nvim-lsp-signature-help", -- Поддержка сигнатур LSP в автодополнении + }, + { + "hrsh7th/cmp-path", -- Автодополнение путей + }, + { + "hrsh7th/nvim-cmp", -- Основной плагин автодополнения + }, + { + "neovim/nvim-lspconfig", -- Конфигурация LSP + }, + { + "williamboman/mason.nvim", -- Управление LSP серверами + }, + + -- Поиск и навигация + { + "ibhagwan/fzf-lua", -- FZF для быстрого поиска + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = {}, + }, + { + "nvim-lua/plenary.nvim", -- Библиотека для других плагинов + }, + + -- Другие функциональные плагины + { + "antoinemadec/FixCursorHold.nvim", -- Исправление CursorHold событий + }, + { + "gabenespoli/vim-mutton", -- Дополнительные возможности для работы с текстом + }, + { + "kyazdani42/nvim-tree.lua", -- Файловый менеджер + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + "nanotee/zoxide.vim", -- Интеграция с zoxide для быстрой навигации + }, + { + "SidOfc/mkdx", -- Улучшения для работы с Markdown + }, + { + "L3MON4D3/LuaSnip", + dependencies = { "rafamadriz/friendly-snippets" }, + }, + + { + "MeanderingProgrammer/render-markdown.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + config = function() + require("render-markdown").setup({ + -- Принудительно включаем рендеринг во всех режимах, включая терминал + render_modes = true, -- или перечислить явно: { 'n', 'c', 't', 'i' } + }) + + -- Автокоманда, срабатывающая при открытии терминала + vim.api.nvim_create_autocmd("TermOpen", { + callback = function() + -- Сообщаем Treesitter, что содержимое буфера терминала — Markdown + vim.treesitter.language.register('markdown', vim.bo.filetype) + -- Перезапускаем Treesitter-парсер для текущего буфера + vim.cmd("edit") + end, + }) + end, + } + -- Treesitter для синтаксического анализа + { + "nvim-treesitter/nvim-treesitter", + + lazy = true, + build = ":TSUpdate", + dependencies = { "MeanderingProgrammer/render-markdown.nvim" }, + config = function() + require("config.nvim-treesitter") + end, + }, + + + + { + 'gsuuon/model.nvim', + config = function() + local bash_provider = { + request_completion = function(handlers, params, options) + local input = params.input + local command = "~/test '" .. input .. "'" + local handle = io.popen(command) + local result = handle:read("*a") + handle:close() + + local response = vim.json.decode(result) + handlers.on_partial(response.message.content) + handlers.on_finish() + end + } + + require('model').setup({ + chats = { + mybash = { + provider = bash_provider, + create = function(input, context) + return { + messages = { + { role = 'user', content = input } + } + } + end, + run = function(messages, config) + local last_message = messages[#messages] + return { input = last_message.content } + end + } + } + }) + end + } +} diff --git a/lua/config/render-markdown.lua b/lua/config/archive/render-markdown.lua similarity index 100% rename from lua/config/render-markdown.lua rename to lua/config/archive/render-markdown.lua diff --git a/lua/config/common-settings.lua b/lua/config/common-settings.lua index b708970..8569a60 100644 --- a/lua/config/common-settings.lua +++ b/lua/config/common-settings.lua @@ -106,7 +106,7 @@ vim.o.laststatus = 0 -- Отключает строку состояния ---vim.cmd("colorscheme retrobox") +vim.cmd("colorscheme retrobox") --vim.cmd("colorscheme gruvbox") --vim.cmd("colorscheme astra") -- Применение темы --vim.cmd("colorscheme kanagawa") -- Основная схема @@ -116,7 +116,7 @@ vim.o.laststatus = 0 -- Отключает строку состояния --vim.cmd("colorscheme nightfly") --vim.cmd("colorscheme randomhue") --vim.cmd("colorscheme kanagawa") -vim.cmd("colorscheme wildcharm") -- темная тема +--vim.cmd("colorscheme wildcharm") -- темная тема -- vim.cmd("colorscheme zellner") -- светлая тема --vim.cmd("colorscheme tokyonight-night") diff --git a/lua/config/markdown-preview.lua b/lua/config/markdown-preview.lua new file mode 100644 index 0000000..5413f6a --- /dev/null +++ b/lua/config/markdown-preview.lua @@ -0,0 +1,9 @@ +local M = {} + +function M.init() + vim.g.mkdp_filetypes = { "markdown" } + vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdowm.css.css") + -- vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdown_black_writer.css") +end + +return M diff --git a/lua/config/model.lua b/lua/config/model.lua new file mode 100644 index 0000000..3324d64 --- /dev/null +++ b/lua/config/model.lua @@ -0,0 +1,32 @@ +local bash_provider = { + request_completion = function(handlers, params, options) + local input = params.input + local command = "~/test '" .. input .. "'" + local handle = io.popen(command) + local result = handle:read("*a") + handle:close() + + local response = vim.json.decode(result) + handlers.on_partial(response.message.content) + handlers.on_finish() + end +} + +require('model').setup({ + chats = { + mybash = { + provider = bash_provider, + create = function(input, context) + return { + messages = { + { role = 'user', content = input } + } + } + end, + run = function(messages, config) + local last_message = messages[#messages] + return { input = last_message.content } + end + } + } +}) diff --git a/lua/config/mutton.lua b/lua/config/mutton.lua index c630db3..6e2f69a 100644 --- a/lua/config/mutton.lua +++ b/lua/config/mutton.lua @@ -5,39 +5,39 @@ vim.api.nvim_set_hl(0, "EndOfBuffer", { fg = normal_bg} ) -- overrides `~` chara vim.api.nvim_set_hl(0, "VertSplit", { fg = normal_bg} ) -- overrides `~` character at the end of buffer vim.api.nvim_set_hl(0, "WinSeparator", { fg = normal_bg }) - -local mutton = false -local function on_buf_read() - vim.defer_fn(function() - local buf_name = vim.api.nvim_buf_get_name(0) -- Получаем имя файла - - - if buf_name:match("%.md$") and mutton == false and not buf_name:match("ui.md$") then -- Проверяем, заканчивается ли имя на ".md" - mutton = true - vim.cmd("MuttonToggle") - - vim.opt.number = false - vim.opt.relativenumber = false - elseif mutton == true and buf_name:match("ui.md$") then - mutton = false - vim.cmd("wincmd l | q") - vim.cmd("wincmd h | q") - vim.cmd("MuttonToggle") - - elseif buf_name:match("NvimTree_1$") then - - elseif buf_name:match("%[%[Mutton%]%]$") then - - elseif buf_name:match("/usr/bin/sh$") then - - elseif mutton == true and not buf_name:match("%.md$") then - mutton = false - vim.cmd("MuttonToggle") - end - end, 100) -end - -vim.api.nvim_create_autocmd("BufEnter", { callback = on_buf_read }) +-- Для автовключения +-- local mutton = false +-- local function on_buf_read() +-- vim.defer_fn(function() +-- local buf_name = vim.api.nvim_buf_get_name(0) -- Получаем имя файла +-- +-- +-- if buf_name:match("%.md$") and mutton == false and not buf_name:match("ui.md$") then -- Проверяем, заканчивается ли имя на ".md" +-- mutton = true +-- vim.cmd("MuttonToggle") +-- +-- vim.opt.number = false +-- vim.opt.relativenumber = false +-- elseif mutton == true and buf_name:match("ui.md$") then +-- mutton = false +-- vim.cmd("wincmd l | q") +-- vim.cmd("wincmd h | q") +-- vim.cmd("MuttonToggle") +-- +-- elseif buf_name:match("NvimTree_1$") then +-- +-- elseif buf_name:match("%[%[Mutton%]%]$") then +-- +-- elseif buf_name:match("/usr/bin/sh$") then +-- +-- elseif mutton == true and not buf_name:match("%.md$") then +-- mutton = false +-- vim.cmd("MuttonToggle") +-- end +-- end, 100) +-- end +-- +-- vim.api.nvim_create_autocmd("BufEnter", { callback = on_buf_read }) diff --git a/lua/config/noice.lua b/lua/config/noice.lua new file mode 100644 index 0000000..193516f --- /dev/null +++ b/lua/config/noice.lua @@ -0,0 +1,18 @@ +require("noice").setup({ + lsp = { + -- override markdown rendering so that **cmp** and other plugins use **Treesitter** + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp + }, + }, + -- you can enable a preset for easier configuration + presets = { + bottom_search = false, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help + }, +}) diff --git a/lua/config/notify.lua b/lua/config/notify.lua new file mode 100644 index 0000000..131f66f --- /dev/null +++ b/lua/config/notify.lua @@ -0,0 +1,7 @@ +require('notify').setup({ +max_width = 100, -- Максимальная ширина окна уведомления +max_height = 50, -- Максимальная высота окна уведомления +-- Другие стандартные опции nvim-notify +top_down = true, -- Размещать уведомления снизу вверх +timeout = 1500, -- Время отображения в мс +}) diff --git a/lua/config/nvim-lspconfig.lua b/lua/config/nvim-lspconfig.lua index fece676..7553474 100644 --- a/lua/config/nvim-lspconfig.lua +++ b/lua/config/nvim-lspconfig.lua @@ -12,6 +12,8 @@ vim.lsp.config('jdtls', { -- C/C++ vim.lsp.config('clangd', {}) +-- C/C++ +vim.lsp.config('arduino-language-server', {}) -- Rust vim.lsp.config('rust_analyzer', { diff --git a/lua/config/nvim-treesitter.lua b/lua/config/nvim-treesitter.lua index 63fee6f..550ce43 100644 --- a/lua/config/nvim-treesitter.lua +++ b/lua/config/nvim-treesitter.lua @@ -1,4 +1,4 @@ -require'nvim-treesitter.configs'.setup { +require'nvim-treesitter'.setup { highlight = { enable = true, disable = function(lang, buf) diff --git a/lua/config/onedark.lua b/lua/config/onedark.lua new file mode 100644 index 0000000..9454a43 --- /dev/null +++ b/lua/config/onedark.lua @@ -0,0 +1,4 @@ +require("onedark").setup({ + style = "dark", -- Выберите стиль: 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' +}) +require("onedark").load() -- Активируйте тему diff --git a/lua/plugins-bkp.lua b/lua/plugins-bkp.lua new file mode 100644 index 0000000..3335ba9 --- /dev/null +++ b/lua/plugins-bkp.lua @@ -0,0 +1,211 @@ +return { + -- ============================== + -- Визуальные плагины + -- ============================== + + -- Темы оформления + { "nuvic/flexoki-nvim", name = "flexoki" }, + { + "bluz71/vim-nightfly-colors", -- Nightfly тема + }, + { + "folke/tokyonight.nvim", -- TokyoNight тема + }, + { + "morhetz/gruvbox", -- Gruvbox тема + }, + { + "rebelot/kanagawa.nvim", -- Kanagawa тема + }, + { + "navarasu/onedark.nvim", + config = function() + require("onedark").setup({ + style = "dark", -- Выберите стиль: 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' + }) + require("onedark").load() -- Активируйте тему + end, + }, + + -- Иконки + { + "nvim-tree/nvim-web-devicons", -- Провайдер иконок для других плагинов + }, + +-- Интерфейс и UI + -- { + -- "MeanderingProgrammer/render-markdown.nvim", -- Рендеринг Markdown + -- dependencies = { "echasnovski/mini.nvim", opt = true }, + -- config = function() + -- require("config.render-markdown") + -- end, + -- }, + { + "nvim-lualine/lualine.nvim", -- Статусная строка + dependencies = { "kyazdani42/nvim-web-devicons", optional = true }, + }, + { + "lukas-reineke/indent-blankline.nvim", -- Визуализация отступов + config = function() + require("config.indent-blankline") + end, + }, + { + "folke/noice.nvim", + event = "VeryLazy", + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + "rcarriga/nvim-notify", + } + }, + { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = "cd app && yarn install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdowm.css.css") + --vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdown_black_writer.css") + end, + ft = { "markdown" }, + }, + -- ============================== + -- Функциональные плагины + -- ============================== + + -- LSP и автодополнение + { + "hrsh7th/cmp-nvim-lsp", -- Интеграция nvim-cmp с LSP + }, + { + "hrsh7th/cmp-nvim-lsp-signature-help", -- Поддержка сигнатур LSP в автодополнении + }, + { + "hrsh7th/cmp-path", -- Автодополнение путей + }, + { + "hrsh7th/nvim-cmp", -- Основной плагин автодополнения + }, + { + "neovim/nvim-lspconfig", -- Конфигурация LSP + }, + + { "mason-org/mason-lspconfig.nvim" }, + + { + "williamboman/mason.nvim", -- Управление LSP серверами + }, + + -- Поиск и навигация + { + "ibhagwan/fzf-lua", -- FZF для быстрого поиска + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = {}, + }, + { + "nvim-lua/plenary.nvim", -- Библиотека для других плагинов + }, + + -- Другие функциональные плагины + { + "antoinemadec/FixCursorHold.nvim", -- Исправление CursorHold событий + }, + { + "gabenespoli/vim-mutton", -- Дополнительные возможности для работы с текстом + }, + { + "kyazdani42/nvim-tree.lua", -- Файловый менеджер + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + "nanotee/zoxide.vim", -- Интеграция с zoxide для быстрой навигации + }, + { + "SidOfc/mkdx", -- Улучшения для работы с Markdown + }, + { + "L3MON4D3/LuaSnip", + dependencies = { "rafamadriz/friendly-snippets" }, + }, + + { + "saghen/blink.cmp", + dependencies = { + "saghen/blink.lib", + }, + + }, + + { + "OXY2DEV/markview.nvim", + lazy = false, + config = function() + require("config.markview") + end, + dependencies = {"saghen/blink.cmp"}, + }, + + -- Treesitter для синтаксического анализа + { + "nvim-treesitter/nvim-treesitter", + branch = 'main', + lazy = true, + main = 'config.nvim-treesitter', + build = ":TSUpdate", + dependencies = { "OXY2DEV/markview.nvim" }, + config = function() + require("config.nvim-treesitter") + end, + }, + + { + "mks-h/treesitter-autoinstall.nvim", + config = function() + require("treesitter-autoinstall").setup() + end, + }, + + + + { + 'gsuuon/model.nvim', + config = function() + local bash_provider = { + request_completion = function(handlers, params, options) + local input = params.input + local command = "~/test '" .. input .. "'" + local handle = io.popen(command) + local result = handle:read("*a") + handle:close() + + local response = vim.json.decode(result) + handlers.on_partial(response.message.content) + handlers.on_finish() + end + } + + require('model').setup({ + chats = { + mybash = { + provider = bash_provider, + create = function(input, context) + return { + messages = { + { role = 'user', content = input } + } + } + end, + run = function(messages, config) + local last_message = messages[#messages] + return { input = last_message.content } + end + } + } + }) + end + } +} diff --git a/lua/plugins.lua b/lua/plugins.lua index 0b6ccc7..5a6e93b 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,196 +1,254 @@ return { -- ============================== - -- Визуальные плагины + --# Темы оформления -- ============================== - -- Темы оформления - { - "bluz71/vim-nightfly-colors", -- Nightfly тема - }, - { - "folke/tokyonight.nvim", -- TokyoNight тема - }, - { - "morhetz/gruvbox", -- Gruvbox тема - }, - { - "rebelot/kanagawa.nvim", -- Kanagawa тема - }, - { - "navarasu/onedark.nvim", - config = function() - require("onedark").setup({ - style = "dark", -- Выберите стиль: 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' - }) - require("onedark").load() -- Активируйте тему - end, - }, + -- Flexoki тема + { "nuvic/flexoki-nvim", name = "flexoki" }, - -- Иконки + -- Nightfly тема + { "bluz71/vim-nightfly-colors" }, + + -- TokyoNight тема + { "folke/tokyonight.nvim" }, + + -- Gruvbox тема + { "morhetz/gruvbox" }, + + -- Kanagawa тема + { "rebelot/kanagawa.nvim" }, + + -- OneDark тема { - "nvim-tree/nvim-web-devicons", -- Провайдер иконок для других плагинов + "navarasu/onedark.nvim", + config = function() + require("config.onedark") + end, }, --- Интерфейс и UI - -- { - -- "MeanderingProgrammer/render-markdown.nvim", -- Рендеринг Markdown - -- dependencies = { "echasnovski/mini.nvim", opt = true }, - -- config = function() - -- require("config.render-markdown") - -- end, - -- }, + + + + + + + + + + + + + + + + + -- ============================== + --# Иконки и UI + -- ============================== + + -- Провайдер иконок для других плагинов + { "nvim-tree/nvim-web-devicons" }, + + -- Статусная строка { - "nvim-lualine/lualine.nvim", -- Статусная строка + "nvim-lualine/lualine.nvim", dependencies = { "kyazdani42/nvim-web-devicons", optional = true }, }, + + -- Визуализация отступов { - "lukas-reineke/indent-blankline.nvim", -- Визуализация отступов + "lukas-reineke/indent-blankline.nvim", config = function() require("config.indent-blankline") end, }, - { - "folke/noice.nvim", - event = "VeryLazy", - opts = { - -- add any options here - }, - dependencies = { - -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries - "MunifTanjim/nui.nvim", - -- OPTIONAL: - -- `nvim-notify` is only needed, if you want to use the notification view. - -- If not available, we use `mini` as the fallback - "rcarriga/nvim-notify", - } - }, - { - "iamcco/markdown-preview.nvim", - cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, - build = "cd app && yarn install", - init = function() - vim.g.mkdp_filetypes = { "markdown" } - vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdowm.css.css") - --vim.g.mkdp_markdown_css = vim.fn.expand("~/.config/nvim/markdown_black_writer.css") - end, - ft = { "markdown" }, - }, - -- ============================== - -- Функциональные плагины - -- ============================== - -- LSP и автодополнение + -- Улучшенные уведомления и командная строка { - "hrsh7th/cmp-nvim-lsp", -- Интеграция nvim-cmp с LSP - }, - { - "hrsh7th/cmp-nvim-lsp-signature-help", -- Поддержка сигнатур LSP в автодополнении - }, - { - "hrsh7th/cmp-path", -- Автодополнение путей - }, - { - "hrsh7th/nvim-cmp", -- Основной плагин автодополнения - }, - { - "neovim/nvim-lspconfig", -- Конфигурация LSP - }, - { - "williamboman/mason.nvim", -- Управление LSP серверами + "folke/noice.nvim", + event = "VeryLazy", + dependencies = { + "MunifTanjim/nui.nvim", + "rcarriga/nvim-notify", + }, }, - -- Поиск и навигация + -- Превью Markdown в браузере { - "ibhagwan/fzf-lua", -- FZF для быстрого поиска + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = "cd app && yarn install", + init = function() + require("config.markdown-preview").init() + end, + ft = { "markdown" }, + }, + + -- Рендеринг Markdown в Neovim + { + "OXY2DEV/markview.nvim", + lazy = false, + config = function() + require("config.markview") + end, + dependencies = { "saghen/blink.cmp" }, + }, + + + + + + + + + + + + + + -- ============================== + --# LSP и автодополнение + -- ============================== + + -- Интеграция nvim-cmp с LSP + { "hrsh7th/cmp-nvim-lsp" }, + + -- Поддержка сигнатур LSP в автодополнении + { "hrsh7th/cmp-nvim-lsp-signature-help" }, + + -- Автодополнение путей + { "hrsh7th/cmp-path" }, + + -- Основной плагин автодополнения + { "hrsh7th/nvim-cmp" }, + + -- Конфигурация LSP + { "neovim/nvim-lspconfig" }, + + -- Интеграция Mason с LSPConfig + { "mason-org/mason-lspconfig.nvim" }, + + -- Управление LSP серверами + { "williamboman/mason.nvim" }, + + -- Сниппеты + { + "L3MON4D3/LuaSnip", + dependencies = { "rafamadriz/friendly-snippets" }, + }, + + -- Альтернативный движок автодополнения + { + "saghen/blink.cmp", + dependencies = { "saghen/blink.lib" }, + }, + + + + + + + + + + + + + + + + -- ============================== + --# Поиск и навигация + -- ============================== + + -- FZF для быстрого поиска + { + "ibhagwan/fzf-lua", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = {}, }, - { - "nvim-lua/plenary.nvim", -- Библиотека для других плагинов - }, - -- Другие функциональные плагины + -- Библиотека для других плагинов + { "nvim-lua/plenary.nvim" }, + + -- Файловый менеджер { - "antoinemadec/FixCursorHold.nvim", -- Исправление CursorHold событий - }, - { - "gabenespoli/vim-mutton", -- Дополнительные возможности для работы с текстом - }, - { - "kyazdani42/nvim-tree.lua", -- Файловый менеджер + "kyazdani42/nvim-tree.lua", dependencies = { "nvim-tree/nvim-web-devicons" }, }, - { - "nanotee/zoxide.vim", -- Интеграция с zoxide для быстрой навигации - }, - { - "SidOfc/mkdx", -- Улучшения для работы с Markdown - }, - { - "L3MON4D3/LuaSnip", - dependencies = { "rafamadriz/friendly-snippets" }, - }, - { - "OXY2DEV/markview.nvim", - lazy = false, - config = function() - require("config.markview") - end, - dependencies = { - "saghen/blink.cmp" - }, - }, + -- Интеграция с zoxide для быстрой навигации + { "nanotee/zoxide.vim" }, - -- Treesitter для синтаксического анализа + + + + + + + + + + + + + + -- ============================== + --# Синтаксис и Treesitter + -- ============================== + + -- Синтаксический анализатор { "nvim-treesitter/nvim-treesitter", - - lazy = true, + branch = 'main', + lazy = true, + main = 'config.nvim-treesitter', build = ":TSUpdate", - dependencies = { "OXY2DEV/markview.nvim" }, + dependencies = { "OXY2DEV/markview.nvim" }, config = function() require("config.nvim-treesitter") end, }, + -- Автоустановка парсеров Treesitter + { + "mks-h/treesitter-autoinstall.nvim", + config = function() + require("treesitter-autoinstall").setup() + end, + }, - { - 'gsuuon/model.nvim', - config = function() - local bash_provider = { - request_completion = function(handlers, params, options) - local input = params.input - local command = "~/test '" .. input .. "'" - local handle = io.popen(command) - local result = handle:read("*a") - handle:close() - - local response = vim.json.decode(result) - handlers.on_partial(response.message.content) - handlers.on_finish() - end - } - require('model').setup({ - chats = { - mybash = { - provider = bash_provider, - create = function(input, context) - return { - messages = { - { role = 'user', content = input } - } - } - end, - run = function(messages, config) - local last_message = messages[#messages] - return { input = last_message.content } - end - } - } - }) - end - } + + + + + + + + + + + + -- ============================== + --# Дополнительные утилиты + -- ============================== + + -- Исправление CursorHold событий + { "antoinemadec/FixCursorHold.nvim" }, + + -- Дополнительные возможности для работы с текстом + { "gabenespoli/vim-mutton" }, + + -- Улучшения для работы с Markdown + { "SidOfc/mkdx" }, + + -- AI ассистент через bash + { + "gsuuon/model.nvim", + config = function() + require("config.model") + end, + }, }