[Nvim] fix render-markdown
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
require("render-markdown").setup {
|
||||
return {
|
||||
-- Whether markdown should be rendered by default.
|
||||
enabled = true,
|
||||
-- Vim modes that will show a rendered view of the markdown file, :h mode(), for all enabled
|
||||
|
||||
@@ -6,22 +6,20 @@ local map = vim.keymap.set
|
||||
|
||||
-- map("n", ";", ":", { desc = "cmd enter command mode" })
|
||||
|
||||
local builtin = require "telescope.builtin"
|
||||
|
||||
map("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
map("n", "gD", builtin.lsp_definitions, { desc = "Go to Definitions" })
|
||||
map("n", "grr", builtin.lsp_references, { desc = "Go to references" })
|
||||
map("n", "gD", "<cmd>Telescope lsp_definitions<CR>", { desc = "Go to Definitions" })
|
||||
map("n", "grr", "<cmd>Telescope lsp_references<CR>", { desc = "Go to references" })
|
||||
map("n", "<leader>dh", ":lua vim.diagnostic.open_float()<cr>", { desc = "Show diagnostics" })
|
||||
map("n", "<leader>dj", ":lua vim.diagnostic.goto_next()<cr>", { desc = "Go to next" })
|
||||
map("n", "<leader>dk", ":lua vim.diagnostic.goto_prev()<cr>", { desc = "Go to previous" })
|
||||
map("n", "<leader>da", ":lua vim.lsp.buf.code_action()<cr>", { desc = "Code actions", noremap = true, silent = true })
|
||||
-- Telescope
|
||||
map("n", "<leader>fr", ":Telescope resume<CR>", { desc = "Resume last search" })
|
||||
map("n", "<leader>fs", ":Telescope grep_string<CR>", { desc = "Find selected string" })
|
||||
map("n", "<leader>fk", ":Telescope keymaps<CR>", { desc = "Find keymaps" })
|
||||
map("n", "<leader>fd", ":Telescope diagnostics<CR>", { desc = "Diagnostics" })
|
||||
map("n", "<leader>fr", "<cmd>Telescope resume<CR>", { desc = "Resume last search" })
|
||||
map("n", "<leader>fs", "<cmd>Telescope grep_string<CR>", { desc = "Find selected string" })
|
||||
map("n", "<leader>fk", "<cmd>Telescope keymaps<CR>", { desc = "Find keymaps" })
|
||||
map("n", "<leader>fd", "<cmd>Telescope diagnostics<CR>", { desc = "Diagnostics" })
|
||||
|
||||
map({ "n", "v" }, "<leader>ge", "<cmd>:Gen<cr>", { desc = "Gen.nvim" })
|
||||
map({ "n", "v" }, "<leader>ge", "<cmd>Gen<CR>", { desc = "Gen.nvim" })
|
||||
|
||||
-- P paste with
|
||||
-- global marks
|
||||
|
||||
@@ -15,10 +15,10 @@ return {
|
||||
-- Custom Parameters (with defaults)
|
||||
{
|
||||
"David-Kunz/gen.nvim",
|
||||
cmd = "Gen",
|
||||
opts = {
|
||||
-- model = "llama3.2:3b", -- The default model to use.
|
||||
model = "qwen3-coder:30b",
|
||||
-- host = "192.168.0.17",
|
||||
quit_map = "q", -- set keymap to close the response window
|
||||
retry_map = "<c-r>", -- set keymap to re-send the current prompt
|
||||
accept_map = "<c-cr>", -- set keymap to replace the previous selection with the last result
|
||||
@@ -31,9 +31,6 @@ return {
|
||||
no_auto_close = false, -- Never closes the window automatically.
|
||||
file = false, -- Write the payload to a temporary file to keep the command short.
|
||||
hidden = false, -- Hide the generation window (if true, will implicitly set `prompt.replace = true`), requires Neovim >= 0.10
|
||||
init = function()
|
||||
pcall(io.popen, "ollama serve > /dev/null 2>&1 &")
|
||||
end,
|
||||
-- Function to initialize Ollama
|
||||
command = function(options)
|
||||
local body = { model = options.model, stream = true }
|
||||
@@ -54,7 +51,10 @@ return {
|
||||
},
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {},
|
||||
ft = { "markdown", "gitcommit" },
|
||||
opts = function()
|
||||
return require "configs.render-markdown"
|
||||
end,
|
||||
},
|
||||
|
||||
-- {
|
||||
|
||||
Reference in New Issue
Block a user