mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
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.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
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',
|
||||
w = 'wing',
|
||||
@@ -17,7 +15,6 @@ vim.filetype.add({
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user