-- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath, }) end vim.opt.rtp:prepend(lazypath) -- Leader key vim.g.mapleader = " " -- Settings vim.opt.number = true vim.opt.relativenumber = true vim.opt.shiftwidth = 2 vim.opt.tabstop = 2 vim.opt.expandtab = true -- Keybindings local k = vim.keymap.set k({ "n", "v" }, ";", ":") k({ "n", "v" }, "q;", "q:") k({ "n", "v" }, "y", '"+y') k({ "n", "v" }, "Y", '"+Y') k({ "n", "v" }, "p", '"+p') k({ "n", "v" }, "P", '"+P') k("n", "w", "w") k("n", "q", "q") k("n", "", "nohlsearch") k("n", '"', "split") k("n", "%", "vsplit") k("n", "", "h") k("n", "", "j") k("n", "", "k") k("n", "", "l") -- Plugins require("lazy").setup({ { "catppuccin/nvim", version = "^v1.11.0", name = "catppuccin", priority = 1000 }, { "tpope/vim-abolish", version = "^v1.2" }, { "tpope/vim-commentary", version = "^v1.3" }, { "tpope/vim-repeat", version = "^v1.2" }, { "windwp/nvim-autopairs", commit = "c2a0dd0", event = "InsertEnter", config = true, }, { "kylechui/nvim-surround", version = "^3.0.0", event = "VeryLazy", opts = {}, }, { "nvim-telescope/telescope.nvim", version = "^v0.2.1", dependencies = { "nvim-lua/plenary.nvim" }, keys = { { "", "Telescope find_files" }, { "/", "Telescope live_grep" }, }, }, { "nvim-tree/nvim-tree.lua", version = "^1.14.0", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = {}, keys = { { "", "NvimTreeToggle" }, { "fl", "NvimTreeFindFile" }, }, }, { "mason-org/mason-lspconfig.nvim", version = "^v2.1.0", dependencies = { { "mason-org/mason.nvim", version = "^v2.2.1", opts = {} }, { "neovim/nvim-lspconfig", version = "^v2.5.0"} }, opts = {}, }, { "hrsh7th/nvim-cmp", event = "InsertEnter", dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", { "L3MON4D3/LuaSnip", version = "^v2.4.1", build = "make install_jsregexp", }, }, config = function() local cmp = require("cmp") cmp.setup({ snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) end }, sources = { { name = "nvim_lsp" }, { name = "buffer" }, { name = "path" }, }, mapping = { [""] = cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'}), [""] = cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'}), [""] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping(function(fallback) local luasnip = require('luasnip') if cmp.visible() then cmp.confirm({ select = true }) elseif luasnip.expand_or_locally_jumpable() then luasnip.expand_or_jump() else fallback() end end, {'i', 's'}), [""] = cmp.mapping(function(fallback) local luasnip = require('luasnip') if luasnip.locally_jumpable(-1) then luasnip.jump(-1) else fallback() end end, {'i', 's'}), } }) end, }, { "nvim-treesitter/nvim-treesitter", branch = 'master', lazy = false, build = ":TSUpdate", config = function() require('nvim-treesitter.configs').setup({ sync_install = false, auto_install = true, highlight = { enable = true }, indent = { enable = true }, }) end }, { "swaits/zellij-nav.nvim", lazy = true, event = "VeryLazy", keys = { { "", "ZellijNavigateLeftTab", { silent = true, desc = "navigate left or tab" } }, { "", "ZellijNavigateDown", { silent = true, desc = "navigate down" } }, { "", "ZellijNavigateUp", { silent = true, desc = "navigate up" } }, { "", "ZellijNavigateRightTab", { silent = true, desc = "navigate right or tab" } }, }, opts = {}, }, }) vim.cmd.colorscheme "catppuccin"