diff --git a/lsp/lua_ls.lua b/lsp/lua_ls.lua index 55b8021..4e00e60 100644 --- a/lsp/lua_ls.lua +++ b/lsp/lua_ls.lua @@ -26,15 +26,15 @@ return { }, -- Load types from Neovim runtime and installed plugins - workspace = { - library = { - vim.env.VIMRUNTIME, - "${3rd}/luv/library", - -- Add lazy.nvim plugin directories - vim.fn.stdpath('data') .. '/lazy', - }, - checkThirdParty = false, - }, + -- workspace = { + -- library = { + -- vim.env.VIMRUNTIME, + -- "${3rd}/luv/library", + -- -- Add lazy.nvim plugin directories + -- vim.fn.stdpath('data') .. '/lazy', + -- }, + -- checkThirdParty = false, + -- }, }, }, } diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua index 488049b..d845a69 100644 --- a/lua/plugins/catpuccin.lua +++ b/lua/plugins/catpuccin.lua @@ -20,7 +20,7 @@ return { custom_highlights = function(colors) return { - RenderMarkdownCode = { bg = colors.mantle }, + -- RenderMarkdownCode = { bg = colors.surface0 }, -- NeoTreeNormal = { bg = colors.none }, MiniStatuslineFilename = { fg = colors.text, bg = trans and colors.none or colors.mantle }, diff --git a/lua/plugins/claudecode.lua b/lua/plugins/claudecode.lua index 88d22da..fdb6ceb 100644 --- a/lua/plugins/claudecode.lua +++ b/lua/plugins/claudecode.lua @@ -3,6 +3,7 @@ return { 'coder/claudecode.nvim', dependencies = { 'folke/snacks.nvim' }, lazy = false, + --- @module 'claudecode' --- @type PartialClaudeCodeConfig opts = { -- Server Configuration diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index 48ef8cd..b6068b7 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -46,5 +46,17 @@ return { -- Enable Treesitter based indentation vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + + -- Auto-attach treesitter to all buffers + local augroup = vim.api.nvim_create_augroup('TreesitterAutoAttach', { clear = true }) + vim.api.nvim_create_autocmd({ 'FileType', 'BufEnter' }, { + group = augroup, + callback = function(args) + local buf = args.buf + if vim.bo[buf].buftype == '' then + pcall(vim.treesitter.start, buf) + end + end, + }) end, } diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua new file mode 100644 index 0000000..251ce99 --- /dev/null +++ b/lua/plugins/render-markdown.lua @@ -0,0 +1,22 @@ +--- @type LazySpec +return { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, + ft = { 'markdown' }, + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = { + anti_conceal = { + enabled = false, + }, + }, + config = function(_, opts) + require('render-markdown').setup(opts) + + -- Optional: Toggle markdown rendering on/off + vim.keymap.set('n', 'mr', 'RenderMarkdown toggle', { desc = '[M]arkdown [R]ender toggle' }) + end, + keys = { + { 'mr', 'RenderMarkdown toggle', desc = '[M]arkdown [R]ender toggle' }, + }, +}