diff options
Diffstat (limited to 'lua/alpha/plugins')
| -rw-r--r-- | lua/alpha/plugins/comment.lua | 3 | ||||
| -rw-r--r-- | lua/alpha/plugins/dressing.lua | 262 | ||||
| -rw-r--r-- | lua/alpha/plugins/fugitive.lua | 10 | ||||
| -rw-r--r-- | lua/alpha/plugins/icon-picker.lua | 6 | ||||
| -rw-r--r-- | lua/alpha/plugins/init.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/plugins/laravel.lua | 20 | ||||
| -rw-r--r-- | lua/alpha/plugins/lualine.lua | 66 |
7 files changed, 175 insertions, 193 deletions
diff --git a/lua/alpha/plugins/comment.lua b/lua/alpha/plugins/comment.lua index 5d1831f..397d36b 100644 --- a/lua/alpha/plugins/comment.lua +++ b/lua/alpha/plugins/comment.lua @@ -1,7 +1,4 @@ return { "numToStr/Comment.nvim", keys = { { "gcc" }, { "gbc" }, { "gc", mode = "v" }, { "gb", mode = "v" } }, - config = function() - require("Comment").setup() - end, } diff --git a/lua/alpha/plugins/dressing.lua b/lua/alpha/plugins/dressing.lua index 7d7e056..a5c06d4 100644 --- a/lua/alpha/plugins/dressing.lua +++ b/lua/alpha/plugins/dressing.lua @@ -1,55 +1,145 @@ return { "stevearc/dressing.nvim", - config = function() - require("dressing").setup({ - input = { - -- Set to false to disable the vim.ui.input implementation - enabled = true, + 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, + }, - -- Default prompt string - default_prompt = "Input:", + -- Set to `false` to disable + mappings = { + n = { + ["<Esc>"] = "Close", + ["<CR>"] = "Confirm", + }, + i = { + ["<C-c>"] = "Close", + ["<CR>"] = "Confirm", + ["<Up>"] = "HistoryPrev", + ["<Down>"] = "HistoryNext", + }, + }, - -- Can be 'left', 'right', or 'center' - prompt_align = "left", + 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, + }, + }, - -- When true, <Esc> will close the modal - insert_only = true, + -- Options for fzf_lua selector + fzf_lua = { + winopts = { + width = 0.5, + height = 0.4, + }, + }, - -- When true, input will start in insert mode. - start_in_insert = true, + -- 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 = "SW", + anchor = "NW", border = "rounded", -- 'editor' and 'win' will default to being centered - relative = "cursor", + relative = "editor", - -- 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, }, + -- 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 = { - n = { - ["<Esc>"] = "Close", - ["<CR>"] = "Confirm", - }, - i = { - ["<C-c>"] = "Close", - ["<CR>"] = "Confirm", - ["<Up>"] = "HistoryPrev", - ["<Down>"] = "HistoryNext", - }, + ["<Esc>"] = "Close", + ["<C-c>"] = "Close", + ["<CR>"] = "Confirm", }, override = function(conf) @@ -57,105 +147,13 @@ return { -- 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, - }, + -- Used to override format_item. See :help dressing-format + format_item_override = {}, - -- 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, - }, - }) - end + -- see :help dressing_get_config + get_config = nil, + }, + }, } diff --git a/lua/alpha/plugins/fugitive.lua b/lua/alpha/plugins/fugitive.lua index bcf7ea8..ccce9b5 100644 --- a/lua/alpha/plugins/fugitive.lua +++ b/lua/alpha/plugins/fugitive.lua @@ -1,12 +1,10 @@ return { "tpope/vim-fugitive", keys = { - {"<leader>ga", ":Git fetch --all -p<cr>"}, - {"<leader>gl", ":Git pull<cr>"}, + { "<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" }, - config = function () - vim.keymap.set("n", "<leader>gdh", ":diffget //2<cr>", nil) - vim.keymap.set("n", "<leader>gdl", ":diffget //3<cr>", nil) - end } diff --git a/lua/alpha/plugins/icon-picker.lua b/lua/alpha/plugins/icon-picker.lua index 1db3757..55183db 100644 --- a/lua/alpha/plugins/icon-picker.lua +++ b/lua/alpha/plugins/icon-picker.lua @@ -1,9 +1,9 @@ return { "ziontee113/icon-picker.nvim", keys = { - { "<Leader><Leader>i", "<cmd>IconPickerNormal<cr>", mode = "n" }, - { "<Leader><Leader>y", "<cmd>IconPickerYank<cr>", mode = "n" }, - { "<C-i>", "<cmd>IconPickerInsert<cr>", mode = "i" }, + { "<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/alpha/plugins/init.lua b/lua/alpha/plugins/init.lua index ee4a831..cc6e796 100644 --- a/lua/alpha/plugins/init.lua +++ b/lua/alpha/plugins/init.lua @@ -20,4 +20,5 @@ return { "tpope/vim-rhubarb", "tpope/vim-dotenv", "tpope/vim-eunuch", + "adalessa/composer.nvim", } diff --git a/lua/alpha/plugins/laravel.lua b/lua/alpha/plugins/laravel.lua index 657ce5e..60f8ad2 100644 --- a/lua/alpha/plugins/laravel.lua +++ b/lua/alpha/plugins/laravel.lua @@ -2,24 +2,14 @@ return { "adalessa/laravel.nvim", dependencies = { "rcarriga/nvim-notify", - "adalessa/composer.nvim", + "nvim-telescope/telescope.nvim", }, cmd = {"Sail", "Artisan", "Composer"}, - keys = {{"<leader>pa", function () - require("telescope").extensions.laravel.laravel() - end}}, + keys = { + {"<leader>pa", ":Artisan<cr>"}, + }, config = function() - local laravel = require("laravel") - local artisan = require("laravel.artisan") - local notify = require("notify") - - laravel.setup() - - vim.keymap.set("n", "<leader>ac", function() - artisan.clean_cmd_list_cache() - notify.notify("Artisan cmd list cache clean", "info", { title = "Laravel.nvim" }) - end, { noremap = true }) - + require("laravel").setup() require("telescope").load_extension("laravel") end } diff --git a/lua/alpha/plugins/lualine.lua b/lua/alpha/plugins/lualine.lua index e2ace98..91be781 100644 --- a/lua/alpha/plugins/lualine.lua +++ b/lua/alpha/plugins/lualine.lua @@ -1,38 +1,36 @@ return { "nvim-lualine/lualine.nvim", dependencies = { "kyazdani42/nvim-web-devicons" }, - config = function() - require("lualine").setup({ - options = { - theme = vim.g.alpha_lualine_color, - icons_enabled = true, - globalstatus = true, - }, - extensions = { "quickfix", "fugitive" }, - sections = { - lualine_a = { { "mode", upper = true } }, - lualine_b = { { "branch", icon = "" }, "db_ui#statusline" }, - lualine_c = { { "filename", file_status = true, path = 1 } }, - lualine_x = { "diagnostics", "diff" }, - lualine_y = { "filetype" }, - lualine_z = { "location" }, - }, - winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { "filename" }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, - inactive_winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { "filename" }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, - }) - end + opts = { + options = { + theme = vim.g.alpha_lualine_color, + icons_enabled = true, + globalstatus = true, + }, + extensions = { "quickfix", "fugitive" }, + sections = { + lualine_a = { { "mode", upper = true } }, + lualine_b = { { "branch", icon = "" }, "db_ui#statusline" }, + lualine_c = { { "filename", file_status = true, path = 1 } }, + lualine_x = { "diagnostics", "diff" }, + lualine_y = { "filetype" }, + lualine_z = { "location" }, + }, + winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {}, + }, + inactive_winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {}, + }, + }, } |