From 68192521b51f5eb1983b299baa140bf5ad923189 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 15 Aug 2024 18:05:57 +0200 Subject: checkpoint --- lua/user/lazy.lua | 100 +++++++++++++++++++++++++++++++----------------------- lua/user/map.lua | 34 +++++++++---------- 2 files changed, 75 insertions(+), 59 deletions(-) (limited to 'lua') 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