From 669561e21073e6efafddda25ba3ace69fb43819e Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 31 Jan 2023 09:44:13 +0100 Subject: feat: apply stylua --- lua/plugins/autopairs.lua | 6 +- lua/plugins/colorscheme.lua | 18 +-- lua/plugins/comment.lua | 6 +- lua/plugins/completition.lua | 36 ++--- lua/plugins/composer.lua | 4 +- lua/plugins/dap.lua | 54 +++---- lua/plugins/database.lua | 20 +-- lua/plugins/dressing.lua | 310 +++++++++++++++++++-------------------- lua/plugins/easy-align.lua | 4 +- lua/plugins/fugitive.lua | 18 +-- lua/plugins/gitsigns.lua | 38 ++--- lua/plugins/harpoon.lua | 18 +-- lua/plugins/icon-picker.lua | 14 +- lua/plugins/indent-blankline.lua | 4 +- lua/plugins/init.lua | 20 +-- lua/plugins/laravel.lua | 28 ++-- lua/plugins/lazygit.lua | 4 +- lua/plugins/lsp.lua | 48 +++--- lua/plugins/lualine.lua | 89 ++++++----- lua/plugins/mind.lua | 26 ++-- lua/plugins/neogen.lua | 12 +- lua/plugins/neotest.lua | 110 +++++++------- lua/plugins/notify.lua | 16 +- lua/plugins/project-config.lua | 4 +- lua/plugins/refactoring.lua | 28 ++-- lua/plugins/rest.lua | 77 +++++----- lua/plugins/snippets.lua | 233 +++++++++++++++-------------- lua/plugins/telescope.lua | 50 +++---- lua/plugins/test.lua | 68 ++++----- lua/plugins/todo-comments.lua | 38 ++--- lua/plugins/transparent.lua | 34 ++--- lua/plugins/treesitter.lua | 152 ++++++++++--------- lua/plugins/trouble.lua | 8 +- lua/plugins/worktree.lua | 26 +++- 34 files changed, 825 insertions(+), 796 deletions(-) (limited to 'lua/plugins') 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 = { { "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 = { { "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 = {{"db", ':tab DBUI'}}, - init = function () - require("alpha.database") - end + "kristijanhusak/vim-dadbod-ui", + dependencies = { + "tpope/vim-dadbod", + "kristijanhusak/vim-dadbod-completion", + "tpope/vim-dotenv", + }, + keys = { { "db", ":tab DBUI" } }, + 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, 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 = { - [""] = "Close", - [""] = "Confirm", - }, - i = { - [""] = "Close", - [""] = "Confirm", - [""] = "HistoryPrev", - [""] = "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, 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 = { + [""] = "Close", + [""] = "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 = { - [""] = "Close", - [""] = "Close", - [""] = "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 = { + [""] = "Close", + [""] = "Confirm", + [""] = "HistoryPrev", + [""] = "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 = { + [""] = "Close", + [""] = "Close", + [""] = "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", "(EasyAlign)", mode = { "n", "v" } } }, + "junegunn/vim-easy-align", + keys = { { "ga", "(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 = { - { "ga", ":Git fetch --all -p" }, - { "gl", ":Git pull" }, - { "gdh", ":diffget //2" }, - { "gdl", ":diffget //3" }, - }, - cmd = { "G", "Git" }, + "tpope/vim-fugitive", + enabled = false, + keys = { + { "ga", ":Git fetch --all -p" }, + { "gl", ":Git pull" }, + { "gdh", ":diffget //2" }, + { "gdl", ":diffget //3" }, + }, + 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', 'hs', gitsigns.stage_hunk, { buffer = bufnr }) - vim.keymap.set('n', 'hu', gitsigns.undo_stage_hunk, { buffer = bufnr }) - vim.keymap.set('n', 'hr', gitsigns.reset_hunk, { buffer = bufnr }) - vim.keymap.set('n', 'hp', gitsigns.preview_hunk, { buffer = bufnr }) - vim.keymap.set('n', 'hj', gitsigns.next_hunk, { buffer = bufnr }) - vim.keymap.set('n', '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", "hs", gitsigns.stage_hunk, { buffer = bufnr }) + vim.keymap.set("n", "hu", gitsigns.undo_stage_hunk, { buffer = bufnr }) + vim.keymap.set("n", "hr", gitsigns.reset_hunk, { buffer = bufnr }) + vim.keymap.set("n", "hp", gitsigns.preview_hunk, { buffer = bufnr }) + vim.keymap.set("n", "hj", gitsigns.next_hunk, { buffer = bufnr }) + vim.keymap.set("n", "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 = { - { "i", "IconPickerNormal nerd_font", mode = "n" }, - { "y", "IconPickerYank nerd_font", mode = "n" }, - { "", "IconPickerInsert nerd_font", mode = "i" }, - }, - opts = { disable_legacy_commands = true } + "ziontee113/icon-picker.nvim", + keys = { + { "i", "IconPickerNormal nerd_font", mode = "n" }, + { "y", "IconPickerYank nerd_font", mode = "n" }, + { "", "IconPickerInsert nerd_font", 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 = { - { "pa", ":Artisan" }, - }, - 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 = { + { "pa", ":Artisan" }, + }, + 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 = {{"gg", ":LazyGit"}}, + "kdheepak/lazygit.nvim", + keys = { { "gg", ":LazyGit" } }, } 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 = { - 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", - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "ff9e64" }, - } - }, - 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, + "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", + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "ff9e64" }, + }, + }, + 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, } diff --git a/lua/plugins/mind.lua b/lua/plugins/mind.lua index 70c0e23..f474e96 100644 --- a/lua/plugins/mind.lua +++ b/lua/plugins/mind.lua @@ -1,16 +1,16 @@ return { - "phaazon/mind.nvim", - branch = "v2.2", - dependencies = { "nvim-lua/plenary.nvim" }, - cmd = { "MindOpenMain", "MindOpenProject" }, - config = function() - local dirs = {} - if vim.fn.isdirectory("/mnt/nas/alpha/mind/data") == 1 then - dirs = { - state_path = "/mnt/nas/alpha/mind/mind.json", - data_dir = "/mnt/nas/alpha/mind/data", - } - end - require('mind').setup({ persistence = dirs }) + "phaazon/mind.nvim", + branch = "v2.2", + dependencies = { "nvim-lua/plenary.nvim" }, + cmd = { "MindOpenMain", "MindOpenProject" }, + config = function() + local dirs = {} + if vim.fn.isdirectory "/mnt/nas/alpha/mind/data" == 1 then + dirs = { + state_path = "/mnt/nas/alpha/mind/mind.json", + data_dir = "/mnt/nas/alpha/mind/data", + } end + require("mind").setup { persistence = dirs } + end, } diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua index 907f097..006710f 100644 --- a/lua/plugins/neogen.lua +++ b/lua/plugins/neogen.lua @@ -1,8 +1,8 @@ return { - "danymat/neogen", - dependencies = "nvim-treesitter/nvim-treesitter", - cmd = {"Neogen"}, - config = true, - -- Uncomment next line if you want to follow only stable versions - -- version = "*" + "danymat/neogen", + dependencies = "nvim-treesitter/nvim-treesitter", + cmd = { "Neogen" }, + config = true, + -- Uncomment next line if you want to follow only stable versions + -- version = "*" } diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index 5a332be..00ed18d 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -1,64 +1,64 @@ return { - "nvim-neotest/neotest", - enabled = false, - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - "antoinemadec/FixCursorHold.nvim", - "nvim-neotest/neotest-go", - "rouge8/neotest-rust", - "nvim-neotest/neotest-plenary", - "nvim-neotest/neotest-vim-test", - "anuvyklack/hydra.nvim", - }, - config = function() - local neotest = require("neotest") - neotest.setup({ - adapters = { - require("neotest-go"), - require("neotest-rust"), - require("neotest-plenary"), - require("neotest-vim-test")({ - ignore_file_types = { "go", "lua", "rust", "php" }, - }), - -- require("laravel.neotest"), - }, - }) + "nvim-neotest/neotest", + enabled = false, + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + "antoinemadec/FixCursorHold.nvim", + "nvim-neotest/neotest-go", + "rouge8/neotest-rust", + "nvim-neotest/neotest-plenary", + "nvim-neotest/neotest-vim-test", + "anuvyklack/hydra.nvim", + }, + config = function() + local neotest = require "neotest" + neotest.setup { + adapters = { + require "neotest-go", + require "neotest-rust", + require "neotest-plenary", + require "neotest-vim-test" { + ignore_file_types = { "go", "lua", "rust", "php" }, + }, + -- require("laravel.neotest"), + }, + } - local hydra = require("hydra") + local hydra = require "hydra" - local hint = [[ + local hint = [[ NeoTest _n_: Near test _f_: Current file _l_: Last Test _m_: Run Marked _s_: Toggle Summary ^ ^ ^ __ ]] - hydra({ - name = "neotest", - hint = hint, - mode = "n", - config = { - color = "teal", - invoke_on_body = true, - hint = { - border = "rounded", - position = "bottom", - }, - }, - body = "", - heads = { - { "n", neotest.run.run }, - { - "f", - function() - neotest.run.run(vim.fn.expand("%")) - end, - }, - { "l", neotest.run.run_last }, - { "m", neotest.summary.run_marked }, - { "s", neotest.summary.toggle }, - { "", nil, { exit = true } }, - }, - }) - end + hydra { + name = "neotest", + hint = hint, + mode = "n", + config = { + color = "teal", + invoke_on_body = true, + hint = { + border = "rounded", + position = "bottom", + }, + }, + body = "", + heads = { + { "n", neotest.run.run }, + { + "f", + function() + neotest.run.run(vim.fn.expand "%") + end, + }, + { "l", neotest.run.run_last }, + { "m", neotest.summary.run_marked }, + { "s", neotest.summary.toggle }, + { "", nil, { exit = true } }, + }, + } + end, } diff --git a/lua/plugins/notify.lua b/lua/plugins/notify.lua index c0d3099..97f6d1f 100644 --- a/lua/plugins/notify.lua +++ b/lua/plugins/notify.lua @@ -1,10 +1,10 @@ return { - "rcarriga/nvim-notify", - config = function() - local notify = require("notify") - -- this for transparency - notify.setup({ background_colour = "#000000" }) - -- this overwrites the vim notify function - vim.notify = notify.notify - end + "rcarriga/nvim-notify", + config = function() + local notify = require "notify" + -- this for transparency + notify.setup { background_colour = "#000000" } + -- this overwrites the vim notify function + vim.notify = notify.notify + end, } diff --git a/lua/plugins/project-config.lua b/lua/plugins/project-config.lua index aacf3ac..3af9a68 100644 --- a/lua/plugins/project-config.lua +++ b/lua/plugins/project-config.lua @@ -1,4 +1,4 @@ return { - "windwp/nvim-projectconfig", - config = true, + "windwp/nvim-projectconfig", + config = true, } diff --git a/lua/plugins/refactoring.lua b/lua/plugins/refactoring.lua index 349cc63..6c48610 100644 --- a/lua/plugins/refactoring.lua +++ b/lua/plugins/refactoring.lua @@ -1,14 +1,20 @@ return { - "ThePrimeagen/refactoring.nvim", - dependencies = { - { "nvim-lua/plenary.nvim" }, - { "nvim-treesitter/nvim-treesitter" }, - }, - keys = { { "rr", function() + "ThePrimeagen/refactoring.nvim", + dependencies = { + { "nvim-lua/plenary.nvim" }, + { "nvim-treesitter/nvim-treesitter" }, + }, + keys = { + { + "rr", + function() require("telescope").extensions.refactoring.refactors() - end, mode = { "n", "v" } } }, - config = function() - require("refactoring").setup({}) - require("telescope").load_extension("refactoring") - end + end, + mode = { "n", "v" }, + }, + }, + config = function() + require("refactoring").setup {} + require("telescope").load_extension "refactoring" + end, } diff --git a/lua/plugins/rest.lua b/lua/plugins/rest.lua index 7b60a9d..2391d02 100644 --- a/lua/plugins/rest.lua +++ b/lua/plugins/rest.lua @@ -1,42 +1,43 @@ return { - "NTBBloodbath/rest.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - ft = "http", - config = function() - local rest_nvim = require("rest-nvim") + "NTBBloodbath/rest.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + ft = "http", + config = function() + local rest_nvim = require "rest-nvim" - rest_nvim.setup({ - -- Open request results in a horizontal split - result_split_horizontal = false, - -- Skip SSL verification, useful for unknown certificates - skip_ssl_verification = false, - -- Highlight request on run - highlight = { - enabled = true, - timeout = 150, - }, - result = { - -- toggle showing URL, HTTP info, headers at top the of result window - show_url = true, - show_http_info = true, - show_headers = true, - }, - -- Jump to request line on run - jump_to_request = false, - env_file = ".env", - custom_dynamic_variables = {}, - yank_dry_run = true, - }) + rest_nvim.setup { + -- Open request results in a horizontal split + result_split_horizontal = false, + -- Skip SSL verification, useful for unknown certificates + skip_ssl_verification = false, + -- Highlight request on run + highlight = { + enabled = true, + timeout = 150, + }, + result = { + -- toggle showing URL, HTTP info, headers at top the of result window + show_url = true, + show_http_info = true, + show_headers = true, + }, + -- Jump to request line on run + jump_to_request = false, + env_file = ".env", + custom_dynamic_variables = {}, + yank_dry_run = true, + } - vim.api.nvim_create_autocmd("FileType", { - pattern = "http", - callback = function() - local buff = tonumber(vim.fn.expand(""), 10) - vim.keymap.set("n", "rn", rest_nvim.run, { noremap = true, buffer = buff }) - vim.keymap.set("n", "rl", rest_nvim.last, { noremap = true, buffer = buff }) - vim.keymap.set("n", "rp", function() rest_nvim.run(true) end, { noremap = true, buffer = buff }) - end - }) - - end + vim.api.nvim_create_autocmd("FileType", { + pattern = "http", + callback = function() + local buff = tonumber(vim.fn.expand "", 10) + vim.keymap.set("n", "rn", rest_nvim.run, { noremap = true, buffer = buff }) + vim.keymap.set("n", "rl", rest_nvim.last, { noremap = true, buffer = buff }) + vim.keymap.set("n", "rp", function() + rest_nvim.run(true) + end, { noremap = true, buffer = buff }) + end, + }) + end, } diff --git a/lua/plugins/snippets.lua b/lua/plugins/snippets.lua index aabd418..e539383 100644 --- a/lua/plugins/snippets.lua +++ b/lua/plugins/snippets.lua @@ -1,138 +1,137 @@ local config = function() - if vim.g.snippets ~= "luasnip" then - return - end + if vim.g.snippets ~= "luasnip" then + return + end - local ls = require("luasnip") - local types = require("luasnip.util.types") + local ls = require "luasnip" + local types = require "luasnip.util.types" - ls.config.set_config({ - -- This tells LuaSnip to remember to keep around the last snippet. - -- You can jump back into even if you move outside of the selection - history = true, + ls.config.set_config { + -- This tells LuaSnip to remember to keep around the last snippet. + -- You can jump back into even if you move outside of the selection + history = true, - -- This one is cool cause if you have dynamic snippets, it updatesas you type! - updateevents = "TextChanged,TextChangedI", + -- This one is cool cause if you have dynamic snippets, it updatesas you type! + updateevents = "TextChanged,TextChangedI", - -- Autosnippets: - enable_autosnippets = true, + -- Autosnippets: + enable_autosnippets = true, - ext_opts = { - [types.choiceNode] = { - active = { - virt_text = { { "<- Choice", "Error" } }, - }, - }, + ext_opts = { + [types.choiceNode] = { + active = { + virt_text = { { "<- Choice", "Error" } }, }, - }) - - -- create snippet - -- s(context, nodes, condition, ...) - local snippet = ls.s - - -- TODO: Write about this. - -- Useful for dynamic nodes and choice nodes - -- local snippet_from_nodes = ls.sn - - -- This is the simplest node. - -- Creates a new text node. Places cursor after node by default. - -- t { "this will be inserted" } - -- - -- Multiple lines are by passing a table of strings. - -- t { "line 1", "line 2" } - local t = ls.text_node - - -- Insert Node - -- Creates a location for the cursor to jump to. - -- Possible options to jump to are 1 - N - -- If you use 0, that's the final place to jump to. - -- - -- To create placeholder text, pass it as the second argument - -- i(2, "this is placeholder text") - local i = ls.insert_node - - -- Function Node - -- Takes a function that returns text - -- local f = ls.function_node - - -- This a choice snippet. You can move through with (in my config) - -- c(1, { t {"hello"}, t {"world"}, }), - -- - -- The first argument is the jump position - -- The second argument is a table of possible nodes. - -- Note, one thing that's nice is you don't have to include - -- the jump position for nodes that normally require one (can be nil) - -- local c = ls.choice_node - - -- local d = ls.dynamic_node - - -- TODO: Document what I've learned about lambda - -- local l = require("luasnip.extras").lambda - - -- local events = require("luasnip.util.events") - - local shortcut = function(val) - if type(val) == "string" then - return { t({ val }), i(0) } - end + }, + }, + } + + -- create snippet + -- s(context, nodes, condition, ...) + local snippet = ls.s + + -- TODO: Write about this. + -- Useful for dynamic nodes and choice nodes + -- local snippet_from_nodes = ls.sn + + -- This is the simplest node. + -- Creates a new text node. Places cursor after node by default. + -- t { "this will be inserted" } + -- + -- Multiple lines are by passing a table of strings. + -- t { "line 1", "line 2" } + local t = ls.text_node + + -- Insert Node + -- Creates a location for the cursor to jump to. + -- Possible options to jump to are 1 - N + -- If you use 0, that's the final place to jump to. + -- + -- To create placeholder text, pass it as the second argument + -- i(2, "this is placeholder text") + local i = ls.insert_node + + -- Function Node + -- Takes a function that returns text + -- local f = ls.function_node + + -- This a choice snippet. You can move through with (in my config) + -- c(1, { t {"hello"}, t {"world"}, }), + -- + -- The first argument is the jump position + -- The second argument is a table of possible nodes. + -- Note, one thing that's nice is you don't have to include + -- the jump position for nodes that normally require one (can be nil) + -- local c = ls.choice_node + + -- local d = ls.dynamic_node + + -- TODO: Document what I've learned about lambda + -- local l = require("luasnip.extras").lambda + + -- local events = require("luasnip.util.events") + + local shortcut = function(val) + if type(val) == "string" then + return { t { val }, i(0) } + end - if type(val) == "table" then - for k, v in ipairs(val) do - if type(v) == "string" then - val[k] = t({ v }) - end - end + if type(val) == "table" then + for k, v in ipairs(val) do + if type(v) == "string" then + val[k] = t { v } end - - return val + end end - local make = function(tbl) - local result = {} - for k, v in pairs(tbl) do - table.insert(result, (snippet({ trig = k, desc = v.desc }, shortcut(v)))) - end + return val + end - return result + local make = function(tbl) + local result = {} + for k, v in pairs(tbl) do + table.insert(result, (snippet({ trig = k, desc = v.desc }, shortcut(v)))) end - ls.cleanup() - for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/alpha/snips/ft/*.lua", true)) do - local ft = vim.fn.fnamemodify(ft_path, ":t:r") - ls.add_snippets(ft, make(loadfile(ft_path)())) - end + return result + end - -- is my expansion key - -- this will expand the current item or jump to the next item within the snippet. - vim.keymap.set({ "i", "s" }, "", function() - if ls.expand_or_jumpable() then - ls.expand_or_jump() - end - end, { silent = true }) + ls.cleanup() + for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/alpha/snips/ft/*.lua", true)) do + local ft = vim.fn.fnamemodify(ft_path, ":t:r") + ls.add_snippets(ft, make(loadfile(ft_path)())) + end - -- is my jump backwards key. - -- this always moves to the previous item within the snippet - vim.keymap.set({ "i", "s" }, "", function() - if ls.jumpable(-1) then - ls.jump(-1) - end - end, { silent = true }) + -- is my expansion key + -- this will expand the current item or jump to the next item within the snippet. + vim.keymap.set({ "i", "s" }, "", function() + if ls.expand_or_jumpable() then + ls.expand_or_jump() + end + end, { silent = true }) - -- is selecting within a list of options. - -- This is useful for choice nodes (introduced in the forthcoming episode 2) - vim.keymap.set("i", "", function() - if ls.choice_active() then - ls.change_choice(1) - end - end) + -- is my jump backwards key. + -- this always moves to the previous item within the snippet + vim.keymap.set({ "i", "s" }, "", function() + if ls.jumpable(-1) then + ls.jump(-1) + end + end, { silent = true }) + -- is selecting within a list of options. + -- This is useful for choice nodes (introduced in the forthcoming episode 2) + vim.keymap.set("i", "", function() + if ls.choice_active() then + ls.change_choice(1) + end + end) end return { - "L3MON4D3/LuaSnip", - version = "v1.*", - event = "VeryLazy", - config = function() - config() - vim.keymap.set("n", "s", config) - end + "L3MON4D3/LuaSnip", + version = "v1.*", + event = "VeryLazy", + config = function() + config() + vim.keymap.set("n", "s", config) + end, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index a32e4f4..240f41c 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,29 +1,29 @@ return { - "nvim-telescope/telescope.nvim", - dependencies = { - { "nvim-lua/plenary.nvim" }, - { "nvim-lua/popup.nvim" }, - { "nvim-telescope/telescope-fzy-native.nvim" }, - { "kyazdani42/nvim-web-devicons" }, - { "nvim-telescope/telescope-file-browser.nvim" }, - { "nvim-telescope/telescope-ui-select.nvim" }, - { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - dependencies = { - "junegunn/fzf.vim", - dependencies = { - { - "tpope/vim-dispatch", - cmd = { "Make", "Dispatch" } - }, - }, - } + "nvim-telescope/telescope.nvim", + dependencies = { + { "nvim-lua/plenary.nvim" }, + { "nvim-lua/popup.nvim" }, + { "nvim-telescope/telescope-fzy-native.nvim" }, + { "kyazdani42/nvim-web-devicons" }, + { "nvim-telescope/telescope-file-browser.nvim" }, + { "nvim-telescope/telescope-ui-select.nvim" }, + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + dependencies = { + "junegunn/fzf.vim", + dependencies = { + { + "tpope/vim-dispatch", + cmd = { "Make", "Dispatch" }, + }, }, + }, }, - event = "VeryLazy", - config = function() - require("alpha.telescope.setup") - require("alpha.telescope.mappings") - end + }, + event = "VeryLazy", + config = function() + require "alpha.telescope.setup" + require "alpha.telescope.mappings" + end, } diff --git a/lua/plugins/test.lua b/lua/plugins/test.lua index 7fcabc9..e203679 100644 --- a/lua/plugins/test.lua +++ b/lua/plugins/test.lua @@ -1,49 +1,49 @@ return { - "vim-test/vim-test", - keys = {{"t"}}, - dependencies = { - "anuvyklack/hydra.nvim", - }, - config = function() - local hydra = require("hydra") + "vim-test/vim-test", + keys = { { "t" } }, + dependencies = { + "anuvyklack/hydra.nvim", + }, + config = function() + local hydra = require "hydra" - vim.g["test#preserve_screen"] = 1 + vim.g["test#preserve_screen"] = 1 - vim.cmd([[ + vim.cmd [[ let test#php#pest#executable = './vendor/bin/sail test' let test#strategy = 'neovim' let test#neovim#term_position = 'vert' let g:test#preserve_screen = 1 -]] ) +]] - local hint = [[ + local hint = [[ Vim Tests _n_: Near test _f_: Current file _s_: Test Suit ^ _l_: Test Last _g_: Visit ^ ^ __ ^ ]] - hydra({ - name = "vimtest", - hint = hint, - mode = "n", - config = { - color = "teal", - invoke_on_body = true, - hint = { - border = "rounded", - position = "bottom", - } - }, - body = "t", - heads = { - { "n", ":TestNearest" }, - { "f", ":TestFile" }, - { "s", ":TestSuit" }, - { "l", ":TestLast" }, - { "g", ":TestVisit" }, - { '', nil, { exit = true } } - } - }) - end + hydra { + name = "vimtest", + hint = hint, + mode = "n", + config = { + color = "teal", + invoke_on_body = true, + hint = { + border = "rounded", + position = "bottom", + }, + }, + body = "t", + heads = { + { "n", ":TestNearest" }, + { "f", ":TestFile" }, + { "s", ":TestSuit" }, + { "l", ":TestLast" }, + { "g", ":TestVisit" }, + { "", nil, { exit = true } }, + }, + } + end, } diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua index 566b45b..7ccdf5f 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/plugins/todo-comments.lua @@ -1,23 +1,23 @@ return { - "folke/todo-comments.nvim", - dependencies = { - "nvim-lua/plenary.nvim", + "folke/todo-comments.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = true, + lazy = false, + cmds = { "TodoTrouble", "TodoTelescope", "TodoQuickFix" }, + keys = { + { + "]t", + function() + require("todo-comments").jump_next() + end, }, - config = true, - lazy = false, - cmds = {"TodoTrouble", "TodoTelescope", "TodoQuickFix"}, - keys = { - { - "]t", - function() - require("todo-comments").jump_next() - end - }, - { - "[t", - function() - require("todo-comments").jump_prev() - end - } + { + "[t", + function() + require("todo-comments").jump_prev() + end, }, + }, } diff --git a/lua/plugins/transparent.lua b/lua/plugins/transparent.lua index fa0b480..c305442 100644 --- a/lua/plugins/transparent.lua +++ b/lua/plugins/transparent.lua @@ -1,20 +1,20 @@ return { - "xiyaowong/nvim-transparent", - config = function() - require("transparent").setup({ - enable = true, -- boolean: enable transparent - extra_groups = { -- table/string: additional groups that should be cleared - -- In particular, when you set it to 'all', that means all available groups + "xiyaowong/nvim-transparent", + config = function() + require("transparent").setup { + enable = true, -- boolean: enable transparent + extra_groups = { -- table/string: additional groups that should be cleared + -- In particular, when you set it to 'all', that means all available groups - -- example of akinsho/nvim-bufferline.lua - "BufferLineTabClose", - "BufferlineBufferSelected", - "BufferLineFill", - "BufferLineBackground", - "BufferLineSeparator", - "BufferLineIndicatorSelected", - }, - exclude = {}, -- table: groups you don't want to clear - }) - end + -- example of akinsho/nvim-bufferline.lua + "BufferLineTabClose", + "BufferlineBufferSelected", + "BufferLineFill", + "BufferLineBackground", + "BufferLineSeparator", + "BufferLineIndicatorSelected", + }, + exclude = {}, -- table: groups you don't want to clear + } + end, } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 578daee..4b9a806 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,71 +1,85 @@ return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - dependencies = { - "nvim-treesitter/playground", - "nvim-treesitter/nvim-treesitter-refactor", - "nvim-treesitter/nvim-treesitter-textobjects", - }, - config = function() - require "nvim-treesitter.configs".setup { - ensure_installed = { "php", "phpdoc", "vim", "go", "gomod", "css", "html", "javascript", "lua", "typescript", "yaml", "query", "markdown" }, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - indent = { - enable = true, - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - }, - refactor = { - highlight_definitions = { enable = true }, - smart_rename = { - enable = true, - keymaps = { - smart_rename = "trr", - }, - }, - }, - textobjects = { - select = { - enable = true, - lookahead = true, - keymaps = { - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@conditional.outer", - ["ic"] = "@conditional.inner", - ["al"] = "@loop.outer", - ["il"] = "@loop.inner", - } - } - }, - playground = { - enable = true, - disable = {}, - updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code - persist_queries = false, -- Whether the query persists across vim sessions - keybindings = { - toggle_query_editor = 'o', - toggle_hl_groups = 'i', - toggle_injected_languages = 't', - toggle_anonymous_nodes = 'a', - toggle_language_display = 'I', - focus_language = 'f', - unfocus_language = 'F', - update = 'R', - goto_node = '', - show_help = '?', - }, - } - } - end + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + dependencies = { + "nvim-treesitter/playground", + "nvim-treesitter/nvim-treesitter-refactor", + "nvim-treesitter/nvim-treesitter-textobjects", + }, + config = function() + require("nvim-treesitter.configs").setup { + ensure_installed = { + "php", + "phpdoc", + "vim", + "go", + "gomod", + "css", + "html", + "javascript", + "lua", + "typescript", + "yaml", + "query", + "markdown", + }, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true, + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, + refactor = { + highlight_definitions = { enable = true }, + smart_rename = { + enable = true, + keymaps = { + smart_rename = "trr", + }, + }, + }, + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@conditional.outer", + ["ic"] = "@conditional.inner", + ["al"] = "@loop.outer", + ["il"] = "@loop.inner", + }, + }, + }, + playground = { + enable = true, + disable = {}, + updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code + persist_queries = false, -- Whether the query persists across vim sessions + keybindings = { + toggle_query_editor = "o", + toggle_hl_groups = "i", + toggle_injected_languages = "t", + toggle_anonymous_nodes = "a", + toggle_language_display = "I", + focus_language = "f", + unfocus_language = "F", + update = "R", + goto_node = "", + show_help = "?", + }, + }, + } + end, } diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index 2a08443..6d18659 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -1,6 +1,6 @@ return { - "folke/trouble.nvim", - dependencies = "kyazdani42/nvim-web-devicons", - keys = { { "oo", "TroubleToggle" } }, - config = true, + "folke/trouble.nvim", + dependencies = "kyazdani42/nvim-web-devicons", + keys = { { "oo", "TroubleToggle" } }, + config = true, } diff --git a/lua/plugins/worktree.lua b/lua/plugins/worktree.lua index bd7c923..c3bfd8d 100644 --- a/lua/plugins/worktree.lua +++ b/lua/plugins/worktree.lua @@ -1,11 +1,21 @@ return { - "ThePrimeagen/git-worktree.nvim", - keys = { - { "gt", function() require("telescope").extensions.git_worktree.git_worktrees() end }, - { "gn", function() require("telescope").extensions.git_worktree.create_git_worktree() end }, + "ThePrimeagen/git-worktree.nvim", + keys = { + { + "gt", + function() + require("telescope").extensions.git_worktree.git_worktrees() + end, }, - config = function() - require("git-worktree").setup({}) - require("telescope").load_extension("git_worktree") - end, + { + "gn", + function() + require("telescope").extensions.git_worktree.create_git_worktree() + end, + }, + }, + config = function() + require("git-worktree").setup {} + require("telescope").load_extension "git_worktree" + end, } -- cgit v1.2.3