refactor(lua): replace vim.opt with vim.o

This commit is contained in:
Christian Clason
2026-01-27 11:51:58 +01:00
committed by Christian Clason
parent 568ede7e79
commit 0ac55b85c6
7 changed files with 7 additions and 9 deletions

View File

@@ -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

View File

@@ -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) }

View File

@@ -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')

View File

@@ -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(

View File

@@ -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 })

View File

@@ -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')

View File

@@ -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