update astronvim to v3

This commit is contained in:
Alexander Navarro 2023-04-07 17:25:47 -04:00
parent 5ff843d62d
commit 72fe433bc2
19 changed files with 432 additions and 413 deletions

View file

@ -1,5 +1,21 @@
return { return {
n = { 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",
},
["<C-t>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" }, ["<C-t>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" },
["<leader>fn"] = false, ["<leader>fn"] = false,
["<leader>fo"] = false, ["<leader>fo"] = false,

View file

@ -1,31 +1,34 @@
local alpha_button = astronvim.alpha_button
return { return {
layout = { "goolord/alpha-nvim",
{ type = "padding", val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) }) }, opts = function()
{ local dashboard = require("alpha.themes.dashboard")
type = "text", dashboard.section.header.val = {
val = astronvim.user_plugin_opts("header", { " ████ ███ █████ █████ ",
" ████ ███ █████ █████ ", " ░░███ ░░░ ░░███ ░░███ ",
" ░░███ ░░░ ░░███ ░░███ ", " ██████ ░███ ██████ ████ ███████ ░███ █████",
" ██████ ░███ ██████ ████ ███████ ░███ █████", " ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ",
" ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ", " ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ",
" ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ", " ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ",
" ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ", "░░████████ █████░░██████ █████░░████████ ████ █████",
"░░████████ █████░░██████ █████░░████████ ████ █████", " ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ",
" ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ", }
}, false), dashboard.section.header.opts.hl = "DashboardHeader"
opts = { position = "center", hl = "DashboardHeader" },
}, local button = require("astronvim.utils").alpha_button
{ type = "padding", val = 5 }, dashboard.section.buttons.val = {
{ button("LDR f p", " Recent Project "),
type = "group", button("LDR f f", " Find File "),
val = { button("LDR o", "פּ File Explorer "),
alpha_button("LDR f p", " Recent Project "), button("LDR m a", " Bookmarks "),
alpha_button("LDR f f", " Find File "), }
alpha_button("LDR o", "פּ File Explorer "),
alpha_button("LDR m a", " Bookmarks "), dashboard.section.footer.val =
}, { " ", " ", " ", "AstroNvim loaded " .. require("lazy").stats().count .. " plugins " }
opts = { spacing = 1 }, 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,
} }

View file

@ -1,72 +1,74 @@
local catppuccin = require("catppuccin") return {
"catppuccin/nvim",
-- configure it name = "catppuccin",
catppuccin.setup({ -- configure it
transparent_background = true, opts = {
term_colors = false, transparent_background = true,
styles = { term_colors = false,
comments = { "italic" }, styles = {
conditionals = { "italic" }, comments = { "italic" },
loops = { "italic" }, conditionals = { "italic" },
functions = { "italic" }, loops = { "italic" },
keywords = { "italic" }, functions = { "italic" },
strings = { "italic" }, keywords = { "italic" },
variables = { "italic" }, strings = { "italic" },
numbers = {}, variables = { "italic" },
booleans = {}, numbers = {},
properties = {}, booleans = {},
types = {}, properties = {},
operators = {}, types = {},
}, operators = {},
integrations = { },
treesitter = true, integrations = {
native_lsp = { treesitter = true,
enabled = true, native_lsp = {
virtual_text = { enabled = true,
errors = { "italic" }, virtual_text = {
hints = { "italic" }, errors = { "italic" },
warnings = { "italic" }, hints = { "italic" },
information = { "italic" }, warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
}, },
underlines = { lsp_trouble = true,
errors = { "underline" }, cmp = true,
hints = { "underline" }, lsp_saga = true,
warnings = { "underline" }, gitgutter = false,
information = { "underline" }, 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,
}, },
}) }

View file

@ -1,74 +1,68 @@
require("harpoon").setup({ return {
global_settings = { "ThePrimeagen/harpoon",
-- sets the marks upon calling `toggle` on the ui, instead of require `:w`. config = function()
save_on_toggle = true, 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. -- saves the harpoon file upon every change. disabling is unrecommended.
save_on_change = true, save_on_change = true,
-- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`. -- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`.
enter_on_sendcmd = true, enter_on_sendcmd = true,
-- closes any tmux windows harpoon that harpoon creates when you close Neovim. -- closes any tmux windows harpoon that harpoon creates when you close Neovim.
tmux_autoclose_windows = false, tmux_autoclose_windows = false,
-- filetypes that you want to prevent from adding to the harpoon list menu. -- filetypes that you want to prevent from adding to the harpoon list menu.
excluded_filetypes = { "harpoon" }, excluded_filetypes = { "harpoon" },
-- set marks specific to each git branch inside git repository -- set marks specific to each git branch inside git repository
mark_branch = false, mark_branch = false,
}, },
projects = { projects = {
-- Yes $HOME works -- Yes $HOME works
["$HOME/personal/vim-with-me/server"] = { ["$HOME/personal/vim-with-me/server"] = {
term = { term = {
cmds = { cmds = {
"./env && npx ts-node src/index.ts", "./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) local function map(key, func, desc)
vim.keymap.set("n", "<leader><leader>" .. key, func, { desc = desc }) vim.keymap.set("n", "<leader><leader>" .. key, func, { desc = desc })
end 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() map("j", function()
ui.nav_file(1) ui.nav_file(1)
end, "Navigate to file 1") end, "Navigate to file 1")
map("k", function() map("k", function()
ui.nav_file(2) ui.nav_file(2)
end, "Navigate to file 2") end, "Navigate to file 2")
map("l", function() map("l", function()
ui.nav_file(3) ui.nav_file(3)
end, "Navigate to file 3") end, "Navigate to file 3")
map("ñ", function() map("ñ", function()
ui.nav_file(4) ui.nav_file(4)
end, "Navigate to file 4") end, "Navigate to file 4")
map("g", function() map("T", "<CMD>Telescope harpoon marks<CR>", "Open marks in telescope")
local input = vim.fn.input(command_prompt) end,
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", "<CMD>Telescope harpoon marks<CR>", "Open marks in telescope")

View file

@ -1,80 +1,39 @@
return { return {
["/nvim-neo-tree/neo-tree.nvim"] = { disable = true }, { "nvim-neo-tree/neo-tree.nvim", enabled = false },
["rcarriga/nvim-notify"] = { disable = true }, { "rcarriga/nvim-notify", enabled = false },
-- --
["catppuccin/nvim"] = { {
as = "catppuccin", "nvim-treesitter/nvim-treesitter-context",
config = function()
require("user.plugins.catppuccin")
end,
}, },
["nvim-treesitter/nvim-treesitter-context"] = { {
config = function() "kylechui/nvim-surround",
require("treesitter-context").setup() version = "*", -- Use for stability; omit to use `main` branch for the latest features
end,
}, },
["kyazdani42/nvim-tree.lua"] = { {
config = function() "s1n7ax/nvim-comment-frame",
require("user.plugins.nvim-tree") dependencies = { "nvim-treesitter" },
end, config = {
}, disable_default_keymap = true,
["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" },
}, },
config = function()
require("nvim-comment-frame").setup({
disable_default_keymap = true,
})
end,
}, },
["danymat/neogen"] = { {
config = function() "danymat/neogen",
require("neogen").setup({ snippet_engine = "luasnip" }) config = { snippet_engine = "luasnip" },
end, dependencies = { "nvim-treesitter/nvim-treesitter" },
requires = "nvim-treesitter/nvim-treesitter", version = "*", -- stable releases
tag = "*", -- stable releases
}, },
["folke/todo-comments.nvim"] = { {
requires = "nvim-lua/plenary.nvim", "folke/todo-comments.nvim",
config = function() dependencies = { "nvim-lua/plenary.nvim" },
require("todo-comments").setup({})
end,
}, },
["folke/trouble.nvim"] = { {
requires = "kyazdani42/nvim-web-devicons", "simrat39/rust-tools.nvim",
config = function() dependencies = { "mason-lspconfig.nvim" }, -- make sure to load after mason-lspconfig
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
config = function() config = function()
local lsp = require("astronvim.utils.lsp")
require("rust-tools").setup({ 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, 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,
},
} }

View file

@ -1,15 +1,19 @@
return { return {
ensure_installed = { "williamboman/mason-lspconfig.nvim",
"bashls", config = function(plugin, opts)
"cssls", opts["ensure_installed"] = {
"dockerls", "bashls",
"emmet_ls", "cssls",
"html", "dockerls",
"pyright", "emmet_ls",
"rust_analyzer", "html",
"sqlls", "pyright",
"sumneko_lua", "rust_analyzer",
"tsserver", "sqlls",
"yamlls", "sumneko_lua",
}, "tsserver",
"yamlls",
}
require("plugins.configs.mason-lspconfig")(plugin, opts)
end,
} }

View file

@ -1,19 +1,23 @@
return { return {
ensure_installed = { "jay-babu/mason-null-ls.nvim",
"blade_formatter", config = function(plugin, opts)
"blue", opts["ensure_installed"] = {
"eslint_d", "blade_formatter",
"fixjson", "blue",
"gitlint", "eslint_d",
"intelephense", "fixjson",
"luacheck", "gitlint",
"markdownlint", "intelephense",
"php-cs-fixer", "luacheck",
"prettierd", "markdownlint",
"shellcheck", "php-cs-fixer",
"shfmt", "prettierd",
"sql-formatter", "shellcheck",
"stylua", "shfmt",
"yamlint", "sql-formatter",
}, "stylua",
"yamlint",
}
require("plugins.configs.mason-null-ls")(plugin, opts)
end,
} }

View file

@ -1,16 +1,18 @@
return function(config) return {
local null_ls = require("null-ls") "jose-elias-alvarez/null-ls.nvim",
config.sources = { opts = function(opts)
null_ls.builtins.formatting.prettierd.with({ local null_ls = require("null-ls")
disabled_filetypes = { "markdown" }, opts.sources = {
}), null_ls.builtins.formatting.prettierd.with({
disabled_filetypes = { "markdown" },
}),
null_ls.builtins.formatting.phpcsfixer.with({ null_ls.builtins.formatting.phpcsfixer.with({
extra_args = { extra_args = {
"--config", "--config",
"$HOME/.config/php-cs-fixer-conf.php", "$HOME/.config/php-cs-fixer-conf.php",
}, },
}), }),
} }
return config end,
end }

View file

@ -1,71 +1,82 @@
local tree = require("nvim-tree") return {
local tree_cb = require("nvim-tree.config").nvim_tree_callback "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({ tree.setup({
hijack_unnamed_buffer_when_opening = true, hijack_unnamed_buffer_when_opening = true,
disable_netrw = true, disable_netrw = true,
hijack_netrw = true, hijack_netrw = true,
hijack_cursor = true, -- cursor at the start of filename hijack_cursor = true, -- cursor at the start of filename
sync_root_with_cwd = true, sync_root_with_cwd = true,
respect_buf_cwd = true, respect_buf_cwd = true,
update_focused_file = { update_focused_file = {
enable = true, -- focus curren file enable = true, -- focus curren file
update_root = true, 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", "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
-- {key = {"L", "<2-RightMouse>", "<C-]>"}, action = "cd"},
{ key = "s", action = "vsplit" },
{ key = "v", action = "split" },
{ key = "t", action = "tabnew" },
{ key = { "h", "<BS>" }, action = "close_node" },
{ key = "i", action = "toggle_dotfiles" },
{ key = "I", action = "toggle_ignored" },
{ key = { "<C-l>", "<C-CR>" }, cb = tree_cb("system_open") },
}, },
}, 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", "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
-- {key = {"L", "<2-RightMouse>", "<C-]>"}, action = "cd"},
{ key = "s", action = "vsplit" },
{ key = "v", action = "split" },
{ key = "t", action = "tabnew" },
{ key = { "h", "<BS>" }, action = "close_node" },
{ key = "i", action = "toggle_dotfiles" },
{ key = "I", action = "toggle_ignored" },
{ key = { "<C-l>", "<C-CR>" }, 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) local function open_nvim_tree(data)
-- buffer is a directory -- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1 local directory = vim.fn.isdirectory(data.file) == 1
if not directory then if not directory then
return return
end end
-- create a new, empty buffer -- create a new, empty buffer
vim.cmd.enew() vim.cmd.enew()
-- wipe the directory buffer -- wipe the directory buffer
vim.cmd.bw(data.buf) vim.cmd.bw(data.buf)
-- change to the directory -- change to the directory
vim.cmd.cd(data.file) vim.cmd.cd(data.file)
-- open the tree -- open the tree
require("nvim-tree.api").tree.open() require("nvim-tree.api").tree.open()
end end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
-- bindings -- bindings
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true }) 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 }) vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
end,
}

View file

@ -1,39 +1,42 @@
require("pretty-fold").setup({ return {
sections = { "anuvyklack/pretty-fold.nvim",
left = { config = {
"+", sections = {
function() left = {
return string.rep("-", vim.v.foldlevel) "+",
end, function()
" ", return string.rep("-", vim.v.foldlevel)
"content", end,
" ", " ",
"number_of_folded_lines", "content",
" ", " ",
function() "number_of_folded_lines",
return string.rep("-", vim.v.foldlevel) " ",
end, 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" },
})

View file

@ -1,15 +1,16 @@
local telescope_actions = require("telescope.actions")
return { return {
defaults = { "nvim-telescope/telescope.nvim",
mappings = { config = function(plugin, opts)
local actions = require("telescope.actions")
opts.defaults.mappings = {
i = { i = {
["<C-j>"] = telescope_actions.move_selection_next, ["<C-j>"] = actions.move_selection_next,
["<C-k>"] = telescope_actions.move_selection_previous, ["<C-k>"] = actions.move_selection_previous,
["<C-s>"] = telescope_actions.file_vsplit, ["<C-s>"] = actions.file_vsplit,
["<C-v>"] = telescope_actions.file_split, ["<C-v>"] = actions.file_split,
["<ESC>"] = telescope_actions.close, ["<ESC>"] = actions.close,
}, },
}, }
}, require("plugins.configs.telescope")(plugin, opts)
end,
} }

View file

@ -1,3 +1,7 @@
return { 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,
} }

View file

@ -1,26 +1,32 @@
require("trouble").setup({ return {
mode = "document_diagnostics", "folke/trouble.nvim",
action_keys = { -- key mappings for actions in the trouble list -- dependencies = { "kyazdani42/nvim-web-devicons" },
-- map to {} to remove a mapping, for example: config = function()
-- close = {}, require("trouble").setup({
close = "q", -- close the list mode = "document_diagnostics",
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor action_keys = { -- key mappings for actions in the trouble list
refresh = "r", -- manually refresh -- map to {} to remove a mapping, for example:
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds -- close = {},
open_split = { "s" }, -- open buffer in new split close = "q", -- close the list
open_vsplit = { "v" }, -- open buffer in new vsplit cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
open_tab = { "t" }, -- open buffer in new tab refresh = "r", -- manually refresh
jump_close = { "o" }, -- jump to the diagnostic and close the list jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode open_split = { "s" }, -- open buffer in new split
toggle_preview = "P", -- toggle auto_preview open_vsplit = { "v" }, -- open buffer in new vsplit
hover = "K", -- opens a small popup with the full multiline message open_tab = { "t" }, -- open buffer in new tab
preview = "p", -- preview the diagnostic location jump_close = { "o" }, -- jump to the diagnostic and close the list
close_folds = { "zM", "zm" }, -- close all folds toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
open_folds = { "zR", "zr" }, -- open all folds toggle_preview = "P", -- toggle auto_preview
toggle_fold = { "zA", "za" }, -- toggle fold of current file hover = "K", -- opens a small popup with the full multiline message
previous = "k", -- previous item preview = "p", -- preview the diagnostic location
next = "j", -- next item 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" }) vim.keymap.set("n", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
end,
}

View file

@ -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" }, "<leader>lA", require("ts-node-action").node_action, { desc = "Trigger Node Action" }) vim.keymap.set({ "n" }, "<leader>lA", require("ts-node-action").node_action, { desc = "Trigger Node Action" })
require("null-ls").register({ require("null-ls").register({
name = "more_actions", name = "more_actions",
method = { require("null-ls").methods.CODE_ACTION }, method = { require("null-ls").methods.CODE_ACTION },
filetypes = { "_all" }, filetypes = { "_all" },
generator = { generator = {
fn = require("ts-node-action").available_actions, fn = require("ts-node-action").available_actions,
}, },
}) })
end,
}

View file

@ -1,3 +1,7 @@
return { 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,
} }

View file

@ -2,14 +2,14 @@ return function()
local function alpha_on_bye(cmd) local function alpha_on_bye(cmd)
local bufs = vim.fn.getbufinfo({ buflisted = true }) local bufs = vim.fn.getbufinfo({ buflisted = true })
vim.cmd(cmd) 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) require("alpha").start(true)
end end
end end
vim.keymap.del("n", "<leader>C") vim.keymap.del("n", "<leader>C")
if require("core.utils").is_available("bufdelete.nvim") then if require("astronvim.utils").is_available("bufdelete.nvim") then
vim.keymap.set("n", "<leader>C", function() vim.keymap.set("n", "<leader>C", function()
alpha_on_bye("Bdelete!") alpha_on_bye("Bdelete!")
end, { desc = "Close buffer" }) end, { desc = "Close buffer" })

Binary file not shown.

Binary file not shown.

View file

@ -27,5 +27,5 @@ sidebar_config = 1
; DO NOT CHANGE! ; DO NOT CHANGE!
[Backup] [Backup]
version = 1.1.84.716.gc5f8b819 version = 1.2.8.923.g4f94bf0d
with = 2.16.0 with = 2.16.0