cleanup nvim installation

This commit is contained in:
Alexander Navarro 2023-10-26 17:44:19 -03:00
parent a1e32452b3
commit ce4d36de84
17 changed files with 69 additions and 87 deletions

View file

@ -21,7 +21,6 @@
"lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "09be3766669bfbabbe2863c624749d8da392c916" },
"mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" },
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
"mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" },
"mini.clue": { "branch": "main", "commit": "3162debaedf981e96e6db16263fdbcf754f0733b" },
@ -32,7 +31,6 @@
"neogit": { "branch": "master", "commit": "01dc0a7e237a4d6d053cea2503f5dd1a81c1e310" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim": { "branch": "main", "commit": "ea52fe8a0b1e4a820df0d0cf9a6a5a0e18c3eaa0" },
"nvim-bqf": { "branch": "main", "commit": "8784eebf34371049b641646d00232c2603215297" },
"nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" },

View file

@ -1,14 +1,13 @@
return {
"akinsho/bufferline.nvim",
event = "VeryLazy",
after = "onedark",
keys = {
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
{ "<leader>bh", "<Cmd>BufferLineMovePrev<CR>", desc = "Move buffer to right" },
{ "<leader>bl", "<Cmd>BufferLineMoveNext<CR>", desc = "Move buffer to left" },
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev buffer" },
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
{ "<leader>bh", "<Cmd>BufferLineMovePrev<CR>", desc = "Move buffer to right" },
{ "<leader>bl", "<Cmd>BufferLineMoveNext<CR>", desc = "Move buffer to left" },
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev buffer" },
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
},
dependencies = {
{
@ -35,7 +34,7 @@ return {
diagnostics_indicator = function(_, _, diag)
local icons = require("aleidk.constants").icons.diagnostics
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
.. (diag.warning and icons.Warn .. diag.warning or "")
.. (diag.warning and icons.Warn .. diag.warning or "")
return vim.trim(ret)
end,
-- return false to exluce buffers

View file

@ -3,7 +3,7 @@ return {
"echasnovski/mini.comment",
version = "*",
event = "VeryLazy",
depends = {
dependencies = {
{ "nvim-treesitter/nvim-treesitter-context" },
},
opts = {

View file

@ -7,12 +7,14 @@ return {
formatters_by_ft = {
-- Conform will run multiple formatters sequentially
lua = { "stylua" },
python = { "black" },
python = { "blue" },
-- Use a sub-list to run only the first available formatter
javascript = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
css = { { "prettierd", "prettier" } },
sh = { "shfmt" },
-- Use the "_" filetype to run formatters on filetypes that don't
-- have other formatters configured.
["_"] = { "trim_whitespace" },

View file

@ -10,15 +10,6 @@ return {
dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" },
},
{
"jay-babu/mason-null-ls.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"williamboman/mason.nvim",
"jose-elias-alvarez/null-ls.nvim",
},
},
{
"famiu/bufdelete.nvim",
config = nil,

View file

@ -50,7 +50,6 @@ return {
{ mode = "n", keys = "<Leader>b", desc = "+Buffers" },
{ mode = "n", keys = "<Leader>bh", postkeys = "<Leader>b" },
{ mode = "n", keys = "<Leader>bl", postkeys = "<Leader>b" },
{ mode = "n", keys = "<Leader>c", desc = "+Comments" },
{ mode = "n", keys = "<Leader>f", desc = "+Find" },
{ mode = "n", keys = "<Leader>g", desc = "+Git" },
{ mode = "n", keys = "<Leader>l", desc = "+LSP" },
@ -66,10 +65,8 @@ return {
config = {
width = "auto",
},
-- Delay before showing clue window
delay = 200,
-- Keys to scroll inside the clue window
scroll_down = "<C-d>",
scroll_up = "<C-u>",

View file

@ -8,6 +8,8 @@ return {
javascriptreact = { "eslint_d" },
typescriptreact = { "eslint_d" },
-- astro = { "eslint_d" },
python = { "pyright" },
sh = { "shellcheck" },
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {

View file

@ -5,7 +5,6 @@ return {
-- Automatically install LSPs to stdpath for neovim
{ "williamboman/mason.nvim" },
"williamboman/mason-lspconfig.nvim",
-- Additional lua configuration, makes nvim stuff amazing!
{ "folke/neodev.nvim", opts = {} },
},

View file

@ -1,13 +1,12 @@
return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
depends = {
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
opts = function()
local icons = require("aleidk.constants").icons
-- local Util = require("lazyvim.util")
--
local function diff_source()
local gitsigns = vim.b.gitsigns_status_dict
if gitsigns then
@ -69,7 +68,7 @@ return {
},
},
lualine_x = {
{ "require'lsp-status'.status()" },
{},
},
lualine_y = {
{ "location", padding = 0 },

View file

@ -2,9 +2,11 @@ return {
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"typescript-language-server",
"eslint_d",
"shellcheck",
"stylua",
"blue",
"prettierd",
},
},
}

View file

@ -1,42 +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 = " ",
"anuvyklack/pretty-fold.nvim",
opts = {
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",
-- 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.
},
-- 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
},
matchup_patterns = {
{ "{", "}" },
{ "%(", ")" }, -- % to escape lua pattern char
{ "%[", "]" }, -- % to escape lua pattern char
},
ft_ignore = { "neorg" },
},
ft_ignore = { "neorg" },
},
}

View file

@ -90,7 +90,7 @@ return {
end
end
MAP("n", "<Leader>fq", toggle_qf, "Toggle quickfix")
MAP("n", "<Leader>fQ", toggle_qf, "Toggle quickfix")
end,
},
}

View file

@ -53,7 +53,6 @@ return {
-- Find files
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Find buffers" })
vim.keymap.set("n", "<leader>fq", builtin.quickfix, { desc = "Find in quickfix" })
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Find files" })
vim.keymap.set("n", "<leader>fF", function()
builtin.find_files({ hidden = true, no_ignore = true })

View file

@ -3,11 +3,11 @@ return {
cmd = { "TodoTrouble", "TodoTelescope" },
event = { "BufReadPost", "BufNewFile" },
config = true,
-- stylua: ignore
keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
{ "<leader>ft", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
{ "<leader>fT", "<cmd>TodoTelescope<cr>", desc = "Todo" },
},
-- stylua: ignore
keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
{ "<leader>ft", "<cmd>TodoTrouble<cr>", desc = "Find todos (Trouble)" },
{ "<leader>fT", "<cmd>TodoTelescope<cr>", desc = "Find todos (Telescope)" },
},
}

View file

@ -2,6 +2,9 @@ return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
cmd = { "TroubleToggle", "Trouble" },
keys = {
{ "<leader>fq", "<CMD>TroubleToggle<CR>", desc = "Toggle trouble" },
},
config = function()
require("trouble").setup({
mode = "document_diagnostics",
@ -11,7 +14,5 @@ return {
open_tab = "t",
},
})
MAP("n", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
end,
}

View file

@ -1,20 +1,12 @@
return {
{
"ckolkey/ts-node-action",
dependencies = { "nvim-treesitter", "jose-elias-alvarez/null-ls.nvim" },
dependencies = { "nvim-treesitter" },
event = "VeryLazy",
config = function()
require("ts-node-action").setup({})
vim.keymap.set({ "n" }, "<leader>lA", require("ts-node-action").node_action, { desc = "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,
},
{

View file

@ -13,6 +13,7 @@ bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
# set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
set -sg escape-time 0
set-option -g focus-events on
## Keybindings
unbind C-b