feat: Adding in several flags for neovim's calling of luarocks to

prevent the need for environment configuration to install/use
tree-sitter.
This commit is contained in:
2026-06-08 21:03:11 -05:00
parent 02d8fff47e
commit c3fad7d51f
3 changed files with 3 additions and 2 deletions

View File

@@ -39,3 +39,5 @@
[include]
path = ~/.config/git/local
# vim: ft=gitconfig

View File

@@ -10,7 +10,7 @@ end, { nargs = '*' })
vim.api.nvim_create_user_command('TreeSitterInstall', function(opts)
for index, value in ipairs(opts.fargs) do
if index > 0 then
local result = vim.system({ 'luarocks', 'install', 'tree-sitter-' .. value }, { text = true }):wait()
local result = vim.system({ 'luarocks', '--local', '--lua-version', '5.1', 'install', 'tree-sitter-' .. value }, { text = true }):wait()
if result.code == 0 then
print('Completed install of tree-sitter-' .. value)

View File

@@ -16,7 +16,6 @@ require('mason-lspconfig').setup {
'marksman', -- markdown
'pylsp', -- Python
'rust_analyzer', -- Rust
'ts_ls', -- Typscript
'yamlls', -- YAML
}
}