From 83ff921920196192f4e94db1aa1f93e7debce649 Mon Sep 17 00:00:00 2001 From: aleidk Date: Fri, 26 Jan 2024 17:16:38 -0300 Subject: [PATCH] remove AstroNvim --- .gitmodules | 3 - config/Distro-AstroNvim | 1 - config/astronvim/lua/user/init.lua | 3 - .../astronvim/lua/user/lsp/setup_handlers.lua | 5 - config/astronvim/lua/user/mappings.lua | 153 ------------------ .../user/mason-nvim-dap/setup_handlers.lua | 22 --- config/astronvim/lua/user/options.lua | 12 -- config/astronvim/lua/user/plugins/alpha.lua | 35 ---- .../astronvim/lua/user/plugins/catppuccin.lua | 74 --------- config/astronvim/lua/user/plugins/harpoon.lua | 69 -------- config/astronvim/lua/user/plugins/init.lua | 61 ------- .../lua/user/plugins/lsp_signature.lua | 15 -- .../lua/user/plugins/mason-lspconfig.lua | 20 --- .../lua/user/plugins/mason-null-ls.lua | 22 --- config/astronvim/lua/user/plugins/neogit.lua | 46 ------ config/astronvim/lua/user/plugins/null-ls.lua | 19 --- .../lua/user/plugins/nvim-spider.lua | 13 -- .../astronvim/lua/user/plugins/nvim-tree.lua | 87 ---------- .../lua/user/plugins/pretty-fold.lua | 42 ----- config/astronvim/lua/user/plugins/qmk.lua | 37 ----- .../astronvim/lua/user/plugins/telescope.lua | 38 ----- .../astronvim/lua/user/plugins/treesitter.lua | 7 - config/astronvim/lua/user/plugins/trouble.lua | 32 ---- .../lua/user/plugins/ts-node-action.lua | 18 --- .../lua/user/plugins/window-picker.lua | 7 - config/astronvim/lua/user/polish.lua | 35 ---- .../astronvim/lua/user/which-key/register.lua | 8 - 27 files changed, 884 deletions(-) delete mode 160000 config/Distro-AstroNvim delete mode 100644 config/astronvim/lua/user/init.lua delete mode 100644 config/astronvim/lua/user/lsp/setup_handlers.lua delete mode 100644 config/astronvim/lua/user/mappings.lua delete mode 100644 config/astronvim/lua/user/mason-nvim-dap/setup_handlers.lua delete mode 100644 config/astronvim/lua/user/options.lua delete mode 100644 config/astronvim/lua/user/plugins/alpha.lua delete mode 100644 config/astronvim/lua/user/plugins/catppuccin.lua delete mode 100644 config/astronvim/lua/user/plugins/harpoon.lua delete mode 100644 config/astronvim/lua/user/plugins/init.lua delete mode 100644 config/astronvim/lua/user/plugins/lsp_signature.lua delete mode 100644 config/astronvim/lua/user/plugins/mason-lspconfig.lua delete mode 100644 config/astronvim/lua/user/plugins/mason-null-ls.lua delete mode 100644 config/astronvim/lua/user/plugins/neogit.lua delete mode 100644 config/astronvim/lua/user/plugins/null-ls.lua delete mode 100644 config/astronvim/lua/user/plugins/nvim-spider.lua delete mode 100644 config/astronvim/lua/user/plugins/nvim-tree.lua delete mode 100644 config/astronvim/lua/user/plugins/pretty-fold.lua delete mode 100644 config/astronvim/lua/user/plugins/qmk.lua delete mode 100644 config/astronvim/lua/user/plugins/telescope.lua delete mode 100644 config/astronvim/lua/user/plugins/treesitter.lua delete mode 100644 config/astronvim/lua/user/plugins/trouble.lua delete mode 100644 config/astronvim/lua/user/plugins/ts-node-action.lua delete mode 100644 config/astronvim/lua/user/plugins/window-picker.lua delete mode 100644 config/astronvim/lua/user/polish.lua delete mode 100644 config/astronvim/lua/user/which-key/register.lua diff --git a/.gitmodules b/.gitmodules index bd0c40d..8417e35 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "config/AstroNvim"] - path = config/Distro-AstroNvim - url = https://github.com/AstroNvim/AstroNvim [submodule "config/alacritty/themes/catppuccin"] path = config/alacritty/themes/catppuccin url = https://github.com/catppuccin/alacritty.git diff --git a/config/Distro-AstroNvim b/config/Distro-AstroNvim deleted file mode 160000 index dad0bec..0000000 --- a/config/Distro-AstroNvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dad0bec1fef2833561d04ea446a544fbfde92539 diff --git a/config/astronvim/lua/user/init.lua b/config/astronvim/lua/user/init.lua deleted file mode 100644 index c2c6518..0000000 --- a/config/astronvim/lua/user/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - colorscheme = "catppuccin", -} diff --git a/config/astronvim/lua/user/lsp/setup_handlers.lua b/config/astronvim/lua/user/lsp/setup_handlers.lua deleted file mode 100644 index 1c3bdfb..0000000 --- a/config/astronvim/lua/user/lsp/setup_handlers.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - rust_analyzer = function(_, opts) - require("rust-tools").setup({ server = opts }) - end, -} diff --git a/config/astronvim/lua/user/mappings.lua b/config/astronvim/lua/user/mappings.lua deleted file mode 100644 index 329e76b..0000000 --- a/config/astronvim/lua/user/mappings.lua +++ /dev/null @@ -1,153 +0,0 @@ -return { - n = { - --Usefull vanilla remaps - - ["J"] = { "mzJ`z", desc = "Keep cursor in column while joining lines" }, - -- - [""] = { "zz", desc = "Keep cursor centered while junping" }, - [""] = { "zz", desc = "Keep cursor centered while junping" }, - -- Keep cursor centered while searching - ["n"] = { "nzzzv", desc = "Keep cursor centered while searching" }, - ["N"] = { "Nzzzv", desc = "Keep cursor centered while searching" }, - ["Q"] = "", - -- 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, - ["fh"] = false, - ["fb"] = false, - [""] = false, - [""] = false, - [""] = false, - [""] = { - function() - require("dap").terminate() - end, - desc = "Debugger: Stop", - }, -- S-F1 - [""] = { - function() - require("dap").restart_frame() - end, - desc = "Debugger: Restart", - }, - [""] = { - function() - require("dap").step_out() - end, - desc = "Debugger: Step Out", - }, - [""] = { - function() - require("dap").step_into() - end, - desc = "Debugger: Step Into", - }, - [""] = { - function() - require("dap").step_over() - end, - desc = "Debugger: Step Over", - }, - [""] = { - function() - require("dap").continue() - end, - desc = "Debugger: Start", - }, - [""] = { - function() - require("dap").toggle_breakpoint() - end, - desc = "Debugger: Toggle Breakpoint", - }, - ["DB"] = { - function() - require("dap").toggle_breakpoint(vim.fn.input("Breakpoint condition: ")) - end, - desc = "Debugger: Toggle Breakpoint with contidion", - }, - ["DD"] = { - function() - require("dap").clear_breakpoints() - end, - desc = "Debugger: clear breakpoint", - }, - ["fp"] = { - function() - require("telescope").extensions.projects.projects() - end, - desc = "Search project", - }, - ["lj"] = { - function() - vim.diagnostic.goto_next() - end, - desc = "Go to next diagnostic", - }, - ["lk"] = { - function() - vim.diagnostic.goto_prev() - end, - desc = "Go to prev diagnostic", - }, - ["Ch"] = { - function() - require("nvim-comment-frame").add_comment() - end, - desc = "Add a comment frame", - }, - ["CH"] = { - function() - require("nvim-comment-frame").add_multiline_comment() - end, - desc = "Add a multiline comment frame", - }, - ["Cd"] = { - function() - require("neogen").generate() - end, - desc = "Generate comment docstring", - }, - ["ft"] = { - "TodoTrouble", - desc = "Search TODOS", - }, - ["r"] = { - [[:%s/\<\>//gI]], - desc = "Search and replace current word", - }, - ["R"] = { - ":%s/", - desc = "Search and replace in whole file", - }, - }, - v = { - ["r"] = { - ":s/", - desc = "Search and replace", - }, - ["p"] = { - [["_dP]], - desc = "Paste whitout lossing yanked text", - }, - -- move selection up and down - ["J"] = ":m '>+1gv=gv", - ["K"] = ":m '<-2gv=gv", - }, - t = { - [""] = { "ToggleTerm", desc = "Toggle terminal" }, - }, -} diff --git a/config/astronvim/lua/user/mason-nvim-dap/setup_handlers.lua b/config/astronvim/lua/user/mason-nvim-dap/setup_handlers.lua deleted file mode 100644 index 6e806f3..0000000 --- a/config/astronvim/lua/user/mason-nvim-dap/setup_handlers.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - firefox = function(source_name) - local dap = require("dap") - dap.adapters.firefox = { - type = "executable", - command = "node", - args = { os.getenv("HOME") .. "/.local/share/nvim/mason/bin/firefox-debug-adapter" }, - } - - dap.configurations.javascriptreact = { - { - name = "Debug with Firefox", - type = "firefox", - request = "launch", - reAttach = true, - url = "http://localhost:3000", - webRoot = "${workspaceFolder}", - firefoxExecutable = "/usr/bin/firefox-developer-edition", - }, - } - end, -} diff --git a/config/astronvim/lua/user/options.lua b/config/astronvim/lua/user/options.lua deleted file mode 100644 index b1a9268..0000000 --- a/config/astronvim/lua/user/options.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - g = { - catppuccin_flavour = "macchiato", - }, - - opt = { - number = true, - scrolloff = 15, - relativenumber = true, - -- spelllang = "en_us,es_cl", - }, -} diff --git a/config/astronvim/lua/user/plugins/alpha.lua b/config/astronvim/lua/user/plugins/alpha.lua deleted file mode 100644 index 0dc3875..0000000 --- a/config/astronvim/lua/user/plugins/alpha.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - "goolord/alpha-nvim", - lazy = false, - 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 deleted file mode 100644 index c01104f..0000000 --- a/config/astronvim/lua/user/plugins/catppuccin.lua +++ /dev/null @@ -1,74 +0,0 @@ -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" }, - }, - }, - 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, - }, - }, -} diff --git a/config/astronvim/lua/user/plugins/harpoon.lua b/config/astronvim/lua/user/plugins/harpoon.lua deleted file mode 100644 index 48c7fa4..0000000 --- a/config/astronvim/lua/user/plugins/harpoon.lua +++ /dev/null @@ -1,69 +0,0 @@ -return { - "ThePrimeagen/harpoon", - lazy = false, - 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, - - -- 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, - - -- 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", - }, - }, - }, - }, - }) - - local mark = require("harpoon.mark") - local ui = require("harpoon.ui") - local telescope = require("telescope") - - telescope.load_extension("harpoon") - - local function map(key, func, desc) - vim.keymap.set("n", "" .. key, func, { desc = desc }) - end - - map("n", mark.add_file, "Add mark") - - map("t", ui.toggle_quick_menu, "Toogle UI") - - 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("l", function() - ui.nav_file(3) - end, "Navigate to file 3") - - map("ñ", function() - ui.nav_file(4) - end, "Navigate to file 4") - - 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 deleted file mode 100644 index 4b4757c..0000000 --- a/config/astronvim/lua/user/plugins/init.lua +++ /dev/null @@ -1,61 +0,0 @@ -return { - { "nvim-neo-tree/neo-tree.nvim", enabled = false }, - { "rcarriga/nvim-notify", enabled = false }, - -- - { - "nvim-treesitter/nvim-treesitter-context", - }, - { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features - }, - { - "s1n7ax/nvim-comment-frame", - dependencies = { "nvim-treesitter" }, - config = { - disable_default_keymap = true, - }, - }, - { - "danymat/neogen", - config = { snippet_engine = "luasnip" }, - dependencies = { "nvim-treesitter/nvim-treesitter" }, - version = "*", -- stable releases - }, - { - "folke/todo-comments.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - }, - { - "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 = lsp.config("rust_analyzer"), -- get the server settings and built in capabilities/on_attach - }) - end, - }, - { - "chrisgrieser/nvim-various-textobjs", - lazy = false, - opts = { useDefaultKeymaps = true }, - }, - { - "RRethy/nvim-treesitter-textsubjects", - lazy = false, - config = function() - require("nvim-treesitter.configs").setup({ - textsubjects = { - enable = true, - prev_selection = ",", -- (Optional) keymap to select the previous selection - keymaps = { - ["."] = "textsubjects-smart", - [";"] = "textsubjects-container-outer", - ["i;"] = "textsubjects-container-inner", - }, - }, - }) - end, - }, -} diff --git a/config/astronvim/lua/user/plugins/lsp_signature.lua b/config/astronvim/lua/user/plugins/lsp_signature.lua deleted file mode 100644 index 778f8e8..0000000 --- a/config/astronvim/lua/user/plugins/lsp_signature.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "ray-x/lsp_signature.nvim", - event = "VeryLazy", - config = function() - local signature_config = { - hint_enable = false, - } - - require("lsp_signature").setup(signature_config) - - vim.keymap.set({ "n" }, "k", function() - vim.lsp.buf.signature_help() - end, { silent = true, noremap = true, desc = "toggle signature" }) - end, -} diff --git a/config/astronvim/lua/user/plugins/mason-lspconfig.lua b/config/astronvim/lua/user/plugins/mason-lspconfig.lua deleted file mode 100644 index bf7123d..0000000 --- a/config/astronvim/lua/user/plugins/mason-lspconfig.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "williamboman/mason-lspconfig.nvim", - config = function(plugin, opts) - opts["ensure_installed"] = { - "bashls", - "cssls", - "dockerls", - "emmet_ls", - "html", - "pyright", - "rust_analyzer", - "sqlls", - "lua_ls", - "tsserver", - "yamlls", - "gitlint", - } - 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 deleted file mode 100644 index b544456..0000000 --- a/config/astronvim/lua/user/plugins/mason-null-ls.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "jay-babu/mason-null-ls.nvim", - config = function(plugin, opts) - opts["ensure_installed"] = { - "blade_formatter", - "blue", - "eslint_d", - "fixjson", - "gitlint", - "intelephense", - "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/neogit.lua b/config/astronvim/lua/user/plugins/neogit.lua deleted file mode 100644 index 2d69a3f..0000000 --- a/config/astronvim/lua/user/plugins/neogit.lua +++ /dev/null @@ -1,46 +0,0 @@ -return { - "TimUntersberger/neogit", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - -- Neogit refreshes its internal state after specific events, which can be expensive depending on the repository size. - -- Disabling `auto_refresh` will make it so you have to manually refresh the status after you open it. - auto_refresh = true, - -- Change the default way of opening neogit - kind = "floating", - -- Change the default way of opening the commit popup - commit_popup = { - kind = "floating", - }, - -- Change the default way of opening the preview buffer - preview_buffer = { - kind = "floating", - }, - -- Change the default way of opening popups - popup = { - kind = "floating", - }, - -- customize displayed signs - signs = { - -- { CLOSED, OPENED } - section = { ">", "v" }, - item = { ">", "v" }, - hunk = { "", "" }, - }, - mappings = { - -- modify status buffer mappings - status = { - ["l"] = "Toggle", - ["h"] = "Close", - }, - }, - }, - keys = { - { - "gn", - function() - require("neogit").open() - end, - desc = "Open neogit", - }, - }, -} diff --git a/config/astronvim/lua/user/plugins/null-ls.lua b/config/astronvim/lua/user/plugins/null-ls.lua deleted file mode 100644 index 28b6e1f..0000000 --- a/config/astronvim/lua/user/plugins/null-ls.lua +++ /dev/null @@ -1,19 +0,0 @@ -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" }, - extra_filetypes = { "astro" }, - }), - - 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-spider.lua b/config/astronvim/lua/user/plugins/nvim-spider.lua deleted file mode 100644 index 2b5b634..0000000 --- a/config/astronvim/lua/user/plugins/nvim-spider.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "chrisgrieser/nvim-spider", - event = "VeryLazy", - config = function() - require("spider").setup({ - skipInsignificantPunctuation = false, - }) - vim.keymap.set({ "n", "o", "x" }, "w", "lua require('spider').motion('w')", { desc = "Spider-w" }) - vim.keymap.set({ "n", "o", "x" }, "e", "lua require('spider').motion('e')", { desc = "Spider-e" }) - vim.keymap.set({ "n", "o", "x" }, "b", "lua require('spider').motion('b')", { desc = "Spider-b" }) - vim.keymap.set({ "n", "o", "x" }, "ge", "lua require('spider').motion('ge')", { desc = "Spider-ge" }) - end, -} diff --git a/config/astronvim/lua/user/plugins/nvim-tree.lua b/config/astronvim/lua/user/plugins/nvim-tree.lua deleted file mode 100644 index 37e73a9..0000000 --- a/config/astronvim/lua/user/plugins/nvim-tree.lua +++ /dev/null @@ -1,87 +0,0 @@ -return { - "nvim-tree/nvim-tree.lua", - enabled = true, - version = "*", - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - lazy = false, - config = function() - local tree = require("nvim-tree") - local api = require("nvim-tree.api") - - 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 % - }, - on_attach = function(bufnr) - local function opts(desc) - return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } - end - - -- Check defaults here: https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach - api.config.mappings.default_on_attach(bufnr) - - vim.keymap.set("n", "l", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "o", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "s", api.node.open.vertical, opts("Open in vsplit")) - vim.keymap.set("n", "v", api.node.open.horizontal, opts("Open in hsplit")) - vim.keymap.set("n", "t", api.node.open.tab, opts("Open in tab")) - vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close dir")) - vim.keymap.set("n", "", api.node.navigate.parent_close, opts("Close dir")) - vim.keymap.set("n", "i", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles")) - vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore")) - end, - }) - - -- 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 - - if not directory then - return - end - - -- create a new, empty buffer - vim.cmd.enew() - - -- wipe the directory buffer - vim.cmd.bw(data.buf) - - -- change to the directory - vim.cmd.cd(data.file) - - -- open the tree - require("nvim-tree.api").tree.open() - end - - 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 }) - end, -} diff --git a/config/astronvim/lua/user/plugins/pretty-fold.lua b/config/astronvim/lua/user/plugins/pretty-fold.lua deleted file mode 100644 index 280dbfc..0000000 --- a/config/astronvim/lua/user/plugins/pretty-fold.lua +++ /dev/null @@ -1,42 +0,0 @@ -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" }, - }, -} diff --git a/config/astronvim/lua/user/plugins/qmk.lua b/config/astronvim/lua/user/plugins/qmk.lua deleted file mode 100644 index e7a0009..0000000 --- a/config/astronvim/lua/user/plugins/qmk.lua +++ /dev/null @@ -1,37 +0,0 @@ -return { - "codethread/qmk.nvim", - ft = "c", - config = { - name = "LAYOUT", - layout = { - "_ x x x x x x _ _ _ x x x x x x", - "_ x x x x x x _ _ _ x x x x x x", - "_ x x x x x x _ _ _ x x x x x x", - "_ x x x x x x x _ x x x x x x x", - "_ _ _ x x x x x _ x x x x x _ _", - }, - comment_preview = { - -- mostly overrides for Spanish Latin American - keymap_overrides = { - KC_SYMBOLS = "Symbols", - KC_SYSTEM = "System", - KC_NUMPAD = "Numpad", - KC_GAME = "Game", - KC_COLEMAK = "Colemak", - KC_QWERTY = "Qwerty", - KC_GRV = "|", - KC_GRAVE = "|", - KC_SCLN = "ñ", - ES_COMM = ",", - ES_DOT = ".", - ES_MINS = "-", - ES_QUOT = "'", - ES_GRV = "´", - ES_IEXL = "?", - ES_LABK = ">", - ES_PLUS = "+", - KC_ALGR = "algr", - }, - }, - }, -} diff --git a/config/astronvim/lua/user/plugins/telescope.lua b/config/astronvim/lua/user/plugins/telescope.lua deleted file mode 100644 index eb9900f..0000000 --- a/config/astronvim/lua/user/plugins/telescope.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - dependencies = { - "debugloop/telescope-undo.nvim", - }, - config = function(plugin, opts) - local actions = require("telescope.actions") - opts.defaults.mappings = { - i = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.file_vsplit, - [""] = actions.file_split, - [""] = actions.close, - }, - } - opts.extensions = { - undo = { - entry_format = "state #$ID, $STAT, $TIME", - mappings = { - i = { - [""] = require("telescope-undo.actions").yank_additions, - [""] = require("telescope-undo.actions").yank_deletions, - [""] = require("telescope-undo.actions").restore, - }, - }, - }, - } - require("plugins.configs.telescope")(plugin, opts) - - -- require telescope and load extensions as necessary - local telescope = require("telescope") - telescope.load_extension("undo") - vim.keymap.set("n", "fu", function() - telescope.extensions.undo.undo() - end, { desc = "Undo tree" }) - end, -} diff --git a/config/astronvim/lua/user/plugins/treesitter.lua b/config/astronvim/lua/user/plugins/treesitter.lua deleted file mode 100644 index 46ca093..0000000 --- a/config/astronvim/lua/user/plugins/treesitter.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "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 deleted file mode 100644 index 57271e1..0000000 --- a/config/astronvim/lua/user/plugins/trouble.lua +++ /dev/null @@ -1,32 +0,0 @@ -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" }) - end, -} diff --git a/config/astronvim/lua/user/plugins/ts-node-action.lua b/config/astronvim/lua/user/plugins/ts-node-action.lua deleted file mode 100644 index 7f84e07..0000000 --- a/config/astronvim/lua/user/plugins/ts-node-action.lua +++ /dev/null @@ -1,18 +0,0 @@ -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" }) - - 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 deleted file mode 100644 index 441c45f..0000000 --- a/config/astronvim/lua/user/plugins/window-picker.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "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 deleted file mode 100644 index b0640cc..0000000 --- a/config/astronvim/lua/user/polish.lua +++ /dev/null @@ -1,35 +0,0 @@ -return function() - local function alpha_on_bye(cmd) - local bufs = vim.fn.getbufinfo({ buflisted = true }) - vim.cmd(cmd) - 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("astronvim.utils").is_available("bufdelete.nvim") then - vim.keymap.set("n", "C", function() - alpha_on_bye("Bdelete!") - end, { desc = "Close buffer" }) - else - vim.keymap.set("n", "C", function() - alpha_on_bye("bdelete!") - end, { desc = "Close buffer" }) - end - - vim.api.nvim_create_autocmd({ - "BufEnter", - "BufAdd", - "BufNew", - "BufNewFile", - "BufWinEnter", - }, { - group = vim.api.nvim_create_augroup("TS_FOLD_WORKAROUND", {}), - callback = function() - vim.opt.foldmethod = "expr" - vim.opt.foldexpr = "nvim_treesitter#foldexpr()" - end, - }) -end diff --git a/config/astronvim/lua/user/which-key/register.lua b/config/astronvim/lua/user/which-key/register.lua deleted file mode 100644 index 96d460d..0000000 --- a/config/astronvim/lua/user/which-key/register.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - n = { - [""] = { - ["C"] = { name = "Comment Stuff" }, - [""] = { name = "Harpoon" }, - }, - }, -}