fix: add laravel and switch back to standard treesitter
This commit is contained in:
+23
-11
@@ -1,33 +1,45 @@
|
|||||||
{
|
{
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"arborist.nvim": {
|
|
||||||
"rev": "fdeef56c2840c6772b9f68c5774ed87e9340ec7d",
|
|
||||||
"src": "https://github.com/arborist-ts/arborist.nvim"
|
|
||||||
},
|
|
||||||
"codecompanion.nvim": {
|
|
||||||
"rev": "635f001598d811c6ea256bc863b3d503c3a88d43",
|
|
||||||
"src": "https://github.com/olimorris/codecompanion.nvim"
|
|
||||||
},
|
|
||||||
"conform.nvim": {
|
"conform.nvim": {
|
||||||
"rev": "619363c30309d29ffa631e67c8183f2a72caa373",
|
"rev": "016802de402556da54c36bd7359b441266b01cdd",
|
||||||
"src": "https://github.com/stevearc/conform.nvim"
|
"src": "https://github.com/stevearc/conform.nvim"
|
||||||
},
|
},
|
||||||
"kanagawa.nvim": {
|
"kanagawa.nvim": {
|
||||||
"rev": "bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3",
|
"rev": "bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3",
|
||||||
"src": "https://github.com/rebelot/kanagawa.nvim"
|
"src": "https://github.com/rebelot/kanagawa.nvim"
|
||||||
},
|
},
|
||||||
|
"laravel.nvim": {
|
||||||
|
"rev": "c0b171c8f9f0b5914f12b197711b93aa2c4047d3",
|
||||||
|
"src": "https://github.com/adalessa/laravel.nvim"
|
||||||
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
|
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
|
||||||
"src": "https://github.com/mason-org/mason.nvim"
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
},
|
},
|
||||||
"mini.nvim": {
|
"mini.nvim": {
|
||||||
"rev": "c594be5b095204e99473825ec2dee872e7409a4d",
|
"rev": "e58ad4b0c9e9376096b9704f98fc00d4c9448870",
|
||||||
"src": "https://github.com/nvim-mini/mini.nvim"
|
"src": "https://github.com/nvim-mini/mini.nvim"
|
||||||
},
|
},
|
||||||
|
"nui.nvim": {
|
||||||
|
"rev": "a25dd472316d806eb38a5dd667c2e40da5570c75",
|
||||||
|
"src": "https://github.com/MunifTanjim/nui.nvim"
|
||||||
|
},
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e",
|
"rev": "0662886bc0a4e0c199dec65cee23a4319dd79f55",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
|
"nvim-nio": {
|
||||||
|
"rev": "edcc181a875301dd21840189aa2f2f9ad69fc172",
|
||||||
|
"src": "https://github.com/nvim-neotest/nvim-nio"
|
||||||
|
},
|
||||||
|
"nvim-treesitter": {
|
||||||
|
"rev": "074aa4422bf029908338e855d0c0f71470a971bb",
|
||||||
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
"nvim-treesitter-textobjects": {
|
||||||
|
"rev": "898ee307df58f854d11cd7edd06472574d48014e",
|
||||||
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
|
||||||
|
},
|
||||||
"plenary.nvim": {
|
"plenary.nvim": {
|
||||||
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
||||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||||
|
|||||||
@@ -29,10 +29,6 @@ local function lazy_setup(name, action)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- AI =====================================================================
|
|
||||||
nmap_leader("aa", lazy_setup("codecompanion", function() require("codecompanion").toggle_chat() end),
|
|
||||||
"Open CodeCompanion")
|
|
||||||
|
|
||||||
-- Buffers =====================================================================
|
-- Buffers =====================================================================
|
||||||
nmap_leader("bd", function() vim.cmd("bd") end, "Delete")
|
nmap_leader("bd", function() vim.cmd("bd") end, "Delete")
|
||||||
nmap_leader("bD", function() vim.cmd("bd!") end, "Delete!")
|
nmap_leader("bD", function() vim.cmd("bd!") end, "Delete!")
|
||||||
|
|||||||
+32
-15
@@ -13,8 +13,30 @@ end)
|
|||||||
|
|
||||||
-- Treesitter ==================================================================
|
-- Treesitter ==================================================================
|
||||||
Config.now_if_args(function()
|
Config.now_if_args(function()
|
||||||
vim.pack.add({ "https://github.com/arborist-ts/arborist.nvim" })
|
vim.pack.add({
|
||||||
require("arborist").setup()
|
'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)
|
end)
|
||||||
|
|
||||||
-- LSP =========================================================================
|
-- LSP =========================================================================
|
||||||
@@ -81,19 +103,14 @@ function Config.setup_kulala()
|
|||||||
require("kulala").setup({ default_env = "dev" })
|
require("kulala").setup({ default_env = "dev" })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- CodeCompanion ===============================================================
|
-- Laravel =====================================================================
|
||||||
function Config.setup_codecompanion()
|
Config.now_if_args(function()
|
||||||
if package.loaded["codecompanion"] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
|
"https://github.com/MunifTanjim/nui.nvim",
|
||||||
"https://github.com/nvim-lua/plenary.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 = {
|
require("laravel").setup({})
|
||||||
provider = "native"
|
end)
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|||||||
Reference in New Issue
Block a user