diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-01-31 09:44:13 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-01-31 09:44:13 +0100 |
| commit | 669561e21073e6efafddda25ba3ace69fb43819e (patch) | |
| tree | f94ebd60ad4cab480b5cbcb7e65dd2060696c339 /lua/plugins | |
| parent | 5044c70e9f62cdd06ee91e754423b07c1c18c12d (diff) | |
| download | nvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.tar.gz nvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.zip | |
feat: apply stylua
Diffstat (limited to 'lua/plugins')
34 files changed, 825 insertions, 796 deletions
diff --git a/lua/plugins/autopairs.lua b/lua/plugins/autopairs.lua index 1955629..245059f 100644 --- a/lua/plugins/autopairs.lua +++ b/lua/plugins/autopairs.lua @@ -1,5 +1,5 @@ return { - "windwp/nvim-autopairs", - lazy = true, - config = true, + "windwp/nvim-autopairs", + lazy = true, + config = true, } diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index cbe836f..ca323b8 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,11 +1,11 @@ return { - "folke/tokyonight.nvim", - lazy = false, - priority=1000, - config = function() - require("tokyonight").setup({ - style = "night" - }) - vim.cmd.colorscheme("tokyonight") - end + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + config = function() + require("tokyonight").setup { + style = "night", + } + vim.cmd.colorscheme "tokyonight" + end, } diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index fd55eff..84de2ba 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -1,5 +1,5 @@ return { - "numToStr/Comment.nvim", - keys = { { "gcc" }, { "gbc" }, { "gc", mode = "v" }, { "gb", mode = "v" } }, - config = true + "numToStr/Comment.nvim", + keys = { { "gcc" }, { "gbc" }, { "gc", mode = "v" }, { "gb", mode = "v" } }, + config = true, } diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua index 77a092d..41abc02 100644 --- a/lua/plugins/completition.lua +++ b/lua/plugins/completition.lua @@ -1,20 +1,20 @@ return { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-nvim-lua", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-cmdline", - "hrsh7th/cmp-git", - "saadparwaiz1/cmp_luasnip", - "onsails/lspkind-nvim", - { "L3MON4D3/LuaSnip", version = "v1.*" }, - "windwp/nvim-autopairs", - "hrsh7th/cmp-nvim-lsp-signature-help", - }, - event = "VeryLazy", - config = function () - require("alpha.completition") - end + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-git", + "saadparwaiz1/cmp_luasnip", + "onsails/lspkind-nvim", + { "L3MON4D3/LuaSnip", version = "v1.*" }, + "windwp/nvim-autopairs", + "hrsh7th/cmp-nvim-lsp-signature-help", + }, + event = "VeryLazy", + config = function() + require "alpha.completition" + end, } diff --git a/lua/plugins/composer.lua b/lua/plugins/composer.lua index 4f975c1..f46406c 100644 --- a/lua/plugins/composer.lua +++ b/lua/plugins/composer.lua @@ -1,4 +1,4 @@ return { - "adalessa/composer.nvim", - lazy = true, + "adalessa/composer.nvim", + lazy = true, } diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index f8a7b17..cdcdf85 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -1,31 +1,31 @@ return { - "mfussenegger/nvim-dap", - dependencies = { - "theHamsta/nvim-dap-virtual-text", - "rcarriga/nvim-dap-ui", - "leoluz/nvim-dap-go", - "mxsdev/nvim-dap-vscode-js", - "anuvyklack/hydra.nvim", - "nvim-telescope/telescope-dap.nvim", - "rcarriga/cmp-dap", - }, - keys = { { "<leader>d" } }, - config = function() - require("alpha.dap") - local ok_telescope, telescope = pcall(require, "telescope") - if ok_telescope then - telescope.load_extension("dap") - end + "mfussenegger/nvim-dap", + dependencies = { + "theHamsta/nvim-dap-virtual-text", + "rcarriga/nvim-dap-ui", + "leoluz/nvim-dap-go", + "mxsdev/nvim-dap-vscode-js", + "anuvyklack/hydra.nvim", + "nvim-telescope/telescope-dap.nvim", + "rcarriga/cmp-dap", + }, + keys = { { "<leader>d" } }, + config = function() + require "alpha.dap" + local ok_telescope, telescope = pcall(require, "telescope") + if ok_telescope then + telescope.load_extension "dap" + end - local ok_cmp, cmp = pcall(require, "cmp") - if ok_cmp then - cmp.setup.filetype({ "dap-repl", "dapui_watches" }, { - sources = cmp.config.sources({ - { name = "dap" }, - }, { - { name = "buffer" }, - }), - }) - end + local ok_cmp, cmp = pcall(require, "cmp") + if ok_cmp then + cmp.setup.filetype({ "dap-repl", "dapui_watches" }, { + sources = cmp.config.sources({ + { name = "dap" }, + }, { + { name = "buffer" }, + }), + }) end + end, } diff --git a/lua/plugins/database.lua b/lua/plugins/database.lua index fceb506..c6ed7ea 100644 --- a/lua/plugins/database.lua +++ b/lua/plugins/database.lua @@ -1,12 +1,12 @@ return { - "kristijanhusak/vim-dadbod-ui", - dependencies = { - "tpope/vim-dadbod", - "kristijanhusak/vim-dadbod-completion", - "tpope/vim-dotenv", - }, - keys = {{"<leader><leader>db", ':tab DBUI<cr>'}}, - init = function () - require("alpha.database") - end + "kristijanhusak/vim-dadbod-ui", + dependencies = { + "tpope/vim-dadbod", + "kristijanhusak/vim-dadbod-completion", + "tpope/vim-dotenv", + }, + keys = { { "<leader><leader>db", ":tab DBUI<cr>" } }, + init = function() + require "alpha.database" + end, } diff --git a/lua/plugins/dressing.lua b/lua/plugins/dressing.lua index d7de41b..f3f39fd 100644 --- a/lua/plugins/dressing.lua +++ b/lua/plugins/dressing.lua @@ -1,160 +1,160 @@ return { - "stevearc/dressing.nvim", - event = "VeryLazy", - opts = { - input = { - -- Set to false to disable the vim.ui.input implementation - enabled = true, - - -- Default prompt string - default_prompt = "Input:", - - -- Can be 'left', 'right', or 'center' - prompt_align = "left", - - -- When true, <Esc> will close the modal - insert_only = true, - - -- When true, input will start in insert mode. - start_in_insert = true, - - -- These are passed to nvim_open_win - anchor = "SW", - border = "rounded", - -- 'editor' and 'win' will default to being centered - relative = "cursor", - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - prefer_width = 40, - width = nil, - -- min_width and max_width can be a list of mixed types. - -- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total" - max_width = { 140, 0.9 }, - min_width = { 20, 0.2 }, - win_options = { - -- Window transparency (0-100) - winblend = 10, - -- Disable line wrapping - wrap = false, - }, - - -- Set to `false` to disable - mappings = { - n = { - ["<Esc>"] = "Close", - ["<CR>"] = "Confirm", - }, - i = { - ["<C-c>"] = "Close", - ["<CR>"] = "Confirm", - ["<Up>"] = "HistoryPrev", - ["<Down>"] = "HistoryNext", - }, - }, - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf - end, - - -- see :help dressing_get_config - get_config = nil, + "stevearc/dressing.nvim", + event = "VeryLazy", + opts = { + input = { + -- Set to false to disable the vim.ui.input implementation + enabled = true, + + -- Default prompt string + default_prompt = "Input:", + + -- Can be 'left', 'right', or 'center' + prompt_align = "left", + + -- When true, <Esc> will close the modal + insert_only = true, + + -- When true, input will start in insert mode. + start_in_insert = true, + + -- These are passed to nvim_open_win + anchor = "SW", + border = "rounded", + -- 'editor' and 'win' will default to being centered + relative = "cursor", + + -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) + prefer_width = 40, + width = nil, + -- min_width and max_width can be a list of mixed types. + -- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total" + max_width = { 140, 0.9 }, + min_width = { 20, 0.2 }, + win_options = { + -- Window transparency (0-100) + winblend = 10, + -- Disable line wrapping + wrap = false, + }, + + -- Set to `false` to disable + mappings = { + n = { + ["<Esc>"] = "Close", + ["<CR>"] = "Confirm", }, - select = { - -- Set to false to disable the vim.ui.select implementation - enabled = true, - - -- Priority list of preferred vim.select implementations - backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" }, - - -- Trim trailing `:` from prompt - trim_prompt = true, - - -- Options for telescope selector - -- These are passed into the telescope picker directly. Can be used like: - -- telescope = require('telescope.themes').get_ivy({...}) - telescope = nil, - - -- Options for fzf selector - fzf = { - window = { - width = 0.5, - height = 0.4, - }, - }, - - -- Options for fzf_lua selector - fzf_lua = { - winopts = { - width = 0.5, - height = 0.4, - }, - }, - - -- Options for nui Menu - nui = { - position = "50%", - size = nil, - relative = "editor", - border = { - style = "rounded", - }, - buf_options = { - swapfile = false, - filetype = "DressingSelect", - }, - win_options = { - winblend = 10, - }, - max_width = 80, - max_height = 40, - min_width = 40, - min_height = 10, - }, - - -- Options for built-in selector - builtin = { - -- These are passed to nvim_open_win - anchor = "NW", - border = "rounded", - -- 'editor' and 'win' will default to being centered - relative = "editor", - - win_options = { - -- Window transparency (0-100) - winblend = 10, - }, - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- the min_ and max_ options can be a list of mixed types. - -- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total" - width = nil, - max_width = { 140, 0.8 }, - min_width = { 40, 0.2 }, - height = nil, - max_height = 0.9, - min_height = { 10, 0.2 }, - - -- Set to `false` to disable - mappings = { - ["<Esc>"] = "Close", - ["<C-c>"] = "Close", - ["<CR>"] = "Confirm", - }, - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf - end, - }, - - -- Used to override format_item. See :help dressing-format - format_item_override = {}, - - -- see :help dressing_get_config - get_config = nil, + i = { + ["<C-c>"] = "Close", + ["<CR>"] = "Confirm", + ["<Up>"] = "HistoryPrev", + ["<Down>"] = "HistoryNext", }, + }, + + override = function(conf) + -- This is the config that will be passed to nvim_open_win. + -- Change values here to customize the layout + return conf + end, + + -- see :help dressing_get_config + get_config = nil, + }, + select = { + -- Set to false to disable the vim.ui.select implementation + enabled = true, + + -- Priority list of preferred vim.select implementations + backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" }, + + -- Trim trailing `:` from prompt + trim_prompt = true, + + -- Options for telescope selector + -- These are passed into the telescope picker directly. Can be used like: + -- telescope = require('telescope.themes').get_ivy({...}) + telescope = nil, + + -- Options for fzf selector + fzf = { + window = { + width = 0.5, + height = 0.4, + }, + }, + + -- Options for fzf_lua selector + fzf_lua = { + winopts = { + width = 0.5, + height = 0.4, + }, + }, + + -- Options for nui Menu + nui = { + position = "50%", + size = nil, + relative = "editor", + border = { + style = "rounded", + }, + buf_options = { + swapfile = false, + filetype = "DressingSelect", + }, + win_options = { + winblend = 10, + }, + max_width = 80, + max_height = 40, + min_width = 40, + min_height = 10, + }, + + -- Options for built-in selector + builtin = { + -- These are passed to nvim_open_win + anchor = "NW", + border = "rounded", + -- 'editor' and 'win' will default to being centered + relative = "editor", + + win_options = { + -- Window transparency (0-100) + winblend = 10, + }, + + -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) + -- the min_ and max_ options can be a list of mixed types. + -- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total" + width = nil, + max_width = { 140, 0.8 }, + min_width = { 40, 0.2 }, + height = nil, + max_height = 0.9, + min_height = { 10, 0.2 }, + + -- Set to `false` to disable + mappings = { + ["<Esc>"] = "Close", + ["<C-c>"] = "Close", + ["<CR>"] = "Confirm", + }, + + override = function(conf) + -- This is the config that will be passed to nvim_open_win. + -- Change values here to customize the layout + return conf + end, + }, + + -- Used to override format_item. See :help dressing-format + format_item_override = {}, + + -- see :help dressing_get_config + get_config = nil, }, + }, } diff --git a/lua/plugins/easy-align.lua b/lua/plugins/easy-align.lua index 5f62713..6e14908 100644 --- a/lua/plugins/easy-align.lua +++ b/lua/plugins/easy-align.lua @@ -1,4 +1,4 @@ return { - "junegunn/vim-easy-align", - keys = { { "ga", "<Plug>(EasyAlign)", mode = { "n", "v" } } }, + "junegunn/vim-easy-align", + keys = { { "ga", "<Plug>(EasyAlign)", mode = { "n", "v" } } }, } diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index 897aeb9..952ee9e 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -1,11 +1,11 @@ return { - "tpope/vim-fugitive", - enabled = false, - keys = { - { "<leader>ga", ":Git fetch --all -p<cr>" }, - { "<leader>gl", ":Git pull<cr>" }, - { "<leader>gdh", ":diffget //2<cr>" }, - { "<leader>gdl", ":diffget //3<cr>" }, - }, - cmd = { "G", "Git" }, + "tpope/vim-fugitive", + enabled = false, + keys = { + { "<leader>ga", ":Git fetch --all -p<cr>" }, + { "<leader>gl", ":Git pull<cr>" }, + { "<leader>gdh", ":diffget //2<cr>" }, + { "<leader>gdl", ":diffget //3<cr>" }, + }, + cmd = { "G", "Git" }, } diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 524da78..22db515 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,21 +1,21 @@ return { - "lewis6991/gitsigns.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - }, - config = function() - local gitsigns = require("gitsigns") - gitsigns.setup({ - trouble = false, - on_attach = function(bufnr) - vim.keymap.set('n', '<leader>hs', gitsigns.stage_hunk, { buffer = bufnr }) - vim.keymap.set('n', '<leader>hu', gitsigns.undo_stage_hunk, { buffer = bufnr }) - vim.keymap.set('n', '<leader>hr', gitsigns.reset_hunk, { buffer = bufnr }) - vim.keymap.set('n', '<leader>hp', gitsigns.preview_hunk, { buffer = bufnr }) - vim.keymap.set('n', '<leader>hj', gitsigns.next_hunk, { buffer = bufnr }) - vim.keymap.set('n', '<leader>hk', gitsigns.prev_hunk, { buffer = bufnr }) - end, - max_file_length = 10000, - }) - end + "lewis6991/gitsigns.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = function() + local gitsigns = require "gitsigns" + gitsigns.setup { + trouble = false, + on_attach = function(bufnr) + vim.keymap.set("n", "<leader>hs", gitsigns.stage_hunk, { buffer = bufnr }) + vim.keymap.set("n", "<leader>hu", gitsigns.undo_stage_hunk, { buffer = bufnr }) + vim.keymap.set("n", "<leader>hr", gitsigns.reset_hunk, { buffer = bufnr }) + vim.keymap.set("n", "<leader>hp", gitsigns.preview_hunk, { buffer = bufnr }) + vim.keymap.set("n", "<leader>hj", gitsigns.next_hunk, { buffer = bufnr }) + vim.keymap.set("n", "<leader>hk", gitsigns.prev_hunk, { buffer = bufnr }) + end, + max_file_length = 10000, + } + end, } diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua index b410c8e..d8a4b70 100644 --- a/lua/plugins/harpoon.lua +++ b/lua/plugins/harpoon.lua @@ -1,11 +1,11 @@ return { - "ThePrimeagen/harpoon", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-lua/popup.nvim", - }, - keys = require('alpha.harpoon').keymaps, - config = function () - require("alpha.harpoon").setup() - end + "ThePrimeagen/harpoon", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-lua/popup.nvim", + }, + keys = require("alpha.harpoon").keymaps, + config = function() + require("alpha.harpoon").setup() + end, } diff --git a/lua/plugins/icon-picker.lua b/lua/plugins/icon-picker.lua index 55183db..e9f1e94 100644 --- a/lua/plugins/icon-picker.lua +++ b/lua/plugins/icon-picker.lua @@ -1,9 +1,9 @@ return { - "ziontee113/icon-picker.nvim", - keys = { - { "<Leader><Leader>i", "<cmd>IconPickerNormal nerd_font<cr>", mode = "n" }, - { "<Leader><Leader>y", "<cmd>IconPickerYank nerd_font<cr>", mode = "n" }, - { "<C-o>", "<cmd>IconPickerInsert nerd_font<cr>", mode = "i" }, - }, - opts = { disable_legacy_commands = true } + "ziontee113/icon-picker.nvim", + keys = { + { "<Leader><Leader>i", "<cmd>IconPickerNormal nerd_font<cr>", mode = "n" }, + { "<Leader><Leader>y", "<cmd>IconPickerYank nerd_font<cr>", mode = "n" }, + { "<C-o>", "<cmd>IconPickerInsert nerd_font<cr>", mode = "i" }, + }, + opts = { disable_legacy_commands = true }, } diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua index 79c2f8f..3d5f6fe 100644 --- a/lua/plugins/indent-blankline.lua +++ b/lua/plugins/indent-blankline.lua @@ -1,4 +1,4 @@ return { - "lukas-reineke/indent-blankline.nvim", - config = true, + "lukas-reineke/indent-blankline.nvim", + config = true, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0eb7a38..66b267d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,12 +1,12 @@ return { - "jwalton512/vim-blade", - { - "tpope/vim-dispatch", - cmd = {"Make", "Dispatch"} - }, - "tpope/vim-surround", - "tpope/vim-repeat", - "tpope/vim-rhubarb", - "tpope/vim-dotenv", - "tpope/vim-eunuch", + "jwalton512/vim-blade", + { + "tpope/vim-dispatch", + cmd = { "Make", "Dispatch" }, + }, + "tpope/vim-surround", + "tpope/vim-repeat", + "tpope/vim-rhubarb", + "tpope/vim-dotenv", + "tpope/vim-eunuch", } diff --git a/lua/plugins/laravel.lua b/lua/plugins/laravel.lua index 73ea90d..fa8d973 100644 --- a/lua/plugins/laravel.lua +++ b/lua/plugins/laravel.lua @@ -1,16 +1,16 @@ return { - "adalessa/laravel.nvim", - dependencies = { - "rcarriga/nvim-notify", - "nvim-telescope/telescope.nvim", - }, - cmd = { "Sail", "Artisan", "Composer", "Npm" }, - keys = { - { "<leader>pa", ":Artisan<cr>" }, - }, - events = { "VeryLazy" }, - config = function() - require("laravel").setup() - require("telescope").load_extension("laravel") - end + "adalessa/laravel.nvim", + dependencies = { + "rcarriga/nvim-notify", + "nvim-telescope/telescope.nvim", + }, + cmd = { "Sail", "Artisan", "Composer", "Npm" }, + keys = { + { "<leader>pa", ":Artisan<cr>" }, + }, + events = { "VeryLazy" }, + config = function() + require("laravel").setup() + require("telescope").load_extension "laravel" + end, } diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua index 2299518..46c04a1 100644 --- a/lua/plugins/lazygit.lua +++ b/lua/plugins/lazygit.lua @@ -1,4 +1,4 @@ return { - "kdheepak/lazygit.nvim", - keys = {{"<leader>gg", ":LazyGit<cr>"}}, + "kdheepak/lazygit.nvim", + keys = { { "<leader>gg", ":LazyGit<cr>" } }, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index d412383..3b774b5 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,28 +1,28 @@ return { - "neovim/nvim-lspconfig", - dependencies = { - { - "jose-elias-alvarez/null-ls.nvim", - dependencies = { - "adalessa/php-code-actions.nvim", - } - }, - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "WhoIsSethDaniel/mason-tool-installer.nvim", - { - "j-hui/fidget.nvim", - opts = { - sources = { - ["null-ls"] = { - ignore = true - } - } - }, + "neovim/nvim-lspconfig", + dependencies = { + { + "jose-elias-alvarez/null-ls.nvim", + dependencies = { + "adalessa/php-code-actions.nvim", + }, + }, + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "WhoIsSethDaniel/mason-tool-installer.nvim", + { + "j-hui/fidget.nvim", + opts = { + sources = { + ["null-ls"] = { + ignore = true, + }, }, + }, }, - event = "VeryLazy", - config = function () - require("alpha.lsp") - end + }, + event = "VeryLazy", + config = function() + require "alpha.lsp" + end, } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index f63efa0..5b84115 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,47 +1,46 @@ return { - "nvim-lualine/lualine.nvim", - dependencies = { "kyazdani42/nvim-web-devicons" }, - config = function() - require("lualine").setup( - { - options = { |