remove AstroNvim
This commit is contained in:
parent
014b631646
commit
83ff921920
27 changed files with 0 additions and 884 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,6 +1,3 @@
|
||||||
[submodule "config/AstroNvim"]
|
|
||||||
path = config/Distro-AstroNvim
|
|
||||||
url = https://github.com/AstroNvim/AstroNvim
|
|
||||||
[submodule "config/alacritty/themes/catppuccin"]
|
[submodule "config/alacritty/themes/catppuccin"]
|
||||||
path = config/alacritty/themes/catppuccin
|
path = config/alacritty/themes/catppuccin
|
||||||
url = https://github.com/catppuccin/alacritty.git
|
url = https://github.com/catppuccin/alacritty.git
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit dad0bec1fef2833561d04ea446a544fbfde92539
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
return {
|
|
||||||
colorscheme = "catppuccin",
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
return {
|
|
||||||
rust_analyzer = function(_, opts)
|
|
||||||
require("rust-tools").setup({ server = opts })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,153 +0,0 @@
|
||||||
return {
|
|
||||||
n = {
|
|
||||||
--Usefull vanilla remaps
|
|
||||||
|
|
||||||
["J"] = { "mzJ`z", desc = "Keep cursor in column while joining lines" },
|
|
||||||
--
|
|
||||||
["<C-d>"] = { "<C-d>zz", desc = "Keep cursor centered while junping" },
|
|
||||||
["<C-u>"] = { "<C-u>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"] = "<nop>",
|
|
||||||
-- 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",
|
|
||||||
},
|
|
||||||
["<C-t>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" },
|
|
||||||
["<leader>fn"] = false,
|
|
||||||
["<leader>fo"] = false,
|
|
||||||
["<leader>fh"] = false,
|
|
||||||
["<leader>fb"] = false,
|
|
||||||
["<F10>"] = false,
|
|
||||||
["<F11>"] = false,
|
|
||||||
["<F12>"] = false,
|
|
||||||
["<F1>"] = {
|
|
||||||
function()
|
|
||||||
require("dap").terminate()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Stop",
|
|
||||||
}, -- S-F1
|
|
||||||
["<F2>"] = {
|
|
||||||
function()
|
|
||||||
require("dap").restart_frame()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Restart",
|
|
||||||
},
|
|
||||||
["<F3>"] = {
|
|
||||||
function()
|
|
||||||
require("dap").step_out()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Step Out",
|
|
||||||
},
|
|
||||||
["<F4>"] = {
|
|
||||||
function()
|
|
||||||
require("dap").step_into()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Step Into",
|
|
||||||
},
|
|
||||||
["<F5>"] = {
|
|
||||||
function()
|
|
||||||
require("dap").step_over()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Step Over",
|
|
||||||
},
|
|
||||||
["<F6>"] = {
|
|
||||||
function()
|
|
||||||
require("dap").continue()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Start",
|
|
||||||
},
|
|
||||||
["<F7>"] = {
|
|
||||||
function()
|
|
||||||
require("dap").toggle_breakpoint()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Toggle Breakpoint",
|
|
||||||
},
|
|
||||||
["<leader>DB"] = {
|
|
||||||
function()
|
|
||||||
require("dap").toggle_breakpoint(vim.fn.input("Breakpoint condition: "))
|
|
||||||
end,
|
|
||||||
desc = "Debugger: Toggle Breakpoint with contidion",
|
|
||||||
},
|
|
||||||
["<leader>DD"] = {
|
|
||||||
function()
|
|
||||||
require("dap").clear_breakpoints()
|
|
||||||
end,
|
|
||||||
desc = "Debugger: clear breakpoint",
|
|
||||||
},
|
|
||||||
["<leader>fp"] = {
|
|
||||||
function()
|
|
||||||
require("telescope").extensions.projects.projects()
|
|
||||||
end,
|
|
||||||
desc = "Search project",
|
|
||||||
},
|
|
||||||
["<leader>lj"] = {
|
|
||||||
function()
|
|
||||||
vim.diagnostic.goto_next()
|
|
||||||
end,
|
|
||||||
desc = "Go to next diagnostic",
|
|
||||||
},
|
|
||||||
["<leader>lk"] = {
|
|
||||||
function()
|
|
||||||
vim.diagnostic.goto_prev()
|
|
||||||
end,
|
|
||||||
desc = "Go to prev diagnostic",
|
|
||||||
},
|
|
||||||
["<leader>Ch"] = {
|
|
||||||
function()
|
|
||||||
require("nvim-comment-frame").add_comment()
|
|
||||||
end,
|
|
||||||
desc = "Add a comment frame",
|
|
||||||
},
|
|
||||||
["<leader>CH"] = {
|
|
||||||
function()
|
|
||||||
require("nvim-comment-frame").add_multiline_comment()
|
|
||||||
end,
|
|
||||||
desc = "Add a multiline comment frame",
|
|
||||||
},
|
|
||||||
["<leader>Cd"] = {
|
|
||||||
function()
|
|
||||||
require("neogen").generate()
|
|
||||||
end,
|
|
||||||
desc = "Generate comment docstring",
|
|
||||||
},
|
|
||||||
["<leader>ft"] = {
|
|
||||||
"<cmd>TodoTrouble<CR>",
|
|
||||||
desc = "Search TODOS",
|
|
||||||
},
|
|
||||||
["<leader>r"] = {
|
|
||||||
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
|
|
||||||
desc = "Search and replace current word",
|
|
||||||
},
|
|
||||||
["<leader>R"] = {
|
|
||||||
":%s/",
|
|
||||||
desc = "Search and replace in whole file",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
v = {
|
|
||||||
["<leader>r"] = {
|
|
||||||
":s/",
|
|
||||||
desc = "Search and replace",
|
|
||||||
},
|
|
||||||
["p"] = {
|
|
||||||
[["_dP]],
|
|
||||||
desc = "Paste whitout lossing yanked text",
|
|
||||||
},
|
|
||||||
-- move selection up and down
|
|
||||||
["J"] = ":m '>+1<CR>gv=gv",
|
|
||||||
["K"] = ":m '<-2<CR>gv=gv",
|
|
||||||
},
|
|
||||||
t = {
|
|
||||||
["<C-t>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
return {
|
|
||||||
g = {
|
|
||||||
catppuccin_flavour = "macchiato",
|
|
||||||
},
|
|
||||||
|
|
||||||
opt = {
|
|
||||||
number = true,
|
|
||||||
scrolloff = 15,
|
|
||||||
relativenumber = true,
|
|
||||||
-- spelllang = "en_us,es_cl",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -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", "<leader><leader>" .. 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", "<CMD>Telescope harpoon marks<CR>", "Open marks in telescope")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -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" }, "<Leader>k", function()
|
|
||||||
vim.lsp.buf.signature_help()
|
|
||||||
end, { silent = true, noremap = true, desc = "toggle signature" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
@ -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 = {
|
|
||||||
{
|
|
||||||
"<leader>gn",
|
|
||||||
function()
|
|
||||||
require("neogit").open()
|
|
||||||
end,
|
|
||||||
desc = "Open neogit",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
return {
|
|
||||||
"chrisgrieser/nvim-spider",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
require("spider").setup({
|
|
||||||
skipInsignificantPunctuation = false,
|
|
||||||
})
|
|
||||||
vim.keymap.set({ "n", "o", "x" }, "w", "<cmd>lua require('spider').motion('w')<CR>", { desc = "Spider-w" })
|
|
||||||
vim.keymap.set({ "n", "o", "x" }, "e", "<cmd>lua require('spider').motion('e')<CR>", { desc = "Spider-e" })
|
|
||||||
vim.keymap.set({ "n", "o", "x" }, "b", "<cmd>lua require('spider').motion('b')<CR>", { desc = "Spider-b" })
|
|
||||||
vim.keymap.set({ "n", "o", "x" }, "ge", "<cmd>lua require('spider').motion('ge')<CR>", { desc = "Spider-ge" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -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", "<CR>", 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", "<BS>", 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", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
|
||||||
vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -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" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -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 = {
|
|
||||||
["<C-j>"] = actions.move_selection_next,
|
|
||||||
["<C-k>"] = actions.move_selection_previous,
|
|
||||||
["<C-s>"] = actions.file_vsplit,
|
|
||||||
["<C-v>"] = actions.file_split,
|
|
||||||
["<ESC>"] = actions.close,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
opts.extensions = {
|
|
||||||
undo = {
|
|
||||||
entry_format = "state #$ID, $STAT, $TIME",
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<cr>"] = require("telescope-undo.actions").yank_additions,
|
|
||||||
["<S-cr>"] = require("telescope-undo.actions").yank_deletions,
|
|
||||||
["<C-cr>"] = 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", "<leader>fu", function()
|
|
||||||
telescope.extensions.undo.undo()
|
|
||||||
end, { desc = "Undo tree" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
@ -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 = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
|
||||||
refresh = "r", -- manually refresh
|
|
||||||
jump = { "<cr>", "<tab>" }, -- 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", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -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" }, "<leader>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,
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
@ -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", "<leader>C")
|
|
||||||
|
|
||||||
if require("astronvim.utils").is_available("bufdelete.nvim") then
|
|
||||||
vim.keymap.set("n", "<leader>C", function()
|
|
||||||
alpha_on_bye("Bdelete!")
|
|
||||||
end, { desc = "Close buffer" })
|
|
||||||
else
|
|
||||||
vim.keymap.set("n", "<leader>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
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
return {
|
|
||||||
n = {
|
|
||||||
["<leader>"] = {
|
|
||||||
["C"] = { name = "Comment Stuff" },
|
|
||||||
["<leader>"] = { name = "Harpoon" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue