feat(working): first working condition

This commit is contained in:
darwincereska
2025-11-19 08:59:51 -05:00
parent 5a5c81eb60
commit c86f52f5fb
31 changed files with 789 additions and 283 deletions

View File

@@ -6,15 +6,81 @@ return {
"nvim-mini/mini.nvim",
},
config = function()
require("config.plugin.render-markdown")
require("render-markdown").setup({
completions = { lsp = { enabled = true } },
heading = {
enabled = true,
sign = false,
icons = { "󰲡 ", "󰲣 ", "󰲥 ", "󰲧 ", "󰲩 ", "󰲫 " },
signs = { ""},
left_pad = 0,
right_pad = 0,
width = "full",
min_width = 0,
border = true,
border_virtual = true,
above = "",
below = "",
},
code = {
enabled = true,
sign = true,
style = "full",
position = "left",
language_pad = 2,
disable_background = { "diff" },
width = "full",
left_pad = 0,
right_pad = 0,
min_width = 0,
border = "thin",
above = "",
below = "",
highlight = "RenderMarkdownCode",
highlight_inline = "RenderMarkdownCodeInline",
},
win_options = {
conceallevel = {
default = vim.o.conceallevel,
rendered = 3,
},
concealcursor = {
default = vim.o.concealcursor,
rendered = "n",
},
},
})
-- Fix tab behavior in markdown files
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.opt_local.spell = true
vim.opt_local.spelllang = "en_us"
-- Override tab mapping in markdown files
vim.keymap.set("i", "<Tab>", function()
-- Check if we're in a code block
local line = vim.api.nvim_get_current_line()
local col = vim.api.nvim_win_get_cursor(0)[2]
-- If we're at the beginning of a line or after whitespace, insert tab
if col == 0 or line:sub(1, col):match("^%s*$") then
return "<Tab>"
else
-- Otherwise, let completion handle it if available
if vim.fn.pumvisible() == 1 then
return "<C-n>"
else
return "<Tab>"
end
end
end, { expr = true, buffer = true })
end,
})
end,
},
{