diff --git a/config/astronvim/lua/user/mappings.lua b/config/astronvim/lua/user/mappings.lua index 230b7e8..8fa83db 100644 --- a/config/astronvim/lua/user/mappings.lua +++ b/config/astronvim/lua/user/mappings.lua @@ -1,5 +1,21 @@ return { n = { + + -- Buffers + ["H"] = { + + function() + require("astronvim.utils.buffer").nav( -(vim.v.count > 0 and vim.v.count or 1)) + end, + desc = "Previous buffer", + }, + ["L"] = { + function() + require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) + end, + desc = "Next buffer", + }, + [""] = { "ToggleTerm", desc = "Toggle terminal" }, ["fn"] = false, ["fo"] = false, diff --git a/config/astronvim/lua/user/plugins/alpha.lua b/config/astronvim/lua/user/plugins/alpha.lua index a69cc51..5cff61f 100644 --- a/config/astronvim/lua/user/plugins/alpha.lua +++ b/config/astronvim/lua/user/plugins/alpha.lua @@ -1,31 +1,34 @@ -local alpha_button = astronvim.alpha_button return { - layout = { - { type = "padding", val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) }) }, - { - type = "text", - val = astronvim.user_plugin_opts("header", { - " ████ ███ █████ █████ ", - " ░░███ ░░░ ░░███ ░░███ ", - " ██████ ░███ ██████ ████ ███████ ░███ █████", - " ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ", - " ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ", - " ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ", - "░░████████ █████░░██████ █████░░████████ ████ █████", - " ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ", - }, false), - opts = { position = "center", hl = "DashboardHeader" }, - }, - { type = "padding", val = 5 }, - { - type = "group", - val = { - alpha_button("LDR f p", " Recent Project "), - alpha_button("LDR f f", " Find File "), - alpha_button("LDR o", "פּ File Explorer "), - alpha_button("LDR m a", " Bookmarks "), - }, - opts = { spacing = 1 }, - }, - }, + "goolord/alpha-nvim", + opts = function() + local dashboard = require("alpha.themes.dashboard") + dashboard.section.header.val = { + " ████ ███ █████ █████ ", + " ░░███ ░░░ ░░███ ░░███ ", + " ██████ ░███ ██████ ████ ███████ ░███ █████", + " ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ", + " ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ", + " ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ", + "░░████████ █████░░██████ █████░░████████ ████ █████", + " ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ", + } + dashboard.section.header.opts.hl = "DashboardHeader" + + local button = require("astronvim.utils").alpha_button + dashboard.section.buttons.val = { + button("LDR f p", " Recent Project "), + button("LDR f f", " Find File "), + button("LDR o", "פּ File Explorer "), + button("LDR m a", " Bookmarks "), + } + + dashboard.section.footer.val = + { " ", " ", " ", "AstroNvim loaded " .. require("lazy").stats().count .. " plugins " } + dashboard.section.footer.opts.hl = "DashboardFooter" + + dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) }) + dashboard.config.layout[3].val = 5 + dashboard.config.opts.noautocmd = true + return dashboard + end, } diff --git a/config/astronvim/lua/user/plugins/catppuccin.lua b/config/astronvim/lua/user/plugins/catppuccin.lua index e1b7edf..9b89465 100644 --- a/config/astronvim/lua/user/plugins/catppuccin.lua +++ b/config/astronvim/lua/user/plugins/catppuccin.lua @@ -1,72 +1,74 @@ -local catppuccin = require("catppuccin") - --- configure it -catppuccin.setup({ - transparent_background = true, - term_colors = false, - styles = { - comments = { "italic" }, - conditionals = { "italic" }, - loops = { "italic" }, - functions = { "italic" }, - keywords = { "italic" }, - strings = { "italic" }, - variables = { "italic" }, - numbers = {}, - booleans = {}, - properties = {}, - types = {}, - operators = {}, - }, - integrations = { - treesitter = true, - native_lsp = { - enabled = true, - virtual_text = { - errors = { "italic" }, - hints = { "italic" }, - warnings = { "italic" }, - information = { "italic" }, +return { + "catppuccin/nvim", + name = "catppuccin", + -- configure it + opts = { + transparent_background = true, + term_colors = false, + styles = { + comments = { "italic" }, + conditionals = { "italic" }, + loops = { "italic" }, + functions = { "italic" }, + keywords = { "italic" }, + strings = { "italic" }, + variables = { "italic" }, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + }, + integrations = { + treesitter = true, + native_lsp = { + enabled = true, + virtual_text = { + errors = { "italic" }, + hints = { "italic" }, + warnings = { "italic" }, + information = { "italic" }, + }, + underlines = { + errors = { "underline" }, + hints = { "underline" }, + warnings = { "underline" }, + information = { "underline" }, + }, }, - underlines = { - errors = { "underline" }, - hints = { "underline" }, - warnings = { "underline" }, - information = { "underline" }, + lsp_trouble = true, + cmp = true, + lsp_saga = true, + gitgutter = false, + gitsigns = true, + telescope = true, + nvimtree = { + enabled = true, + show_root = true, + transparent_panel = true, }, + indent_blankline = { enabled = true, colored_indent_levels = true }, + neotree = { + enabled = false, + show_root = true, + transparent_panel = false, + }, + dap = { enabled = true, enable_ui = false }, + which_key = true, + dashboard = true, + neogit = true, + vim_sneak = false, + fern = false, + barbar = true, + bufferline = true, + markdown = true, + lightspeed = false, + ts_rainbow = true, + hop = false, + notify = true, + telekasten = false, + symbols_outline = true, + mini = false, }, - lsp_trouble = true, - cmp = true, - lsp_saga = true, - gitgutter = false, - gitsigns = true, - telescope = true, - nvimtree = { - enabled = true, - show_root = true, - transparent_panel = true, - }, - indent_blankline = { enabled = true, colored_indent_levels = true }, - neotree = { - enabled = false, - show_root = true, - transparent_panel = false, - }, - dap = { enabled = false, enable_ui = false }, - which_key = true, - dashboard = true, - neogit = false, - vim_sneak = false, - fern = false, - barbar = true, - bufferline = true, - markdown = true, - lightspeed = false, - ts_rainbow = true, - hop = false, - notify = true, - telekasten = true, - symbols_outline = true, - mini = false, }, -}) +} diff --git a/config/astronvim/lua/user/plugins/harpoon.lua b/config/astronvim/lua/user/plugins/harpoon.lua index f95833e..db6d70c 100644 --- a/config/astronvim/lua/user/plugins/harpoon.lua +++ b/config/astronvim/lua/user/plugins/harpoon.lua @@ -1,74 +1,68 @@ -require("harpoon").setup({ - global_settings = { - -- sets the marks upon calling `toggle` on the ui, instead of require `:w`. - save_on_toggle = true, +return { + "ThePrimeagen/harpoon", + config = function() + require("harpoon").setup({ + global_settings = { + -- sets the marks upon calling `toggle` on the ui, instead of require `:w`. + save_on_toggle = true, - -- saves the harpoon file upon every change. disabling is unrecommended. - save_on_change = true, + -- saves the harpoon file upon every change. disabling is unrecommended. + save_on_change = true, - -- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`. - enter_on_sendcmd = true, + -- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`. + enter_on_sendcmd = true, - -- closes any tmux windows harpoon that harpoon creates when you close Neovim. - tmux_autoclose_windows = false, + -- closes any tmux windows harpoon that harpoon creates when you close Neovim. + tmux_autoclose_windows = false, - -- filetypes that you want to prevent from adding to the harpoon list menu. - excluded_filetypes = { "harpoon" }, + -- filetypes that you want to prevent from adding to the harpoon list menu. + excluded_filetypes = { "harpoon" }, - -- set marks specific to each git branch inside git repository - mark_branch = false, - }, - projects = { - -- Yes $HOME works - ["$HOME/personal/vim-with-me/server"] = { - term = { - cmds = { - "./env && npx ts-node src/index.ts", + -- set marks specific to each git branch inside git repository + mark_branch = false, + }, + projects = { + -- Yes $HOME works + ["$HOME/personal/vim-with-me/server"] = { + term = { + cmds = { + "./env && npx ts-node src/index.ts", + }, + }, }, }, - }, - }, -}) -local mark = require("harpoon.mark") -local ui = require("harpoon.ui") -local tmux = require("harpoon.tmux") -local telescope = require("telescope") + }) -local command_prompt = "Enter command: " + local mark = require("harpoon.mark") + local ui = require("harpoon.ui") + local telescope = require("telescope") -telescope.load_extension("harpoon") + telescope.load_extension("harpoon") -local function map(key, func, desc) - vim.keymap.set("n", "" .. key, func, { desc = desc }) -end + local function map(key, func, desc) + vim.keymap.set("n", "" .. key, func, { desc = desc }) + end -map("n", mark.add_file, "Add mark") + map("n", mark.add_file, "Add mark") -map("t", ui.toggle_quick_menu, "Toogle UI") + map("t", ui.toggle_quick_menu, "Toogle UI") -map("j", function() - ui.nav_file(1) -end, "Navigate to file 1") + map("j", function() + ui.nav_file(1) + end, "Navigate to file 1") -map("k", function() - ui.nav_file(2) -end, "Navigate to file 2") + map("k", function() + ui.nav_file(2) + end, "Navigate to file 2") -map("l", function() - ui.nav_file(3) -end, "Navigate to file 3") + map("l", function() + ui.nav_file(3) + end, "Navigate to file 3") -map("ñ", function() - ui.nav_file(4) -end, "Navigate to file 4") + map("ñ", function() + ui.nav_file(4) + end, "Navigate to file 4") -map("g", function() - local input = vim.fn.input(command_prompt) - tmux.sendCommand("{next}", input) -end, "Send command to tmux pane 1") - -map("G", function() - tmux.sendCommand("{next}", "\3") -end, "Send command to tmux pane 1") - -map("T", "Telescope harpoon marks", "Open marks in telescope") + map("T", "Telescope harpoon marks", "Open marks in telescope") + end, +} diff --git a/config/astronvim/lua/user/plugins/init.lua b/config/astronvim/lua/user/plugins/init.lua index bac5e6f..d0d8aa2 100644 --- a/config/astronvim/lua/user/plugins/init.lua +++ b/config/astronvim/lua/user/plugins/init.lua @@ -1,80 +1,39 @@ return { - ["/nvim-neo-tree/neo-tree.nvim"] = { disable = true }, - ["rcarriga/nvim-notify"] = { disable = true }, + { "nvim-neo-tree/neo-tree.nvim", enabled = false }, + { "rcarriga/nvim-notify", enabled = false }, -- - ["catppuccin/nvim"] = { - as = "catppuccin", - config = function() - require("user.plugins.catppuccin") - end, + { + "nvim-treesitter/nvim-treesitter-context", }, - ["nvim-treesitter/nvim-treesitter-context"] = { - config = function() - require("treesitter-context").setup() - end, + { + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features }, - ["kyazdani42/nvim-tree.lua"] = { - config = function() - require("user.plugins.nvim-tree") - end, - }, - ["kylechui/nvim-surround"] = { - tag = "*", -- Use for stability; omit to use `main` branch for the latest features - config = function() - require("nvim-surround").setup() - end, - }, - ["s1n7ax/nvim-comment-frame"] = { - requires = { - { "nvim-treesitter" }, + { + "s1n7ax/nvim-comment-frame", + dependencies = { "nvim-treesitter" }, + config = { + disable_default_keymap = true, }, - config = function() - require("nvim-comment-frame").setup({ - disable_default_keymap = true, - }) - end, }, - ["danymat/neogen"] = { - config = function() - require("neogen").setup({ snippet_engine = "luasnip" }) - end, - requires = "nvim-treesitter/nvim-treesitter", - tag = "*", -- stable releases + { + "danymat/neogen", + config = { snippet_engine = "luasnip" }, + dependencies = { "nvim-treesitter/nvim-treesitter" }, + version = "*", -- stable releases }, - ["folke/todo-comments.nvim"] = { - requires = "nvim-lua/plenary.nvim", - config = function() - require("todo-comments").setup({}) - end, + { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, }, - ["folke/trouble.nvim"] = { - requires = "kyazdani42/nvim-web-devicons", - config = function() - require("user.plugins.trouble") - end, - }, - ["anuvyklack/pretty-fold.nvim"] = { - config = function() - require("user.plugins.pretty-fold") - end, - }, - ["simrat39/rust-tools.nvim"] = { - after = "mason-lspconfig.nvim", -- make sure to load after mason-lspconfig + { + "simrat39/rust-tools.nvim", + dependencies = { "mason-lspconfig.nvim" }, -- make sure to load after mason-lspconfig config = function() + local lsp = require("astronvim.utils.lsp") require("rust-tools").setup({ - server = astronvim.lsp.server_settings("rust_analyzer"), -- get the server settings and built in capabilities/on_attach + server = lsp.config("rust_analyzer"), -- get the server settings and built in capabilities/on_attach }) end, }, - ["ThePrimeagen/harpoon"] = { - config = function() - require("user.plugins.harpoon") - end, - }, - ["ckolkey/ts-node-action"] = { - requires = { "nvim-treesitter" }, - config = function() - require("user.plugins.ts-node-action") - end, - }, } diff --git a/config/astronvim/lua/user/plugins/mason-lspconfig.lua b/config/astronvim/lua/user/plugins/mason-lspconfig.lua index 78ee80d..b10832e 100644 --- a/config/astronvim/lua/user/plugins/mason-lspconfig.lua +++ b/config/astronvim/lua/user/plugins/mason-lspconfig.lua @@ -1,15 +1,19 @@ return { - ensure_installed = { - "bashls", - "cssls", - "dockerls", - "emmet_ls", - "html", - "pyright", - "rust_analyzer", - "sqlls", - "sumneko_lua", - "tsserver", - "yamlls", - }, + "williamboman/mason-lspconfig.nvim", + config = function(plugin, opts) + opts["ensure_installed"] = { + "bashls", + "cssls", + "dockerls", + "emmet_ls", + "html", + "pyright", + "rust_analyzer", + "sqlls", + "sumneko_lua", + "tsserver", + "yamlls", + } + require("plugins.configs.mason-lspconfig")(plugin, opts) + end, } diff --git a/config/astronvim/lua/user/plugins/mason-null-ls.lua b/config/astronvim/lua/user/plugins/mason-null-ls.lua index f8a9d48..571cf5e 100644 --- a/config/astronvim/lua/user/plugins/mason-null-ls.lua +++ b/config/astronvim/lua/user/plugins/mason-null-ls.lua @@ -1,19 +1,23 @@ return { - ensure_installed = { - "blade_formatter", - "blue", - "eslint_d", - "fixjson", - "gitlint", - "intelephense", - "luacheck", - "markdownlint", - "php-cs-fixer", - "prettierd", - "shellcheck", - "shfmt", - "sql-formatter", - "stylua", - "yamlint", - }, + "jay-babu/mason-null-ls.nvim", + config = function(plugin, opts) + opts["ensure_installed"] = { + "blade_formatter", + "blue", + "eslint_d", + "fixjson", + "gitlint", + "intelephense", + "luacheck", + "markdownlint", + "php-cs-fixer", + "prettierd", + "shellcheck", + "shfmt", + "sql-formatter", + "stylua", + "yamlint", + } + require("plugins.configs.mason-null-ls")(plugin, opts) + end, } diff --git a/config/astronvim/lua/user/plugins/null-ls.lua b/config/astronvim/lua/user/plugins/null-ls.lua index 5d0baa3..fd9a8ae 100644 --- a/config/astronvim/lua/user/plugins/null-ls.lua +++ b/config/astronvim/lua/user/plugins/null-ls.lua @@ -1,16 +1,18 @@ -return function(config) - local null_ls = require("null-ls") - config.sources = { - null_ls.builtins.formatting.prettierd.with({ - disabled_filetypes = { "markdown" }, - }), +return { + "jose-elias-alvarez/null-ls.nvim", + opts = function(opts) + local null_ls = require("null-ls") + opts.sources = { + null_ls.builtins.formatting.prettierd.with({ + disabled_filetypes = { "markdown" }, + }), - null_ls.builtins.formatting.phpcsfixer.with({ - extra_args = { - "--config", - "$HOME/.config/php-cs-fixer-conf.php", - }, - }), - } - return config -end + null_ls.builtins.formatting.phpcsfixer.with({ + extra_args = { + "--config", + "$HOME/.config/php-cs-fixer-conf.php", + }, + }), + } + end, +} diff --git a/config/astronvim/lua/user/plugins/nvim-tree.lua b/config/astronvim/lua/user/plugins/nvim-tree.lua index afcef9f..1e6deb5 100644 --- a/config/astronvim/lua/user/plugins/nvim-tree.lua +++ b/config/astronvim/lua/user/plugins/nvim-tree.lua @@ -1,71 +1,82 @@ -local tree = require("nvim-tree") -local tree_cb = require("nvim-tree.config").nvim_tree_callback +return { + "nvim-tree/nvim-tree.lua", + -- enabled = false, + version = "*", + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + lazy = false, + config = function() + local tree = require("nvim-tree") + local tree_cb = require("nvim-tree.config").nvim_tree_callback -tree.setup({ - hijack_unnamed_buffer_when_opening = true, - disable_netrw = true, - hijack_netrw = true, - hijack_cursor = true, -- cursor at the start of filename - sync_root_with_cwd = true, - respect_buf_cwd = true, - update_focused_file = { - enable = true, -- focus curren file - update_root = true, - }, - actions = { open_file = { quit_on_open = true } }, - renderer = { - full_name = true, -- show remaining name in floating text - group_empty = true, -- group empty folders - add_trailing = true, -- Trailing slash to folders - highlight_opened_files = "all", - highlight_git = true, - }, - view = { - centralize_selection = true, -- center current file on enter - width = 30, -- N° of columns or % - mappings = { - custom_only = false, - -- list of mappings to set on the tree manually - list = { - { key = { "l", "", "o", "<2-LeftMouse>" }, action = "edit" }, - -- {key = {"L", "<2-RightMouse>", ""}, action = "cd"}, - { key = "s", action = "vsplit" }, - { key = "v", action = "split" }, - { key = "t", action = "tabnew" }, - { key = { "h", "" }, action = "close_node" }, - { key = "i", action = "toggle_dotfiles" }, - { key = "I", action = "toggle_ignored" }, - { key = { "", "" }, cb = tree_cb("system_open") }, + tree.setup({ + hijack_unnamed_buffer_when_opening = true, + disable_netrw = true, + hijack_netrw = true, + hijack_cursor = true, -- cursor at the start of filename + sync_root_with_cwd = true, + respect_buf_cwd = true, + update_focused_file = { + enable = true, -- focus curren file + update_root = true, }, - }, - }, -}) + actions = { open_file = { quit_on_open = true } }, + renderer = { + full_name = true, -- show remaining name in floating text + group_empty = true, -- group empty folders + add_trailing = true, -- Trailing slash to folders + highlight_opened_files = "all", + highlight_git = true, + }, + view = { + centralize_selection = true, -- center current file on enter + width = 30, -- N° of columns or % + mappings = { + custom_only = false, + -- list of mappings to set on the tree manually + list = { + { key = { "l", "", "o", "<2-LeftMouse>" }, action = "edit" }, + -- {key = {"L", "<2-RightMouse>", ""}, action = "cd"}, + { key = "s", action = "vsplit" }, + { key = "v", action = "split" }, + { key = "t", action = "tabnew" }, + { key = { "h", "" }, action = "close_node" }, + { key = "i", action = "toggle_dotfiles" }, + { key = "I", action = "toggle_ignored" }, + { key = { "", "" }, cb = tree_cb("system_open") }, + }, + }, + }, + }) --- Auto open when a dir is opened + -- Auto open when a dir is opened -local function open_nvim_tree(data) - -- buffer is a directory - local directory = vim.fn.isdirectory(data.file) == 1 + local function open_nvim_tree(data) + -- buffer is a directory + local directory = vim.fn.isdirectory(data.file) == 1 - if not directory then - return - end + if not directory then + return + end - -- create a new, empty buffer - vim.cmd.enew() + -- create a new, empty buffer + vim.cmd.enew() - -- wipe the directory buffer - vim.cmd.bw(data.buf) + -- wipe the directory buffer + vim.cmd.bw(data.buf) - -- change to the directory - vim.cmd.cd(data.file) + -- change to the directory + vim.cmd.cd(data.file) - -- open the tree - require("nvim-tree.api").tree.open() -end + -- open the tree + require("nvim-tree.api").tree.open() + end -vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) + vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) --- bindings -vim.keymap.set("n", "e", ":NvimTreeToggle", { desc = "Toggle file tree", silent = true }) -vim.keymap.set("n", "", ":NvimTreeToggle", { desc = "Toggle file tree", silent = true }) + -- bindings + vim.keymap.set("n", "e", ":NvimTreeToggle", { desc = "Toggle file tree", silent = true }) + vim.keymap.set("n", "", ":NvimTreeToggle", { desc = "Toggle file tree", silent = true }) + end, +} diff --git a/config/astronvim/lua/user/plugins/pretty-fold.lua b/config/astronvim/lua/user/plugins/pretty-fold.lua index b5d2178..280dbfc 100644 --- a/config/astronvim/lua/user/plugins/pretty-fold.lua +++ b/config/astronvim/lua/user/plugins/pretty-fold.lua @@ -1,39 +1,42 @@ -require("pretty-fold").setup({ - sections = { - left = { - "+", - function() - return string.rep("-", vim.v.foldlevel) - end, - " ", - "content", - " ", - "number_of_folded_lines", - " ", - function() - return string.rep("-", vim.v.foldlevel) - end, - "+", +return { + "anuvyklack/pretty-fold.nvim", + config = { + sections = { + left = { + "+", + function() + return string.rep("-", vim.v.foldlevel) + end, + " ", + "content", + " ", + "number_of_folded_lines", + " ", + function() + return string.rep("-", vim.v.foldlevel) + end, + "+", + }, }, + fill_char = " ", + + -- Possible values: + -- "delete" : Delete all comment signs from the fold string. + -- "spaces" : Replace all comment signs with equal number of spaces. + -- false : Do nothing with comment signs. + process_comment_signs = "delete", + + -- List of patterns that will be removed from content foldtext section. + stop_words = { + "@brief%s*", -- (for C++) Remove '@brief' and all spaces after. + }, + + matchup_patterns = { + { "{", "}" }, + { "%(", ")" }, -- % to escape lua pattern char + { "%[", "]" }, -- % to escape lua pattern char + }, + + ft_ignore = { "neorg" }, }, - fill_char = " ", - - -- Possible values: - -- "delete" : Delete all comment signs from the fold string. - -- "spaces" : Replace all comment signs with equal number of spaces. - -- false : Do nothing with comment signs. - process_comment_signs = "delete", - - -- List of patterns that will be removed from content foldtext section. - stop_words = { - "@brief%s*", -- (for C++) Remove '@brief' and all spaces after. - }, - - matchup_patterns = { - { "{", "}" }, - { "%(", ")" }, -- % to escape lua pattern char - { "%[", "]" }, -- % to escape lua pattern char - }, - - ft_ignore = { "neorg" }, -}) +} diff --git a/config/astronvim/lua/user/plugins/telescope.lua b/config/astronvim/lua/user/plugins/telescope.lua index 3abdb46..5e920d9 100644 --- a/config/astronvim/lua/user/plugins/telescope.lua +++ b/config/astronvim/lua/user/plugins/telescope.lua @@ -1,15 +1,16 @@ -local telescope_actions = require("telescope.actions") - return { - defaults = { - mappings = { + "nvim-telescope/telescope.nvim", + config = function(plugin, opts) + local actions = require("telescope.actions") + opts.defaults.mappings = { i = { - [""] = telescope_actions.move_selection_next, - [""] = telescope_actions.move_selection_previous, - [""] = telescope_actions.file_vsplit, - [""] = telescope_actions.file_split, - [""] = telescope_actions.close, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.file_vsplit, + [""] = actions.file_split, + [""] = actions.close, }, - }, - }, + } + require("plugins.configs.telescope")(plugin, opts) + end, } diff --git a/config/astronvim/lua/user/plugins/treesitter.lua b/config/astronvim/lua/user/plugins/treesitter.lua index fdd30fc..46ca093 100644 --- a/config/astronvim/lua/user/plugins/treesitter.lua +++ b/config/astronvim/lua/user/plugins/treesitter.lua @@ -1,3 +1,7 @@ return { - ensure_installed = { "javascript", "typescript", "php", "python", "lua", "bash", "sql", "yaml", "json" }, + "nvim-treesitter/nvim-treesitter", + config = function(plugin, opts) + opts.ensure_installed = { "javascript", "typescript", "php", "python", "lua", "bash", "sql", "yaml", "json" } + require("plugins.configs.nvim-treesitter")(plugin, opts) + end, } diff --git a/config/astronvim/lua/user/plugins/trouble.lua b/config/astronvim/lua/user/plugins/trouble.lua index 1a6a895..57271e1 100644 --- a/config/astronvim/lua/user/plugins/trouble.lua +++ b/config/astronvim/lua/user/plugins/trouble.lua @@ -1,26 +1,32 @@ -require("trouble").setup({ - mode = "document_diagnostics", - action_keys = { -- key mappings for actions in the trouble list - -- map to {} to remove a mapping, for example: - -- close = {}, - close = "q", -- close the list - cancel = "", -- cancel the preview and get back to your last window / buffer / cursor - refresh = "r", -- manually refresh - jump = { "", "" }, -- jump to the diagnostic or open / close folds - open_split = { "s" }, -- open buffer in new split - open_vsplit = { "v" }, -- open buffer in new vsplit - open_tab = { "t" }, -- open buffer in new tab - jump_close = { "o" }, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location - close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds - toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- previous item - next = "j", -- next item - }, -}) +return { + "folke/trouble.nvim", + -- dependencies = { "kyazdani42/nvim-web-devicons" }, + config = function() + require("trouble").setup({ + mode = "document_diagnostics", + action_keys = { -- key mappings for actions in the trouble list + -- map to {} to remove a mapping, for example: + -- close = {}, + close = "q", -- close the list + cancel = "", -- cancel the preview and get back to your last window / buffer / cursor + refresh = "r", -- manually refresh + jump = { "", "" }, -- jump to the diagnostic or open / close folds + open_split = { "s" }, -- open buffer in new split + open_vsplit = { "v" }, -- open buffer in new vsplit + open_tab = { "t" }, -- open buffer in new tab + jump_close = { "o" }, -- jump to the diagnostic and close the list + toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode + toggle_preview = "P", -- toggle auto_preview + hover = "K", -- opens a small popup with the full multiline message + preview = "p", -- preview the diagnostic location + close_folds = { "zM", "zm" }, -- close all folds + open_folds = { "zR", "zr" }, -- open all folds + toggle_fold = { "zA", "za" }, -- toggle fold of current file + previous = "k", -- previous item + next = "j", -- next item + }, + }) -vim.keymap.set("n", "fd", "TroubleToggle", { silent = true, desc = "Search diagnostics" }) + vim.keymap.set("n", "fd", "TroubleToggle", { silent = true, desc = "Search diagnostics" }) + end, +} diff --git a/config/astronvim/lua/user/plugins/ts-node-action.lua b/config/astronvim/lua/user/plugins/ts-node-action.lua index 027df0b..7f84e07 100644 --- a/config/astronvim/lua/user/plugins/ts-node-action.lua +++ b/config/astronvim/lua/user/plugins/ts-node-action.lua @@ -1,12 +1,18 @@ -require("ts-node-action").setup({}) +return { + "ckolkey/ts-node-action", + dependencies = { "nvim-treesitter", "null-ls" }, + config = function() + require("ts-node-action").setup({}) -vim.keymap.set({ "n" }, "lA", require("ts-node-action").node_action, { desc = "Trigger Node Action" }) + vim.keymap.set({ "n" }, "lA", require("ts-node-action").node_action, { desc = "Trigger Node Action" }) -require("null-ls").register({ - name = "more_actions", - method = { require("null-ls").methods.CODE_ACTION }, - filetypes = { "_all" }, - generator = { - fn = require("ts-node-action").available_actions, - }, -}) + require("null-ls").register({ + name = "more_actions", + method = { require("null-ls").methods.CODE_ACTION }, + filetypes = { "_all" }, + generator = { + fn = require("ts-node-action").available_actions, + }, + }) + end, +} diff --git a/config/astronvim/lua/user/plugins/window-picker.lua b/config/astronvim/lua/user/plugins/window-picker.lua index 333e31d..441c45f 100644 --- a/config/astronvim/lua/user/plugins/window-picker.lua +++ b/config/astronvim/lua/user/plugins/window-picker.lua @@ -1,3 +1,7 @@ return { - use_winbar = "always", + "s1n7ax/nvim-window-picker", + config = function(plugin, opts) + opts.use_winbar = "always" + require("plugins.configs.nvim-window-picker")(plugin, opts) + end, } diff --git a/config/astronvim/lua/user/polish.lua b/config/astronvim/lua/user/polish.lua index 2b2b4d2..b0640cc 100644 --- a/config/astronvim/lua/user/polish.lua +++ b/config/astronvim/lua/user/polish.lua @@ -2,14 +2,14 @@ return function() local function alpha_on_bye(cmd) local bufs = vim.fn.getbufinfo({ buflisted = true }) vim.cmd(cmd) - if require("core.utils").is_available("alpha-nvim") and not bufs[2] then + if require("astronvim.utils").is_available("alpha-nvim") and not bufs[2] then require("alpha").start(true) end end vim.keymap.del("n", "C") - if require("core.utils").is_available("bufdelete.nvim") then + if require("astronvim.utils").is_available("bufdelete.nvim") then vim.keymap.set("n", "C", function() alpha_on_bye("Bdelete!") end, { desc = "Close buffer" }) diff --git a/config/spicetify/Backup/login.spa b/config/spicetify/Backup/login.spa index 802e714..66843e2 100755 Binary files a/config/spicetify/Backup/login.spa and b/config/spicetify/Backup/login.spa differ diff --git a/config/spicetify/Backup/xpui.spa b/config/spicetify/Backup/xpui.spa index 5bc53fc..f664168 100755 Binary files a/config/spicetify/Backup/xpui.spa and b/config/spicetify/Backup/xpui.spa differ diff --git a/config/spicetify/config-xpui.ini b/config/spicetify/config-xpui.ini index fc8dfb9..b50fd25 100644 --- a/config/spicetify/config-xpui.ini +++ b/config/spicetify/config-xpui.ini @@ -27,5 +27,5 @@ sidebar_config = 1 ; DO NOT CHANGE! [Backup] -version = 1.1.84.716.gc5f8b819 +version = 1.2.8.923.g4f94bf0d with = 2.16.0