mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
refactor(lua): replace vim.opt with vim.o
This commit is contained in:
parent
568ede7e79
commit
0ac55b85c6
7 changed files with 7 additions and 9 deletions
|
|
@ -16,7 +16,7 @@ function M.setup(user_data)
|
||||||
if user_data then
|
if user_data then
|
||||||
if user_data.install_dir then
|
if user_data.install_dir then
|
||||||
user_data.install_dir = vim.fs.normalize(user_data.install_dir)
|
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
|
end
|
||||||
config = vim.tbl_deep_extend('force', config, user_data)
|
config = vim.tbl_deep_extend('force', config, user_data)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env -S nvim -l
|
#!/usr/bin/env -S nvim -l
|
||||||
vim.opt.runtimepath:append('.')
|
vim.o.rtp = vim.o.rtp .. ',.'
|
||||||
|
|
||||||
local configs = require('nvim-treesitter.parsers')
|
local configs = require('nvim-treesitter.parsers')
|
||||||
local parsers = #_G.arg > 0 and { unpack(_G.arg) }
|
local parsers = #_G.arg > 0 and { unpack(_G.arg) }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env -S nvim -l
|
#!/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 query_types = require('nvim-treesitter.health').bundled_queries
|
||||||
local configs = require('nvim-treesitter.parsers')
|
local configs = require('nvim-treesitter.parsers')
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env -S nvim -l
|
#!/usr/bin/env -S nvim -l
|
||||||
|
vim.o.rtp = vim.o.rtp .. ',.'
|
||||||
|
|
||||||
local generate = false
|
local generate = false
|
||||||
local update = false
|
local update = false
|
||||||
|
|
@ -16,8 +17,6 @@ for i = 1, #_G.arg do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.runtimepath:append('.')
|
|
||||||
|
|
||||||
---@type async.Task
|
---@type async.Task
|
||||||
local task = update and require('nvim-treesitter').update('all', { summary = true })
|
local task = update and require('nvim-treesitter').update('all', { summary = true })
|
||||||
or require('nvim-treesitter').install(
|
or require('nvim-treesitter').install(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
vim.opt.runtimepath:append(os.getenv('PLENARY'))
|
vim.o.rtp = vim.o.rtp .. ',.,' .. os.getenv('PLENARY')
|
||||||
vim.opt.runtimepath:append('.')
|
|
||||||
vim.cmd.runtime({ 'plugin/plenary.vim', bang = true })
|
vim.cmd.runtime({ 'plugin/plenary.vim', bang = true })
|
||||||
vim.cmd.runtime({ 'plugin/query_predicates.lua', bang = true })
|
vim.cmd.runtime({ 'plugin/query_predicates.lua', bang = true })
|
||||||
vim.cmd.runtime({ 'plugin/filetypes.lua', bang = true })
|
vim.cmd.runtime({ 'plugin/filetypes.lua', bang = true })
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ for i = 1, #_G.arg do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.runtimepath:append('.')
|
vim.o.rtp = vim.o.rtp .. ',.'
|
||||||
local util = require('nvim-treesitter.util')
|
local util = require('nvim-treesitter.util')
|
||||||
local parsers = require('nvim-treesitter.parsers')
|
local parsers = require('nvim-treesitter.parsers')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env -S nvim -l
|
#!/usr/bin/env -S nvim -l
|
||||||
vim.opt.runtimepath:append('.')
|
vim.o.rtp = vim.o.rtp .. ',.'
|
||||||
local util = require('nvim-treesitter.util')
|
local util = require('nvim-treesitter.util')
|
||||||
local parsers = require('nvim-treesitter.parsers')
|
local parsers = require('nvim-treesitter.parsers')
|
||||||
local tiers = require('nvim-treesitter.config').tiers
|
local tiers = require('nvim-treesitter.config').tiers
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue