mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
29 lines
739 B
Lua
29 lines
739 B
Lua
vim.opt.runtimepath:append('.')
|
|
vim.cmd.runtime({ 'plugin/plenary.vim', bang = true })
|
|
vim.cmd.runtime({ 'plugin/nvim-treesitter.lua', 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',
|
|
hurl = 'hurl',
|
|
ncl = 'nickel',
|
|
tig = 'tiger',
|
|
usd = 'usd',
|
|
usda = 'usd',
|
|
wgsl = 'wgsl',
|
|
w = 'wing',
|
|
},
|
|
})
|
|
|
|
vim.o.swapfile = false
|
|
vim.bo.swapfile = false
|
|
|
|
require('nvim-treesitter').setup()
|
|
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,
|
|
})
|