fix: add laravel and switch back to standard treesitter
This commit is contained in:
+32
-15
@@ -13,8 +13,30 @@ end)
|
||||
|
||||
-- Treesitter ==================================================================
|
||||
Config.now_if_args(function()
|
||||
vim.pack.add({ "https://github.com/arborist-ts/arborist.nvim" })
|
||||
require("arborist").setup()
|
||||
vim.pack.add({
|
||||
'https://github.com/nvim-treesitter/nvim-treesitter',
|
||||
'https://github.com/nvim-treesitter/nvim-treesitter-textobjects',
|
||||
})
|
||||
|
||||
local languages = {
|
||||
'lua',
|
||||
'go',
|
||||
'php',
|
||||
'sql',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'dockerfile',
|
||||
'yaml',
|
||||
'markdown',
|
||||
}
|
||||
local isnt_installed = function(lang)
|
||||
return #vim.api.nvim_get_runtime_file('parser/' .. lang .. '.*', false) == 0
|
||||
end
|
||||
local to_install = vim.tbl_filter(isnt_installed, languages)
|
||||
if #to_install > 0 then require('nvim-treesitter').install(to_install) end
|
||||
|
||||
Config.autocmd('FileType', languages, function(ev) vim.treesitter.start(ev.buf) end, 'Start tree-sitter')
|
||||
end)
|
||||
|
||||
-- LSP =========================================================================
|
||||
@@ -81,19 +103,14 @@ function Config.setup_kulala()
|
||||
require("kulala").setup({ default_env = "dev" })
|
||||
end
|
||||
|
||||
-- CodeCompanion ===============================================================
|
||||
function Config.setup_codecompanion()
|
||||
if package.loaded["codecompanion"] then
|
||||
return
|
||||
end
|
||||
|
||||
-- Laravel =====================================================================
|
||||
Config.now_if_args(function()
|
||||
vim.pack.add({
|
||||
"https://github.com/MunifTanjim/nui.nvim",
|
||||
"https://github.com/nvim-lua/plenary.nvim",
|
||||
"https://github.com/olimorris/codecompanion.nvim"
|
||||
"https://github.com/nvim-neotest/nvim-nio",
|
||||
"https://github.com/adalessa/laravel.nvim",
|
||||
})
|
||||
require("codecompanion").setup({
|
||||
completion = {
|
||||
provider = "native"
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
require("laravel").setup({})
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user