feat: Initial commit
This commit is contained in:
		
							
								
								
									
										32
									
								
								lua/user/mappings.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								lua/user/mappings.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
				
			|||||||
 | 
					return {
 | 
				
			||||||
 | 
					  -- first key is the mode
 | 
				
			||||||
 | 
					  n = {
 | 
				
			||||||
 | 
					    -- second key is the lefthand side of the map
 | 
				
			||||||
 | 
					    -- mappings seen under group name "Buffer"
 | 
				
			||||||
 | 
					    -- ["<leader>bb"] = { "<cmd>tabnew<cr>", desc = "New tab" },
 | 
				
			||||||
 | 
					    -- ["<leader>bc"] = { "<cmd>BufferLinePickClose<cr>", desc = "Pick to close" },
 | 
				
			||||||
 | 
					    -- ["<leader>bj"] = { "<cmd>BufferLinePick<cr>", desc = "Pick to jump" },
 | 
				
			||||||
 | 
					    -- ["<leader>bt"] = { "<cmd>BufferLineSortByTabs<cr>", desc = "Sort by tabs" },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- Easy buffer navigation
 | 
				
			||||||
 | 
					    ["<tab>"] = { "<cmd>bnext<cr>", desc = "Switch to next buffer" },
 | 
				
			||||||
 | 
					    ["<S-tab>"] = { "<cmd>bprevious<cr>", desc = "Switch to previous buffer" },
 | 
				
			||||||
 | 
					    ["<leader>b>"] = { "<cmd>bprevious<cr>", desc = "Switch to previous buffer" },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- My personal keybindings
 | 
				
			||||||
 | 
					    ["<leader>xb"] = { "<cmd>Neotree toggle buffers left<cr>", desc = "Open neotree buffers" },
 | 
				
			||||||
 | 
					    ["<leader>xt"] = { "<cmd>terminal tig<cr>", desc = "Open tig in a new tab" },
 | 
				
			||||||
 | 
					    ["<leader>tt"] = { "<cmd>terminal tig<cr>", desc = "Open tig in a new tab" },
 | 
				
			||||||
 | 
					    -- quick save
 | 
				
			||||||
 | 
					    -- ["<C-s>"] = { ":w!<cr>", desc = "Save File" },  -- change description but the same command
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  t = {
 | 
				
			||||||
 | 
					    -- setting a mapping to false will disable it
 | 
				
			||||||
 | 
					    -- ["<esc>"] = false,
 | 
				
			||||||
 | 
					    -- Clear Ctrl+l so that we can use it to clear the terminal
 | 
				
			||||||
 | 
					    ["<C-l>"] = false,
 | 
				
			||||||
 | 
					    ["<C-h>"] = false,
 | 
				
			||||||
 | 
					    -- Switch to normal mode in terminal mode
 | 
				
			||||||
 | 
					    ["<Esc><Esc><Esc>"] = { "<C-\\><C-n>" }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										30
									
								
								lua/user/options.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								lua/user/options.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					-- set vim options here (vim.<first_key>.<second_key> = value)
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
					  opt = {
 | 
				
			||||||
 | 
					    relativenumber = false, -- sets vim.opt.relativenumber
 | 
				
			||||||
 | 
					    cmdheight = 1,
 | 
				
			||||||
 | 
					    -- number = true,         -- sets vim.opt.number
 | 
				
			||||||
 | 
					    -- spell = false,         -- sets vim.opt.spell
 | 
				
			||||||
 | 
					    -- signcolumn = "auto",   -- sets vim.opt.signcolumn to auto
 | 
				
			||||||
 | 
					    -- wrap = false,          -- sets vim.opt.wrap
 | 
				
			||||||
 | 
					    scrolloff = 0
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  g = {
 | 
				
			||||||
 | 
					    -- mapleader = " ",                 -- sets vim.g.mapleader
 | 
				
			||||||
 | 
					    -- autoformat_enabled = true,       -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
 | 
				
			||||||
 | 
					    -- cmp_enabled = true,              -- enable completion at start
 | 
				
			||||||
 | 
					    -- autopairs_enabled = true,        -- enable autopairs at start
 | 
				
			||||||
 | 
					    -- diagnostics_mode = 3,            -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
 | 
				
			||||||
 | 
					    -- icons_enabled = true,            -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing)
 | 
				
			||||||
 | 
					    -- ui_notifications_enabled = true, -- disable notifications when toggling UI elements
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					-- If you need more control, you can use the function()...end notation
 | 
				
			||||||
 | 
					-- return function(local_vim)
 | 
				
			||||||
 | 
					--   local_vim.opt.relativenumber = true
 | 
				
			||||||
 | 
					--   local_vim.g.mapleader = " "
 | 
				
			||||||
 | 
					--   local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list
 | 
				
			||||||
 | 
					--   local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list
 | 
				
			||||||
 | 
					--
 | 
				
			||||||
 | 
					--   return local_vim
 | 
				
			||||||
 | 
					-- end
 | 
				
			||||||
							
								
								
									
										8
									
								
								lua/user/plugins/colorschemes.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								lua/user/plugins/colorschemes.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					return {
 | 
				
			||||||
 | 
					  { "arcticicestudio/nord-vim" },
 | 
				
			||||||
 | 
					  { "cocopon/iceberg.vim" },
 | 
				
			||||||
 | 
					  { "jacoborus/tender.vim" },
 | 
				
			||||||
 | 
					  { "altercation/vim-colors-solarized" },
 | 
				
			||||||
 | 
					  { "bluz71/vim-moonfly-colors" },
 | 
				
			||||||
 | 
					  { "joshdick/onedark.vim" },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										35
									
								
								lua/user/plugins/copilot.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								lua/user/plugins/copilot.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					-- Github Copilot
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Official plugin
 | 
				
			||||||
 | 
					-- https://docs.github.com/fr/copilot/getting-started-with-github-copilot?tool=neovim
 | 
				
			||||||
 | 
					-- return {
 | 
				
			||||||
 | 
					--   {
 | 
				
			||||||
 | 
					--     "github/copilot.vim",
 | 
				
			||||||
 | 
					--     config = function()
 | 
				
			||||||
 | 
					--       require("_copilot").setup() -- NOT WORKING
 | 
				
			||||||
 | 
					--     end,
 | 
				
			||||||
 | 
					--     event = "InsertEnter",
 | 
				
			||||||
 | 
					--   },
 | 
				
			||||||
 | 
					-- }
 | 
				
			||||||
 | 
					--
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Alternative plugin in pure lua
 | 
				
			||||||
 | 
					-- https://github.com/zbirenbaum/copilot.lua
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "zbirenbaum/copilot.lua",
 | 
				
			||||||
 | 
					    cmd = "Copilot",
 | 
				
			||||||
 | 
					    event = "InsertEnter",
 | 
				
			||||||
 | 
					    config = function()
 | 
				
			||||||
 | 
					      require("copilot").setup()
 | 
				
			||||||
 | 
					    end,
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  ,
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "zbirenbaum/copilot-cmp",
 | 
				
			||||||
 | 
					    config = function()
 | 
				
			||||||
 | 
					      require("copilot_cmp").setup()
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										9
									
								
								lua/user/plugins/neotree.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								lua/user/plugins/neotree.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					return {
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "nvim-neo-tree/neo-tree.nvim",
 | 
				
			||||||
 | 
					    opts = {
 | 
				
			||||||
 | 
					      close_if_last_window = true,
 | 
				
			||||||
 | 
					      window = { width = 50 },
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										10
									
								
								lua/user/plugins/others.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								lua/user/plugins/others.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					return {
 | 
				
			||||||
 | 
					  { "diepm/vim-rest-console" },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "nvim-pack/nvim-spectre",
 | 
				
			||||||
 | 
					    event = "BufRead",
 | 
				
			||||||
 | 
					    config = function()
 | 
				
			||||||
 | 
					      require("spectre").setup()
 | 
				
			||||||
 | 
					    end,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										11
									
								
								lua/user/plugins/telescope.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								lua/user/plugins/telescope.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					return {
 | 
				
			||||||
 | 
					  "nvim-telescope/telescope.nvim",
 | 
				
			||||||
 | 
					  dependencies = {
 | 
				
			||||||
 | 
					    "nvim-telescope/telescope-file-browser.nvim",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  config = function(...)
 | 
				
			||||||
 | 
					    require "plugins.configs.telescope" (...)
 | 
				
			||||||
 | 
					    local telescope = require "telescope"
 | 
				
			||||||
 | 
					    telescope.load_extension "file_browser"
 | 
				
			||||||
 | 
					  end,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										5
									
								
								lua/user/plugins/tpope.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								lua/user/plugins/tpope.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					return {
 | 
				
			||||||
 | 
					  { "tpope/vim-surround" },
 | 
				
			||||||
 | 
					  { "tpope/vim-speeddating" },
 | 
				
			||||||
 | 
					  { "tpope/vim-repeat" },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user