@ -0,0 +1,55 @@ | |||
return { | |||
"yetone/avante.nvim", | |||
event = "VeryLazy", | |||
version = false, | |||
keys = { | |||
"<leader>A", | |||
"<cmd>AvanteToggle<cr>" | |||
}, | |||
opts = { | |||
behaviour = { | |||
auto_suggestions = false, -- Experimental stage | |||
auto_set_highlight_group = true, | |||
auto_set_keymaps = false, | |||
auto_apply_diff_after_generation = false, | |||
support_paste_from_clipboard = false, | |||
minimize_diff = true, -- Whether to remove unchanged lines when applying a code block | |||
enable_token_counting = true, -- Whether to enable token counting. Default to true. | |||
}, | |||
}, | |||
build = "make", | |||
dependencies = { | |||
"nvim-treesitter/nvim-treesitter", | |||
"stevearc/dressing.nvim", | |||
"nvim-lua/plenary.nvim", | |||
"MunifTanjim/nui.nvim", | |||
"echasnovski/mini.pick", | |||
"nvim-telescope/telescope.nvim", | |||
"nvim-tree/nvim-web-devicons", | |||
{ | |||
-- support for image pasting | |||
"HakonHarnes/img-clip.nvim", | |||
event = "VeryLazy", | |||
opts = { | |||
-- recommended settings | |||
default = { | |||
embed_image_as_base64 = false, | |||
prompt_for_file_name = false, | |||
drag_and_drop = { | |||
insert_mode = true, | |||
}, | |||
-- required for Windows users | |||
use_absolute_path = true, | |||
}, | |||
}, | |||
}, | |||
{ | |||
-- Make sure to set this up properly if you have lazy=true | |||
'MeanderingProgrammer/render-markdown.nvim', | |||
opts = { | |||
file_types = { "markdown", "Avante" }, | |||
}, | |||
ft = { "markdown", "Avante" }, | |||
}, | |||
}, | |||
} |
@ -1,16 +0,0 @@ | |||
return { | |||
"laytan/cloak.nvim", | |||
event = { "BufReadPre", "BufNewFile" }, | |||
config = function() | |||
require("cloak").setup({ | |||
enabled = true, | |||
patterns = { | |||
{ | |||
file_pattern = ".env*", | |||
cloak_pattern = "=.+", | |||
replace = "*", | |||
}, | |||
}, | |||
}) | |||
end, | |||
} |
@ -1,40 +1,53 @@ | |||
return { | |||
"stevearc/conform.nvim", | |||
event = { "BufReadPre", "BufNewFile" }, | |||
config = function() | |||
local conform = require("conform") | |||
"stevearc/conform.nvim", | |||
event = { "BufReadPre", "BufNewFile" }, | |||
config = function() | |||
local conform = require("conform") | |||
conform.setup({ | |||
formatters_by_ft = { | |||
lua = { "stylua" }, | |||
go = { "goimports", "gofmt" }, | |||
javascript = { "prettierd" }, | |||
typescript = { "prettierd" }, | |||
vue = { "prettierd" }, | |||
css = { "prettierd" }, | |||
html = { "prettierd" }, | |||
markdown = { "prettierd" }, | |||
json = { "fixjson" }, | |||
rust = { "rustfmt" }, | |||
shell = { "shfmt", "shellcheck" }, | |||
python = { "isort", "black" }, | |||
php = { "phpcbf" }, | |||
conform.setup({ | |||
formatters_by_ft = { | |||
lua = { "stylua" }, | |||
go = { "goimports", "gofmt" }, | |||
javascript = { "prettierd" }, | |||
typescript = { "prettierd" }, | |||
vue = { "prettierd" }, | |||
css = { "prettierd" }, | |||
html = { "prettierd" }, | |||
markdown = { "prettierd" }, | |||
json = { "fixjson" }, | |||
rust = { "rustfmt" }, | |||
shell = { "shfmt", "shellcheck" }, | |||
python = { "isort", "black" }, | |||
php = { "phpcbf", "php_cs_fixer" }, | |||
blade = { "blade-formatter" } | |||
}, | |||
log_level = vim.log.levels.WARN, | |||
notify_on_error = false, | |||
}) | |||
}, | |||
log_level = vim.log.levels.WARN, | |||
notify_on_error = false, | |||
}) | |||
vim.keymap.set({ "n", "v" }, "<leader>F", function() | |||
conform.format({ | |||
lsp_fallback = true, | |||
async = false, | |||
timeout_ms = 500, | |||
}) | |||
end) | |||
vim.keymap.set({ "n", "v" }, "<leader>F", function() | |||
conform.format({ | |||
lsp_fallback = true, | |||
async = false, | |||
timeout_ms = 500, | |||
}) | |||
end) | |||
conform.formatters.phpcbf = { | |||
prepend_args = { "--standard=~/.config/phpcs.xml" }, | |||
} | |||
end, | |||
vim.fn.mkdir(vim.fn.expand("~/.cache/php-cs-fixer"), "p") | |||
conform.formatters.php_cs_fixer = { | |||
prepend_args = { | |||
"--config=" .. vim.fn.expand("~/.config/php-cs-fixer.php"), | |||
"--cache-file=" .. vim.fn.expand("~/.cache/php-cs-fixer/cache"), | |||
}, | |||
env = { | |||
PHP_CS_FIXER_IGNORE_ENV = "1", | |||
}, | |||
} | |||
conform.formatters.phpcbf = { | |||
prepend_args = { "--standard=~/.config/phpcs.xml" }, | |||
} | |||
end, | |||
} |
@ -0,0 +1,22 @@ | |||
return { | |||
"harrisoncramer/gitlab.nvim", | |||
dependencies = { | |||
"MunifTanjim/nui.nvim", | |||
"nvim-lua/plenary.nvim", | |||
"sindrets/diffview.nvim", | |||
"stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers. | |||
"nvim-tree/nvim-web-devicons", -- Recommended but not required. Icons in discussion tree. | |||
}, | |||
build = function() require("gitlab.server").build(true) end, -- Builds the Go binary | |||
config = function() | |||
require("gitlab").setup() | |||
vim.api.nvim_create_user_command("GChoose", function() | |||
require("gitlab").choose_merge_request() | |||
end, { desc = "Choose a GitLab merge request" }) | |||
vim.api.nvim_create_user_command("GReview", function() | |||
require("gitlab").review() | |||
end, { desc = "Start GitLab review" }) | |||
end, | |||
} |
@ -0,0 +1,20 @@ | |||
<?php | |||
return (new PhpCsFixer\Config()) | |||
->setRules([ | |||
'@PSR12' => true, | |||
'ordered_imports' => [ | |||
'sort_algorithm' => 'alpha', | |||
'imports_order' => ['class', 'function', 'const'], | |||
], | |||
'no_unused_imports' => true, | |||
'global_namespace_import' => [ | |||
'import_classes' => true, | |||
'import_constants' => true, | |||
'import_functions' => true, | |||
], | |||
]) | |||
->setFinder( | |||
PhpCsFixer\Finder::create() | |||
->in(__DIR__) | |||
); |