You've already forked dotfiles
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:
@@ -39,3 +39,5 @@
|
|||||||
|
|
||||||
[include]
|
[include]
|
||||||
path = ~/.config/git/local
|
path = ~/.config/git/local
|
||||||
|
|
||||||
|
# vim: ft=gitconfig
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ end, { nargs = '*' })
|
|||||||
vim.api.nvim_create_user_command('TreeSitterInstall', function(opts)
|
vim.api.nvim_create_user_command('TreeSitterInstall', function(opts)
|
||||||
for index, value in ipairs(opts.fargs) do
|
for index, value in ipairs(opts.fargs) do
|
||||||
if index > 0 then
|
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
|
if result.code == 0 then
|
||||||
print('Completed install of tree-sitter-' .. value)
|
print('Completed install of tree-sitter-' .. value)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ require('mason-lspconfig').setup {
|
|||||||
'marksman', -- markdown
|
'marksman', -- markdown
|
||||||
'pylsp', -- Python
|
'pylsp', -- Python
|
||||||
'rust_analyzer', -- Rust
|
'rust_analyzer', -- Rust
|
||||||
'ts_ls', -- Typscript
|
|
||||||
'yamlls', -- YAML
|
'yamlls', -- YAML
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user