mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
refactor(lua): replace vim.opt with vim.o
This commit is contained in:
committed by
Christian Clason
parent
568ede7e79
commit
0ac55b85c6
@@ -16,7 +16,7 @@ function M.setup(user_data)
|
||||
if user_data then
|
||||
if user_data.install_dir then
|
||||
user_data.install_dir = vim.fs.normalize(user_data.install_dir)
|
||||
vim.opt.runtimepath:prepend(user_data.install_dir)
|
||||
vim.o.rtp = user_data.install_dir .. ',' .. vim.o.rtp
|
||||
end
|
||||
config = vim.tbl_deep_extend('force', config, user_data)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env -S nvim -l
|
||||
vim.opt.runtimepath:append('.')
|
||||
vim.o.rtp = vim.o.rtp .. ',.'
|
||||
|
||||
local configs = require('nvim-treesitter.parsers')
|
||||
local parsers = #_G.arg > 0 and { unpack(_G.arg) }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env -S nvim -l
|
||||
vim.opt.runtimepath:append('.')
|
||||
vim.o.rtp = vim.o.rtp .. ',.'
|
||||
|
||||
local query_types = require('nvim-treesitter.health').bundled_queries
|
||||
local configs = require('nvim-treesitter.parsers')
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env -S nvim -l
|
||||
vim.o.rtp = vim.o.rtp .. ',.'
|
||||
|
||||
local generate = false
|
||||
local update = false
|
||||
@@ -16,8 +17,6 @@ for i = 1, #_G.arg do
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.runtimepath:append('.')
|
||||
|
||||
---@type async.Task
|
||||
local task = update and require('nvim-treesitter').update('all', { summary = true })
|
||||
or require('nvim-treesitter').install(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
vim.opt.runtimepath:append(os.getenv('PLENARY'))
|
||||
vim.opt.runtimepath:append('.')
|
||||
vim.o.rtp = vim.o.rtp .. ',.,' .. os.getenv('PLENARY')
|
||||
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 })
|
||||
|
||||
@@ -13,7 +13,7 @@ for i = 1, #_G.arg do
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.runtimepath:append('.')
|
||||
vim.o.rtp = vim.o.rtp .. ',.'
|
||||
local util = require('nvim-treesitter.util')
|
||||
local parsers = require('nvim-treesitter.parsers')
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env -S nvim -l
|
||||
vim.opt.runtimepath:append('.')
|
||||
vim.o.rtp = vim.o.rtp .. ',.'
|
||||
local util = require('nvim-treesitter.util')
|
||||
local parsers = require('nvim-treesitter.parsers')
|
||||
local tiers = require('nvim-treesitter.config').tiers
|
||||
|
||||
Reference in New Issue
Block a user