noice + notify
This commit is contained in:
30
init.lua
30
init.lua
@ -3,22 +3,34 @@ require("config.lazy")
|
|||||||
require("config.common-settings")
|
require("config.common-settings")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require("config.mason")
|
require("config.mason")
|
||||||
|
|
||||||
require("config.nvim-tree")
|
require("config.nvim-tree")
|
||||||
|
|
||||||
require("config.nvim-treesitter")
|
require("config.nvim-treesitter")
|
||||||
|
|
||||||
require("config.lualine")
|
require("config.lualine")
|
||||||
|
|
||||||
require("config.nvim-cmp")
|
require("config.nvim-cmp")
|
||||||
|
|
||||||
require("config.nvim-lspconfig")
|
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.render-markdown")
|
||||||
--require("config.markview")
|
--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', '<leader><CR>', [[<cmd>lua require('config.cigan').run_script()<CR>]], { noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n', '<leader><CR>', [[<cmd>lua require('config.cigan').run_script()<CR>]], { noremap = true, silent = true })
|
||||||
|
|||||||
205
lua/config/archive/plugins-meandering.lua
Normal file
205
lua/config/archive/plugins-meandering.lua
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -106,7 +106,7 @@ vim.o.laststatus = 0 -- Отключает строку состояния
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
--vim.cmd("colorscheme retrobox")
|
vim.cmd("colorscheme retrobox")
|
||||||
--vim.cmd("colorscheme gruvbox")
|
--vim.cmd("colorscheme gruvbox")
|
||||||
--vim.cmd("colorscheme astra") -- Применение темы
|
--vim.cmd("colorscheme astra") -- Применение темы
|
||||||
--vim.cmd("colorscheme kanagawa") -- Основная схема
|
--vim.cmd("colorscheme kanagawa") -- Основная схема
|
||||||
@ -116,7 +116,7 @@ vim.o.laststatus = 0 -- Отключает строку состояния
|
|||||||
--vim.cmd("colorscheme nightfly")
|
--vim.cmd("colorscheme nightfly")
|
||||||
--vim.cmd("colorscheme randomhue")
|
--vim.cmd("colorscheme randomhue")
|
||||||
--vim.cmd("colorscheme kanagawa")
|
--vim.cmd("colorscheme kanagawa")
|
||||||
vim.cmd("colorscheme wildcharm") -- темная тема
|
--vim.cmd("colorscheme wildcharm") -- темная тема
|
||||||
-- vim.cmd("colorscheme zellner") -- светлая тема
|
-- vim.cmd("colorscheme zellner") -- светлая тема
|
||||||
--vim.cmd("colorscheme tokyonight-night")
|
--vim.cmd("colorscheme tokyonight-night")
|
||||||
|
|
||||||
|
|||||||
9
lua/config/markdown-preview.lua
Normal file
9
lua/config/markdown-preview.lua
Normal file
@ -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
|
||||||
32
lua/config/model.lua
Normal file
32
lua/config/model.lua
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
@ -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, "VertSplit", { fg = normal_bg} ) -- overrides `~` character at the end of buffer
|
||||||
vim.api.nvim_set_hl(0, "WinSeparator", { fg = normal_bg })
|
vim.api.nvim_set_hl(0, "WinSeparator", { fg = normal_bg })
|
||||||
|
|
||||||
|
-- Для автовключения
|
||||||
local mutton = false
|
-- local mutton = false
|
||||||
local function on_buf_read()
|
-- local function on_buf_read()
|
||||||
vim.defer_fn(function()
|
-- vim.defer_fn(function()
|
||||||
local buf_name = vim.api.nvim_buf_get_name(0) -- Получаем имя файла
|
-- 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"
|
-- if buf_name:match("%.md$") and mutton == false and not buf_name:match("ui.md$") then -- Проверяем, заканчивается ли имя на ".md"
|
||||||
mutton = true
|
-- mutton = true
|
||||||
vim.cmd("MuttonToggle")
|
-- vim.cmd("MuttonToggle")
|
||||||
|
--
|
||||||
vim.opt.number = false
|
-- vim.opt.number = false
|
||||||
vim.opt.relativenumber = false
|
-- vim.opt.relativenumber = false
|
||||||
elseif mutton == true and buf_name:match("ui.md$") then
|
-- elseif mutton == true and buf_name:match("ui.md$") then
|
||||||
mutton = false
|
-- mutton = false
|
||||||
vim.cmd("wincmd l | q")
|
-- vim.cmd("wincmd l | q")
|
||||||
vim.cmd("wincmd h | q")
|
-- vim.cmd("wincmd h | q")
|
||||||
vim.cmd("MuttonToggle")
|
-- vim.cmd("MuttonToggle")
|
||||||
|
--
|
||||||
elseif buf_name:match("NvimTree_1$") then
|
-- elseif buf_name:match("NvimTree_1$") then
|
||||||
|
--
|
||||||
elseif buf_name:match("%[%[Mutton%]%]$") then
|
-- elseif buf_name:match("%[%[Mutton%]%]$") then
|
||||||
|
--
|
||||||
elseif buf_name:match("/usr/bin/sh$") then
|
-- elseif buf_name:match("/usr/bin/sh$") then
|
||||||
|
--
|
||||||
elseif mutton == true and not buf_name:match("%.md$") then
|
-- elseif mutton == true and not buf_name:match("%.md$") then
|
||||||
mutton = false
|
-- mutton = false
|
||||||
vim.cmd("MuttonToggle")
|
-- vim.cmd("MuttonToggle")
|
||||||
end
|
-- end
|
||||||
end, 100)
|
-- end, 100)
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
vim.api.nvim_create_autocmd("BufEnter", { callback = on_buf_read })
|
-- vim.api.nvim_create_autocmd("BufEnter", { callback = on_buf_read })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
18
lua/config/noice.lua
Normal file
18
lua/config/noice.lua
Normal file
@ -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
|
||||||
|
},
|
||||||
|
})
|
||||||
7
lua/config/notify.lua
Normal file
7
lua/config/notify.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
require('notify').setup({
|
||||||
|
max_width = 100, -- Максимальная ширина окна уведомления
|
||||||
|
max_height = 50, -- Максимальная высота окна уведомления
|
||||||
|
-- Другие стандартные опции nvim-notify
|
||||||
|
top_down = true, -- Размещать уведомления снизу вверх
|
||||||
|
timeout = 1500, -- Время отображения в мс
|
||||||
|
})
|
||||||
@ -12,6 +12,8 @@ vim.lsp.config('jdtls', {
|
|||||||
|
|
||||||
-- C/C++
|
-- C/C++
|
||||||
vim.lsp.config('clangd', {})
|
vim.lsp.config('clangd', {})
|
||||||
|
-- C/C++
|
||||||
|
vim.lsp.config('arduino-language-server', {})
|
||||||
|
|
||||||
-- Rust
|
-- Rust
|
||||||
vim.lsp.config('rust_analyzer', {
|
vim.lsp.config('rust_analyzer', {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter'.setup {
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = function(lang, buf)
|
disable = function(lang, buf)
|
||||||
|
|||||||
4
lua/config/onedark.lua
Normal file
4
lua/config/onedark.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
require("onedark").setup({
|
||||||
|
style = "dark", -- Выберите стиль: 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer'
|
||||||
|
})
|
||||||
|
require("onedark").load() -- Активируйте тему
|
||||||
211
lua/plugins-bkp.lua
Normal file
211
lua/plugins-bkp.lua
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
336
lua/plugins.lua
336
lua/plugins.lua
@ -1,152 +1,208 @@
|
|||||||
return {
|
return {
|
||||||
-- ==============================
|
-- ==============================
|
||||||
-- Визуальные плагины
|
--# Темы оформления
|
||||||
-- ==============================
|
-- ==============================
|
||||||
|
|
||||||
-- Темы оформления
|
-- Flexoki тема
|
||||||
{
|
{ "nuvic/flexoki-nvim", name = "flexoki" },
|
||||||
"bluz71/vim-nightfly-colors", -- Nightfly тема
|
|
||||||
},
|
-- Nightfly тема
|
||||||
{
|
{ "bluz71/vim-nightfly-colors" },
|
||||||
"folke/tokyonight.nvim", -- TokyoNight тема
|
|
||||||
},
|
-- TokyoNight тема
|
||||||
{
|
{ "folke/tokyonight.nvim" },
|
||||||
"morhetz/gruvbox", -- Gruvbox тема
|
|
||||||
},
|
-- Gruvbox тема
|
||||||
{
|
{ "morhetz/gruvbox" },
|
||||||
"rebelot/kanagawa.nvim", -- Kanagawa тема
|
|
||||||
},
|
-- Kanagawa тема
|
||||||
|
{ "rebelot/kanagawa.nvim" },
|
||||||
|
|
||||||
|
-- OneDark тема
|
||||||
{
|
{
|
||||||
"navarasu/onedark.nvim",
|
"navarasu/onedark.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("onedark").setup({
|
require("config.onedark")
|
||||||
style = "dark", -- Выберите стиль: 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer'
|
|
||||||
})
|
|
||||||
require("onedark").load() -- Активируйте тему
|
|
||||||
end,
|
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,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ==============================
|
||||||
|
--# Иконки и UI
|
||||||
|
-- ==============================
|
||||||
|
|
||||||
|
-- Провайдер иконок для других плагинов
|
||||||
|
{ "nvim-tree/nvim-web-devicons" },
|
||||||
|
|
||||||
|
-- Статусная строка
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim", -- Статусная строка
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = { "kyazdani42/nvim-web-devicons", optional = true },
|
dependencies = { "kyazdani42/nvim-web-devicons", optional = true },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Визуализация отступов
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim", -- Визуализация отступов
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.indent-blankline")
|
require("config.indent-blankline")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Улучшенные уведомления и командная строка
|
||||||
{
|
{
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
|
||||||
-- add any options here
|
|
||||||
},
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
|
||||||
"MunifTanjim/nui.nvim",
|
"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",
|
"rcarriga/nvim-notify",
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Превью Markdown в браузере
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||||
build = "cd app && yarn install",
|
build = "cd app && yarn install",
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.mkdp_filetypes = { "markdown" }
|
require("config.markdown-preview").init()
|
||||||
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,
|
end,
|
||||||
ft = { "markdown" },
|
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" },
|
|
||||||
},
|
|
||||||
|
|
||||||
|
-- Рендеринг Markdown в Neovim
|
||||||
{
|
{
|
||||||
"OXY2DEV/markview.nvim",
|
"OXY2DEV/markview.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
require("config.markview")
|
require("config.markview")
|
||||||
end,
|
end,
|
||||||
dependencies = {
|
dependencies = { "saghen/blink.cmp" },
|
||||||
"saghen/blink.cmp"
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Treesitter для синтаксического анализа
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ==============================
|
||||||
|
--# 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" },
|
||||||
|
|
||||||
|
-- Файловый менеджер
|
||||||
|
{
|
||||||
|
"kyazdani42/nvim-tree.lua",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Интеграция с zoxide для быстрой навигации
|
||||||
|
{ "nanotee/zoxide.vim" },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ==============================
|
||||||
|
--# Синтаксис и Treesitter
|
||||||
|
-- ==============================
|
||||||
|
|
||||||
|
-- Синтаксический анализатор
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
branch = 'main',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
main = 'config.nvim-treesitter',
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
dependencies = { "OXY2DEV/markview.nvim" },
|
dependencies = { "OXY2DEV/markview.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
@ -154,43 +210,45 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Автоустановка парсеров Treesitter
|
||||||
|
|
||||||
{
|
{
|
||||||
'gsuuon/model.nvim',
|
"mks-h/treesitter-autoinstall.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
local bash_provider = {
|
require("treesitter-autoinstall").setup()
|
||||||
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,
|
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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user