summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-08-15 18:05:57 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-08-15 18:05:57 +0200
commit68192521b51f5eb1983b299baa140bf5ad923189 (patch)
tree0f117950811da958750ad3ade8a2af3e06fc75bf /lua
parentc53bda87d0fa6a5cd95595c374215c586bdd7d40 (diff)
checkpoint
Diffstat (limited to 'lua')
-rw-r--r--lua/user/lazy.lua100
-rw-r--r--lua/user/map.lua34
2 files changed, 75 insertions, 59 deletions
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", "<leader>p", [["_dP]], { desc = "Paste while keeping the registry" })
-- moving
-vim.keymap.set("i", "<C-a>", "<C-o>I", { noremap = true })
-vim.keymap.set("i", "<C-e>", "<C-o>A", { noremap = true })
-vim.keymap.set("i", "<C-k>", "<C-o>D", { noremap = true })
+map("i", "<C-a>", "<C-o>I", { noremap = true })
+map("i", "<C-e>", "<C-o>A", { noremap = true })
+map("i", "<C-k>", "<C-o>D", { noremap = true })
-- buffers
-vim.keymap.set("n", "gb", "<cmd>buffers<cr>:buffer<Space>", { noremap = true })
-vim.keymap.set("n", "<Leader>q", "<cmd>q!<cr>", { noremap = true })
-vim.keymap.set("n", "<Leader>Q", "<cmd>qa!<cr>", { noremap = true })
+map("n", "gb", "<cmd>buffers<cr>:buffer<Space>", { noremap = true })
+map("n", "<Leader>q", "<cmd>q!<cr>", { noremap = true })
+map("n", "<Leader>Q", "<cmd>qa!<cr>", { noremap = true })
-- close all except focused buffer
-vim.keymap.set("n", "<leader>1", "<cmd>%bd|e#<cr>", { noremap = true })
+map("n", "<leader>1", "<cmd>%bd|e#<cr>", { noremap = true })
-- next tab
-vim.keymap.set("n", "+", "<cmd>tabe .<cr>", { noremap = true })
+map("n", "+", "<cmd>tabe .<cr>", { noremap = true })
-- better indenting
map("v", "<", "<gv")
@@ -43,11 +43,11 @@ map({ "n", "v" }, "<leader>P", [["+p]])
map({ "n", "v" }, "<leader>d", [["_d]])
-- templates
-vim.keymap.set("n", "<LocalLeader>rt", ":-1r " .. vim.fn.stdpath("config") .. "/templates", { noremap = true })
+map("n", "<LocalLeader>rt", ":-1r " .. vim.fn.stdpath("config") .. "/templates", { noremap = true })
-- hide all
local s = { hidden_all = 0 }
-vim.keymap.set("n", "<C-h>", function()
+map("n", "<C-h>", 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", "<C-h>", function()
end, { noremap = true })
-- write
-vim.keymap.set("n", "<Leader>w", "<cmd>write<cr>", { noremap = true })
-vim.keymap.set("n", "<Leader>W", "<cmd>write!<cr>", { noremap = true })
-vim.keymap.set("n", "<Leader>e", "<cmd>edit<cr>", { noremap = true })
-vim.keymap.set("n", "<LocalLeader>s", function()
+map("n", "<Leader>w", "<cmd>write<cr>", { noremap = true })
+map("n", "<Leader>W", "<cmd>write!<cr>", { noremap = true })
+map("n", "<Leader>e", "<cmd>edit<cr>", { noremap = true })
+map("n", "<LocalLeader>s", function()
vim.cmd.source()
print("sourced.")
end, { noremap = true })
-- Lazy
-vim.keymap.set("n", "<Leader>P", "<cmd>Lazy<cr>", { noremap = true })
+map("n", "<Leader>P", "<cmd>Lazy<cr>", { noremap = true })
-- spelling
-vim.keymap.set("n", "<C-s>s", "<cmd>setlocal spell!<cr>", { noremap = true })
-vim.keymap.set("n", "<C-s>g", "z=1<cr><cr>", { noremap = true })
+map("n", "<C-s>s", "<cmd>setlocal spell!<cr>", { noremap = true })
+map("n", "<C-s>g", "z=1<cr><cr>", { noremap = true })