dotfiles/.config/nvim/lua/my/fileformats.lua

43 lines
1.2 KiB
Lua

require('my/plugins')
packer.use {
'https://github.com/nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({ with_sync = true })
end,
config = function()
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = {'org'}
},
ensure_installed = {'org'},
}
end
}
-- org
packer.use {
'https://github.com/nvim-orgmode/orgmode',
requires = 'https://github.com/nvim-treesitter/nvim-treesitter',
config = function()
require('orgmode').setup{}
require('orgmode').setup_ts_grammar()
vim.api.nvim_create_augroup('config_fileformats', { clear = true })
vim.api.nvim_create_autocmd(
{ 'BufEnter' },
{
group = 'config_fileformats',
pattern = { '*.org' },
callback = function()
-- allow to hide stuff, like links
vim.opt_local.conceallevel = 2
vim.opt_local.concealcursor = 'nc'
end
}
)
end,
ft = 'org'
}