render markdown only line render

This commit is contained in:
2025-04-03 15:18:04 +03:00
parent 340430a5cd
commit dde7d87052
5 changed files with 82 additions and 7 deletions

View File

@ -55,7 +55,15 @@ return {
"rcarriga/nvim-notify",
}
},
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},
-- ==============================
-- Функциональные плагины
-- ==============================
@ -116,4 +124,41 @@ return {
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
}
}