update plugins

This commit is contained in:
Alexander Navarro 2023-05-10 22:21:53 -04:00
parent c080f17b08
commit 195fb5d98d
13 changed files with 204 additions and 32 deletions

View file

@ -0,0 +1,15 @@
return {
"rebelot/heirline.nvim",
-- You can optionally lazy-load heirline on UiEnter
-- to make sure all required plugins and colorschemes are loaded before setup
event = "UiEnter",
config = function()
require("heirline").setup({
statusline = {},
winbar = {},
tabline = {},
statuscolumn = {},
opts = {},
})
end,
}

View file

@ -18,10 +18,10 @@ return {
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ "j-hui/fidget.nvim", opts = {} },
{ "j-hui/fidget.nvim", opts = {} },
-- Additional lua configuration, makes nvim stuff amazing!
{ "folke/neodev.nvim", opts = {} },
{ "folke/neodev.nvim", opts = {} },
},
},
@ -48,4 +48,18 @@ return {
-- "gc" to comment visual regions/lines
{ "numToStr/Comment.nvim", opts = {} },
{
"famiu/bufdelete.nvim",
config = nil,
keys = {
{
"<leader>c",
function()
require("bufdelete").bufdelete(0, true)
end,
desc = "Close buffer",
},
},
},
}

View file

@ -0,0 +1,42 @@
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" },
},
}

View file

@ -3,15 +3,17 @@ return {
"nvim-treesitter/nvim-treesitter",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
"windwp/nvim-ts-autotag",
"JoosepAlviste/nvim-ts-context-commentstring",
},
build = ":TSUpdate",
opts = {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { "c", "cpp", "go", "lua", "python", "rust", "tsx", "typescript", "vimdoc", "vim" },
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
auto_install = true,
highlight = { enable = true },
indent = { enable = true, disable = { "python" } },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
@ -65,5 +67,15 @@ return {
},
},
},
autotag = { enable = true },
context_commentstring = { enable = true, enable_autocmd = false },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
vim.cmd([[
set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr()
set nofoldenable
]])
end,
}

View file

@ -0,0 +1,32 @@
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,
}

View file

@ -0,0 +1,18 @@
return {
"ckolkey/ts-node-action",
dependencies = { "nvim-treesitter", "jose-elias-alvarez/null-ls.nvim" },
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,
}