feat: MDX for nvchad

laptop
Elias Almqvist 8 months ago
parent a4aadb6a80
commit 7b1fabb242
No known key found for this signature in database
GPG Key ID: E31A99CE3E75A158
  1. 5
      nvchad/.config/nvim/lua/custom/init.lua
  2. 15
      nvchad/.config/nvim/lua/custom/plugins.lua

@ -5,3 +5,8 @@
-- pattern = "*", -- pattern = "*",
-- command = "tabdo wincmd =", -- command = "tabdo wincmd =",
-- }) -- })
vim.filetype.add({
extension = {
mdx = 'mdx'
}
})

@ -52,12 +52,12 @@ local plugins = {
lazy = false, lazy = false,
config = function() config = function()
-- Mapping tab is already used by NvChad -- Mapping tab is already used by NvChad
vim.g.copilot_no_tab_map = true; vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true; vim.g.copilot_assume_mapped = true
vim.g.copilot_tab_fallback = ""; vim.g.copilot_tab_fallback = ""
-- The mapping is set to other key, see custom/lua/mappings -- The mapping is set to other key, see custom/lua/mappings
-- or run <leader>ch to see copilot mapping section -- or run <leader>ch to see copilot mapping section
end end,
}, },
{ {
@ -66,6 +66,13 @@ local plugins = {
"JoosepAlviste/nvim-ts-context-commentstring", "JoosepAlviste/nvim-ts-context-commentstring",
}, },
opts = overrides.treesitter, opts = overrides.treesitter,
config = function(_, opts)
dofile(vim.g.base46_cache .. "syntax")
require("nvim-treesitter.configs").setup(opts)
-- use markdown parser for mdx files
vim.treesitter.language.register("mdx", "markdown", "tsx")
end,
}, },
{ {

Loading…
Cancel
Save