refactor: lua config
This commit is contained in:
@@ -2,23 +2,23 @@ local util = require("conform.util")
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = function()
|
||||
---@class ConformOpts
|
||||
---@type conform.setupOpts
|
||||
local opts = {
|
||||
-- LazyVim will use these options when formatting with the conform.nvim formatter
|
||||
format = {
|
||||
default_format_opts = {
|
||||
timeout_ms = 3000,
|
||||
async = false, -- not recommended to change
|
||||
quiet = false, -- not recommended to change
|
||||
lsp_format = "fallback", -- not recommended to change
|
||||
},
|
||||
---@type table<string, conform.FormatterUnit[]>
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
fish = { "fish_indent" },
|
||||
sh = { "shfmt" },
|
||||
php = { "pint" },
|
||||
blade = { "blade-formatter", "rustywind" },
|
||||
-- python = { "black" },
|
||||
python = { "black" },
|
||||
javascript = { "prettierd" },
|
||||
-- rust = { "rustfmt" },
|
||||
},
|
||||
-- LazyVim will merge the options you set here with builtin formatters.
|
||||
-- You can also define any custom formatters here.
|
||||
|
||||
@@ -13,12 +13,12 @@ return {
|
||||
-- { "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load everforest
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "everforest",
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "LazyVim/LazyVim",
|
||||
-- opts = {
|
||||
-- colorscheme = "everforest",
|
||||
-- },
|
||||
-- },
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
return {
|
||||
"adalessa/laravel.nvim",
|
||||
dependencies = {
|
||||
"rcarriga/nvim-notify",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
cmd = { "Sail", "Artisan", "Composer", "Npm", "Laravel", "LaravelInfo", "DockerCompose" },
|
||||
keys = {
|
||||
{ "<leader>la", ":Laravel artisan<cr>", desc = "Laravel Application Commands" },
|
||||
{ "<leader>lr", ":Laravel routes<cr>", desc = "Laravel Application Routes" },
|
||||
{
|
||||
"<leader>lt",
|
||||
function()
|
||||
require("laravel.tinker").send_to_tinker()
|
||||
end,
|
||||
mode = "v",
|
||||
desc = "Laravel Application Routes",
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.g.laravel_log_level = "debug"
|
||||
end,
|
||||
config = function()
|
||||
local uid = vim.system({ "id", "-u" }, { text = true }):wait().stdout or "1000"
|
||||
local gid = vim.system({ "id", "-g" }, { text = true }):wait().stdout or "1000"
|
||||
|
||||
local user_arg = string.format("%s:%s", vim.trim(uid), vim.trim(gid))
|
||||
|
||||
require("laravel").setup({
|
||||
route_info = {
|
||||
position = "top",
|
||||
},
|
||||
environment = {
|
||||
environments = {
|
||||
["ao"] = require("laravel.environment.docker_compose").setup({
|
||||
container_name = "panel-webserver",
|
||||
cmd = { "docker", "compose", "exec", "-u", user_arg, "-it", "panel-webserver" },
|
||||
}),
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("laravel")
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user