From c3fad7d51f50b0451d579fbc498e52917c120e02 Mon Sep 17 00:00:00 2001 From: FaultyBranches Date: Mon, 8 Jun 2026 21:03:11 -0500 Subject: [PATCH] feat: Adding in several flags for neovim's calling of luarocks to prevent the need for environment configuration to install/use tree-sitter. --- gitconfig | 2 ++ nvim/lua/custom_commands.lua | 2 +- nvim/lua/plugins/mason.lua | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gitconfig b/gitconfig index 7847182..e6e2302 100644 --- a/gitconfig +++ b/gitconfig @@ -39,3 +39,5 @@ [include] path = ~/.config/git/local + +# vim: ft=gitconfig diff --git a/nvim/lua/custom_commands.lua b/nvim/lua/custom_commands.lua index c1ead32..55f14f9 100644 --- a/nvim/lua/custom_commands.lua +++ b/nvim/lua/custom_commands.lua @@ -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) diff --git a/nvim/lua/plugins/mason.lua b/nvim/lua/plugins/mason.lua index 3935866..9ad49c9 100644 --- a/nvim/lua/plugins/mason.lua +++ b/nvim/lua/plugins/mason.lua @@ -16,7 +16,6 @@ require('mason-lspconfig').setup { 'marksman', -- markdown 'pylsp', -- Python 'rust_analyzer', -- Rust - 'ts_ls', -- Typscript 'yamlls', -- YAML } }