-rw-r--r-- start/self/plugin/init.lua
1 # neovim lua config 2 3 -- set this early so that theming can be set up 4 vim.opt.termguicolors = true 5 6 -- Initialize lazy.nvim 7 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 8 if not (vim.uv or vim.loop).fs_stat(lazypath) then 9 local lazyrepo = "https://github.com/folke/lazy.nvim.git" 10 local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) 11 if vim.v.shell_error ~= 0 then 12 vim.api.nvim_echo({ 13 { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, 14 { out, "WarningMsg" }, 15 { "\nPress any key to exit..." }, 16 }, true, {}) 17 vim.fn.getchar() 18 os.exit(1) 19 end 20 end 21 vim.opt.rtp:prepend(lazypath) 22 23 -- Make sure to setup `mapleader` and `maplocalleader` before 24 -- loading lazy.nvim so that mappings are correct. 25 -- This is also a good place to setup other settings (vim.opt) 26 vim.g.mapleader = " " 27 vim.g.maplocalleader = "\\" 28 29 -- Setup lazy.nvim 30 require("lazy").setup({ 31 { 32 'catppuccin/nvim', 33 name = "catppuccin", 34 lazy = false, 35 priority = 1000, 36 init = function() 37 vim.cmd [[colorscheme catppuccin-mocha]] 38 end, 39 }, 40 { 41 'nvim-lualine/lualine.nvim', 42 dependencies = { 'nvim-tree/nvim-web-devicons' }, 43 opts = { 44 options = { 45 section_separators = '', 46 component_separators = '', 47 path = 3, 48 }, 49 sections = { 50 lualine_a = {'mode'}, 51 lualine_b = {}, 52 lualine_c = {'filename'}, 53 lualine_x = {'encoding', 'fileformat', 'filetype'}, 54 lualine_y = {'progress'}, 55 lualine_z = {'location'} 56 }, 57 }, 58 }, 59 60 { 61 'Yggdroot/indentLine', 62 init = function() 63 vim.g.indentLine_defaultGroup = 'LineNr' 64 vim.g.indentLine_char_list = {'|', '¦', '┆', '┊'} 65 vim.g.indentLine_conceallevel = 0 66 end 67 }, 68 69 { 'neovimhaskell/haskell-vim' }, 70 71 { 'dense-analysis/ale' }, 72 73 { 74 'hashivim/vim-terraform', 75 init = function() 76 vim.g.terraform_fmt_on_save = 1 77 vim.g.terraform_align = 1 78 end 79 }, 80 81 { 82 'm-col/buffer-closer.nvim', 83 opts = { 84 close_key = '<BS>', 85 }, 86 }, 87 88 { 89 "swaits/zellij-nav.nvim", 90 lazy = true, 91 event = "VeryLazy", 92 keys = { 93 { "<c-h>", "<cmd>ZellijNavigateLeft<cr>", { silent = true, desc = "navigate left" } }, 94 { "<c-j>", "<cmd>ZellijNavigateDown<cr>", { silent = true, desc = "navigate down" } }, 95 { "<c-k>", "<cmd>ZellijNavigateUp<cr>", { silent = true, desc = "navigate up" } }, 96 { "<c-l>", "<cmd>ZellijNavigateRight<cr>", { silent = true, desc = "navigate right" } }, 97 }, 98 opts = {}, 99 }, 100 101 { 102 'nvim-telescope/telescope.nvim', 103 tag = '0.1.8', 104 dependencies = { 'nvim-lua/plenary.nvim' }, 105 opts = { 106 defaults = { 107 mappings = { 108 }, 109 preview = false, 110 }, 111 pickers = { 112 }, 113 extensions = { 114 } 115 }, 116 }, 117 118 { 119 'ctrlpvim/ctrlp.vim', 120 init = function() 121 vim.g.ctrlp_map = '' -- Disable the default <C-p> mapping 122 end, 123 }, 124 125 { 126 'ludovicchabant/vim-gutentags', 127 }, 128 129 { 130 "supermaven-inc/supermaven-nvim", 131 opts = { 132 keymaps = { 133 accept_suggestion = "<Tab>", 134 clear_suggestion = "<S-Tab>", 135 } 136 }, 137 }, 138 139 --{ 140 -- "yetone/avante.nvim", 141 -- event = "VeryLazy", 142 -- version = false, 143 -- opts = { 144 -- provider = "gemini", 145 -- --provider = "claude", 146 -- }, 147 -- behaviour = { 148 -- auto_set_keymaps = false, 149 -- }, 150 -- --hints = { enabled = false }, 151 -- --windows = { 152 -- -- sidebar_header = { enabled = false }, 153 -- --}, 154 -- dependencies = { 155 -- "nvim-treesitter/nvim-treesitter", 156 -- "stevearc/dressing.nvim", 157 -- "nvim-lua/plenary.nvim", 158 -- "MunifTanjim/nui.nvim", 159 -- --- The below dependencies are optional, 160 -- "nvim-telescope/telescope.nvim", -- for file_selector provider telescope 161 -- "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions 162 -- "nvim-tree/nvim-web-devicons", 163 -- { 164 -- -- support for image pasting 165 -- "HakonHarnes/img-clip.nvim", 166 -- event = "VeryLazy", 167 -- opts = { 168 -- default = { 169 -- embed_image_as_base64 = false, 170 -- prompt_for_file_name = false, 171 -- drag_and_drop = { 172 -- insert_mode = true, 173 -- }, 174 -- }, 175 -- }, 176 -- }, 177 -- { 178 -- 'MeanderingProgrammer/render-markdown.nvim', 179 -- opts = { 180 -- file_types = { "Avante" }, 181 -- }, 182 -- ft = { "Avante" }, 183 -- }, 184 -- }, 185 --} 186 }) 187 188 --local colors = require("catppuccin.palettes").get_palette("mocha") 189 --vim.cmd("highlight CursorLine gui=reverse") 190