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

View file

@ -1,7 +1,6 @@
return { return {
"akinsho/bufferline.nvim", "akinsho/bufferline.nvim",
event = "VeryLazy", event = "VeryLazy",
after = "onedark",
keys = { 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>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },

View file

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

View file

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

View file

@ -10,15 +10,6 @@ return {
dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" }, 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", "famiu/bufdelete.nvim",
config = nil, config = nil,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
return { return {
"anuvyklack/pretty-fold.nvim", "anuvyklack/pretty-fold.nvim",
config = { opts = {
sections = { sections = {
left = { left = {
"+", "+",

View file

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

View file

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

View file

@ -7,7 +7,7 @@ return {
keys = { keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous 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>TodoTrouble<cr>", desc = "Find todos (Trouble)" },
{ "<leader>fT", "<cmd>TodoTelescope<cr>", desc = "Todo" }, { "<leader>fT", "<cmd>TodoTelescope<cr>", desc = "Find todos (Telescope)" },
}, },
} }

View file

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

View file

@ -1,20 +1,12 @@
return { return {
{ {
"ckolkey/ts-node-action", "ckolkey/ts-node-action",
dependencies = { "nvim-treesitter", "jose-elias-alvarez/null-ls.nvim" }, dependencies = { "nvim-treesitter" },
event = "VeryLazy",
config = function() config = function()
require("ts-node-action").setup({}) require("ts-node-action").setup({})
vim.keymap.set({ "n" }, "<leader>lA", require("ts-node-action").node_action, { desc = "Node Action" }) 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, 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" 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 -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
set -sg escape-time 0 set -sg escape-time 0
set-option -g focus-events on
## Keybindings ## Keybindings
unbind C-b unbind C-b