From 68192521b51f5eb1983b299baa140bf5ad923189 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 15 Aug 2024 18:05:57 +0200 Subject: checkpoint --- after/plugin/harpoon.lua | 32 +++--------- after/plugin/vim-tmux-navigator.lua | 2 +- lua/user/lazy.lua | 100 +++++++++++++++++++++--------------- lua/user/map.lua | 34 ++++++------ 4 files changed, 84 insertions(+), 84 deletions(-) diff --git a/after/plugin/harpoon.lua b/after/plugin/harpoon.lua index f7d522a..466fe8c 100644 --- a/after/plugin/harpoon.lua +++ b/after/plugin/harpoon.lua @@ -4,30 +4,14 @@ local map = vim.keymap.set -- REQUIRED harpoon:setup() -map("n", "", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) -end, { desc = "Check the list of files in harpoon" }) +map("n", "", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) -map("n", " ha", function() - harpoon:list():add() -end, { desc = "Append file to harpoon starred list" }) -map("n", " h1", function() - harpoon:list():select(1) -end, { desc = "Harpoon to 1st file in list" }) -map("n", " h2", function() - harpoon:list():select(2) -end, { desc = "Harpoon to 2nd file in list" }) -map("n", " h3", function() - harpoon:list():select(3) -end, { desc = "Harpoon to 3rd file in list" }) -map("n", " h4", function() - harpoon:list():select(4) -end, { desc = "Harpoon to 4th file in list" }) +map("n", " ha", function() harpoon:list():add() end) +map("n", " h1", function() harpoon:list():select(1) end) +map("n", " h2", function() harpoon:list():select(2) end) +map("n", " h3", function() harpoon:list():select(3) end) +map("n", " h4", function() harpoon:list():select(4) end) -- Toggle previous & next buffers stored within Harpoon list -map("n", " hp", function() - harpoon:list():prev() -end, { desc = "Harpoon to previous file in list" }) -map("n", " hn", function() - harpoon:list():next() -end, { desc = "Harpoon to next file in list" }) +map("n", " hp", function() harpoon:list():prev() end) +map("n", " hn", function() harpoon:list():next() end) diff --git a/after/plugin/vim-tmux-navigator.lua b/after/plugin/vim-tmux-navigator.lua index 0aed3f9..1574080 100644 --- a/after/plugin/vim-tmux-navigator.lua +++ b/after/plugin/vim-tmux-navigator.lua @@ -1,4 +1,4 @@ -vim.cmd("let g:tmux_navigator_no_mappings = 1") +vim.g.tmux_navigator_no_mappings = true vim.keymap.set("n", "", ":TmuxNavigateLeft", { silent = true }) vim.keymap.set("n", "", ":TmuxNavigateDown", { silent = true }) vim.keymap.set("n", "", ":TmuxNavigateUp", { silent = true }) diff --git a/lua/user/lazy.lua b/lua/user/lazy.lua index 6d94783..d676fc9 100644 --- a/lua/user/lazy.lua +++ b/lua/user/lazy.lua @@ -14,45 +14,57 @@ vim.opt.rtp:prepend(lazypath) -- plugins installation and configuration require("lazy").setup({ - -- lsp setup - { - -- LSP Support - "neovim/nvim-lspconfig", - -- lsp download manager - "williamboman/mason.nvim", - -- automatic lsp setup - "williamboman/mason-lspconfig.nvim", - -- additional formater support - "stevearc/conform.nvim", - -- additional linter support - "mfussenegger/nvim-lint", - -- mason autoinstaller for formatter's and linter's - "WhoIsSethDaniel/mason-tool-installer.nvim", - -- minimal snippet's support - "dcampos/nvim-snippy", - -- basic snippet's - "honza/vim-snippets", - -- cmp for autocompletion - "hrsh7th/nvim-cmp", - -- cmp nvim-lsp plugin - "hrsh7th/cmp-nvim-lsp", - -- cmp snippy support - "dcampos/cmp-snippy", - -- path comletion - "hrsh7th/cmp-path", - -- kind icons - "onsails/lspkind.nvim", - -- Minimal neovim modules for a lot of things - "echasnovski/mini.nvim", - -- Adds git related signs to the gutter, as well as utilities for managing changes - "lewis6991/gitsigns.nvim", - -- better ntrw - "tpope/vim-vinegar", - -- integration with tmux keybinds - "christoomey/vim-tmux-navigator", - -- auto close brackets - "m4xshen/autoclose.nvim", - }, + -- lsp setup + { + -- LSP Support + "neovim/nvim-lspconfig", + -- lsp download manager + "williamboman/mason.nvim", + -- automatic lsp setup + "williamboman/mason-lspconfig.nvim", + -- additional formater support + "stevearc/conform.nvim", + -- additional linter support + "mfussenegger/nvim-lint", + -- mason autoinstaller for formatter's and linter's + "WhoIsSethDaniel/mason-tool-installer.nvim", + -- minimal snippet's support + "dcampos/nvim-snippy", + -- basic snippet's + "honza/vim-snippets", + -- cmp for autocompletion + { + "hrsh7th/nvim-cmp", + dependencies = { + -- cmp nvim-lsp plugin + "hrsh7th/cmp-nvim-lsp", + -- path comletion + "hrsh7th/cmp-path", + -- cmp snippy support + "dcampos/cmp-snippy", + }, + }, + -- kind icons + "onsails/lspkind.nvim", + -- Minimal neovim modules for a lot of things + "echasnovski/mini.nvim", + -- Adds git related signs to the gutter, as well as utilities for managing changes + "lewis6991/gitsigns.nvim", + -- better ntrw + "tpope/vim-vinegar", + -- integration with tmux keybinds + "christoomey/vim-tmux-navigator", + -- auto close brackets + "m4xshen/autoclose.nvim", + }, + + { + "dstein64/vim-startuptime", + cmd = "StartupTime", + init = function() + vim.g.startuptime_tries = 10 + end, + }, { "gbprod/nord.nvim", @@ -84,9 +96,6 @@ require("lazy").setup({ vim.cmd.colorscheme("nord") end, }, - install = { - colorscheme = { "nord" }, - }, -- Fuzzy Finder (files, lsp, etc) { @@ -116,6 +125,8 @@ require("lazy").setup({ }, }, }, { + + -- lazy options performance = { rtp = { disabled_plugins = { @@ -127,4 +138,9 @@ require("lazy").setup({ }, }, }, + install = { + colorscheme = { "nord" }, + }, + checker = { enabled = true }, + -- defaults = {lazy = true}, }) diff --git a/lua/user/map.lua b/lua/user/map.lua index a8df1ad..ca4142b 100644 --- a/lua/user/map.lua +++ b/lua/user/map.lua @@ -18,18 +18,18 @@ map("n", "J", "mzJ`z", { desc = "Move up next line with space in between" }) map("x", "p", [["_dP]], { desc = "Paste while keeping the registry" }) -- moving -vim.keymap.set("i", "", "I", { noremap = true }) -vim.keymap.set("i", "", "A", { noremap = true }) -vim.keymap.set("i", "", "D", { noremap = true }) +map("i", "", "I", { noremap = true }) +map("i", "", "A", { noremap = true }) +map("i", "", "D", { noremap = true }) -- buffers -vim.keymap.set("n", "gb", "buffers:buffer", { noremap = true }) -vim.keymap.set("n", "q", "q!", { noremap = true }) -vim.keymap.set("n", "Q", "qa!", { noremap = true }) +map("n", "gb", "buffers:buffer", { noremap = true }) +map("n", "q", "q!", { noremap = true }) +map("n", "Q", "qa!", { noremap = true }) -- close all except focused buffer -vim.keymap.set("n", "1", "%bd|e#", { noremap = true }) +map("n", "1", "%bd|e#", { noremap = true }) -- next tab -vim.keymap.set("n", "+", "tabe .", { noremap = true }) +map("n", "+", "tabe .", { noremap = true }) -- better indenting map("v", "<", "P", [["+p]]) map({ "n", "v" }, "d", [["_d]]) -- templates -vim.keymap.set("n", "rt", ":-1r " .. vim.fn.stdpath("config") .. "/templates", { noremap = true }) +map("n", "rt", ":-1r " .. vim.fn.stdpath("config") .. "/templates", { noremap = true }) -- hide all local s = { hidden_all = 0 } -vim.keymap.set("n", "", function() +map("n", "", function() s.hidden_all = 1 - s.hidden_all local opt = s.hidden_all == 0 vim.opt.showmode = opt @@ -60,17 +60,17 @@ vim.keymap.set("n", "", function() end, { noremap = true }) -- write -vim.keymap.set("n", "w", "write", { noremap = true }) -vim.keymap.set("n", "W", "write!", { noremap = true }) -vim.keymap.set("n", "e", "edit", { noremap = true }) -vim.keymap.set("n", "s", function() +map("n", "w", "write", { noremap = true }) +map("n", "W", "write!", { noremap = true }) +map("n", "e", "edit", { noremap = true }) +map("n", "s", function() vim.cmd.source() print("sourced.") end, { noremap = true }) -- Lazy -vim.keymap.set("n", "P", "Lazy", { noremap = true }) +map("n", "P", "Lazy", { noremap = true }) -- spelling -vim.keymap.set("n", "s", "setlocal spell!", { noremap = true }) -vim.keymap.set("n", "g", "z=1", { noremap = true }) +map("n", "s", "setlocal spell!", { noremap = true }) +map("n", "g", "z=1", { noremap = true }) -- cgit v1.2.3