✨ add markdown to treesitter + mdx files as markdown
This commit is contained in:
parent
a6def72538
commit
6e42cd67e5
9
init.lua
9
init.lua
|
@ -466,7 +466,7 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
|
||||||
vim.defer_fn(function()
|
vim.defer_fn(function()
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'go', 'lua', 'python', 'tsx', 'javascript', 'typescript', 'vimdoc', 'bash' , 'make', 'php', 'helm', 'yaml'},
|
ensure_installed = { 'go', 'lua', 'python', 'tsx', 'javascript', 'typescript', 'vimdoc', 'bash' , 'make', 'php', 'helm', 'yaml', 'markdown'},
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
@ -714,5 +714,12 @@ cmp.setup {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Add MDX support fox markdown
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
mdx = 'mdx'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
vim.treesitter.language.register('markdown', 'mdx')
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
Loading…
Reference in New Issue