neovim/after/ftplugin/markdown.lua

15 lines
455 B
Lua

-- Specific settings for markdown files
-- Enable the autowrite feature for all commands
-- See :h awa
vim.opt.awa=true
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'markdown' },
callback = function ()
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.wo.foldmethod = 'expr'
vim.opt.foldlevel = 1
-- indentation, provided by nvim-treesitter
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end