100 lines
2.6 KiB
Lua
100 lines
2.6 KiB
Lua
-- Colortheme ==================================================================
|
|
Config.now(function()
|
|
vim.pack.add({ "https://github.com/rebelot/kanagawa.nvim" })
|
|
require("kanagawa").setup({ compile = true })
|
|
vim.cmd("colo kanagawa")
|
|
end)
|
|
|
|
-- Mason ====================================================================
|
|
Config.now_if_args(function()
|
|
vim.pack.add({ "https://github.com/mason-org/mason.nvim" })
|
|
require("mason").setup()
|
|
end)
|
|
|
|
-- Treesitter ==================================================================
|
|
Config.now_if_args(function()
|
|
vim.pack.add({ "https://github.com/arborist-ts/arborist.nvim" })
|
|
require("arborist").setup()
|
|
end)
|
|
|
|
-- LSP =========================================================================
|
|
Config.now_if_args(function()
|
|
vim.pack.add({ "https://github.com/neovim/nvim-lspconfig" })
|
|
|
|
vim.lsp.enable({
|
|
"ansiblels",
|
|
"gopls",
|
|
"intelephense",
|
|
"lua_ls",
|
|
"tailwindcss",
|
|
"vtsls",
|
|
})
|
|
end)
|
|
|
|
-- Conform =====================================================================
|
|
Config.now_if_args(function()
|
|
vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
|
|
|
|
require("conform").setup({
|
|
default_format_opts = { lsp_format = "fallback" },
|
|
format_on_save = {
|
|
lsp_format = "fallback",
|
|
timeout_ms = 500,
|
|
},
|
|
formatters_by_ft = {
|
|
go = { "gofumpt", "goimports" },
|
|
php = { "php_cs_fixer" },
|
|
},
|
|
})
|
|
end)
|
|
|
|
-- DAP =========================================================================
|
|
function Config.setup_dap()
|
|
if package.loaded["dap"] then
|
|
return
|
|
end
|
|
|
|
vim.pack.add({ "https://github.com/mfussenegger/nvim-dap" })
|
|
|
|
local dap = require("dap")
|
|
|
|
dap.adapters.php = {
|
|
type = "executable",
|
|
command = "node",
|
|
args = { vim.fn.stdpath("data") .. "/mason/packages/php-debug-adapter/extension/out/phpDebug.js" },
|
|
}
|
|
|
|
dap.adapters.go = {
|
|
type = "server",
|
|
host = "127.0.0.1",
|
|
port = "${port}",
|
|
}
|
|
end
|
|
|
|
-- Kulala ======================================================================
|
|
function Config.setup_kulala()
|
|
if package.loaded["kulala"] then
|
|
return
|
|
end
|
|
|
|
vim.pack.add({ "https://github.com/mistweaverco/kulala.nvim" })
|
|
require("kulala").setup({ default_env = "dev" })
|
|
end
|
|
|
|
-- CodeCompanion ===============================================================
|
|
function Config.setup_codecompanion()
|
|
if package.loaded["codecompanion"] then
|
|
return
|
|
end
|
|
|
|
vim.pack.add({
|
|
"https://github.com/nvim-lua/plenary.nvim",
|
|
"https://github.com/olimorris/codecompanion.nvim"
|
|
})
|
|
require("codecompanion").setup({
|
|
completion = {
|
|
provider = "native"
|
|
}
|
|
})
|
|
end
|