Files
nvim-treesitter/scripts/minimal_init.lua
Christian Clason 522e0c6991 feat(setup)!: remove ensure_install field
Instead, call `require('nvim-treesitter').install( { ... } )` manually.

This gives users full control over how they want to install parsers
(sync, from grammar, limited concurrency) and obviates the need for
calling `setup` for most users.
2025-05-12 18:43:40 +02:00

24 lines
568 B
Lua

vim.opt.runtimepath:append('.')
vim.cmd.runtime({ 'plugin/plenary.vim', bang = true })
vim.cmd.runtime({ 'plugin/query_predicates.lua', bang = true })
vim.cmd.runtime({ 'plugin/filetypes.lua', bang = true })
vim.filetype.add({
extension = {
conf = 'hocon',
ncl = 'nickel',
tig = 'tiger',
w = 'wing',
},
})
vim.o.swapfile = false
vim.bo.swapfile = false
vim.api.nvim_create_autocmd('FileType', {
callback = function(args)
pcall(vim.treesitter.start)
vim.bo[args.buf].indentexpr = 'v:lua.require"nvim-treesitter".indentexpr()'
end,
})