Neovim starting configuration
This commit is contained in:
		
							parent
							
								
									7fb61600ad
								
							
						
					
					
						commit
						e1bbb611da
					
				
					 12 changed files with 249 additions and 0 deletions
				
			
		
							
								
								
									
										6
									
								
								.config/nvim/.stylua.toml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.config/nvim/.stylua.toml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| column_width = 120 | ||||
| line_endings = "Unix" | ||||
| indent_type = "Spaces" | ||||
| indent_width = 2 | ||||
| quote_style = "AutoPreferDouble" | ||||
| call_parentheses = "None" | ||||
							
								
								
									
										24
									
								
								.config/nvim/LICENSE
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								.config/nvim/LICENSE
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| This is free and unencumbered software released into the public domain. | ||||
| 
 | ||||
| Anyone is free to copy, modify, publish, use, compile, sell, or | ||||
| distribute this software, either in source code form or as a compiled | ||||
| binary, for any purpose, commercial or non-commercial, and by any | ||||
| means. | ||||
| 
 | ||||
| In jurisdictions that recognize copyright laws, the author or authors | ||||
| of this software dedicate any and all copyright interest in the | ||||
| software to the public domain. We make this dedication for the benefit | ||||
| of the public at large and to the detriment of our heirs and | ||||
| successors. We intend this dedication to be an overt act of | ||||
| relinquishment in perpetuity of all present and future rights to this | ||||
| software under copyright law. | ||||
| 
 | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||||
| IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||||
| OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||||
| ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||||
| OTHER DEALINGS IN THE SOFTWARE. | ||||
| 
 | ||||
| For more information, please refer to <https://unlicense.org> | ||||
							
								
								
									
										9
									
								
								.config/nvim/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.config/nvim/README.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| **This repo is supposed to used as config by NvChad users!** | ||||
| 
 | ||||
| - The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. | ||||
| - So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` | ||||
| - So you can delete the .git from this repo ( when you clone it locally ) or fork it :) | ||||
| 
 | ||||
| # Credits | ||||
| 
 | ||||
| 1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! | ||||
							
								
								
									
										37
									
								
								.config/nvim/init.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								.config/nvim/init.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | |||
| vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" | ||||
| vim.g.mapleader = " " | ||||
| 
 | ||||
| -- bootstrap lazy and all plugins | ||||
| local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" | ||||
| 
 | ||||
| if not vim.uv.fs_stat(lazypath) then | ||||
|   local repo = "https://github.com/folke/lazy.nvim.git" | ||||
|   vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } | ||||
| end | ||||
| 
 | ||||
| vim.opt.rtp:prepend(lazypath) | ||||
| 
 | ||||
| local lazy_config = require "configs.lazy" | ||||
| 
 | ||||
| -- load plugins | ||||
| require("lazy").setup({ | ||||
|   { | ||||
|     "NvChad/NvChad", | ||||
|     lazy = false, | ||||
|     branch = "v2.5", | ||||
|     import = "nvchad.plugins", | ||||
|   }, | ||||
| 
 | ||||
|   { import = "plugins" }, | ||||
| }, lazy_config) | ||||
| 
 | ||||
| -- load theme | ||||
| dofile(vim.g.base46_cache .. "defaults") | ||||
| dofile(vim.g.base46_cache .. "statusline") | ||||
| 
 | ||||
| require "options" | ||||
| require "nvchad.autocmds" | ||||
| 
 | ||||
| vim.schedule(function() | ||||
|   require "mappings" | ||||
| end) | ||||
							
								
								
									
										29
									
								
								.config/nvim/lazy-lock.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.config/nvim/lazy-lock.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| { | ||||
|   "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, | ||||
|   "NvChad": { "branch": "v2.5", "commit": "bbc3d43db088c141b142a40cd5f717635833a54e" }, | ||||
|   "base46": { "branch": "v2.5", "commit": "40943fc668bf8f1caa4cc45f71c784cf0d3cc34f" }, | ||||
|   "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, | ||||
|   "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, | ||||
|   "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, | ||||
|   "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, | ||||
|   "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, | ||||
|   "conform.nvim": { "branch": "master", "commit": "e76afe8f7976071fae308e31bf426f557a8ef339" }, | ||||
|   "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, | ||||
|   "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, | ||||
|   "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, | ||||
|   "lazy.nvim": { "branch": "main", "commit": "014d1d6d78df4e58f962158e6e00261d8632612c" }, | ||||
|   "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, | ||||
|   "menu": { "branch": "main", "commit": "657bfc91382c0928453d9a4d0a10ec92db5de2bb" }, | ||||
|   "minty": { "branch": "main", "commit": "6dce9f097667862537823d515a0250ce58faab05" }, | ||||
|   "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, | ||||
|   "nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" }, | ||||
|   "nvim-lspconfig": { "branch": "master", "commit": "b8b725659fa60d2c5f5bd7459bcfee1d8b34acd5" }, | ||||
|   "nvim-tree.lua": { "branch": "master", "commit": "db8d7ac1f524fc6f808764b29fa695c51e014aa6" }, | ||||
|   "nvim-treesitter": { "branch": "master", "commit": "0c26a5c4bc407fdbca545ab25cf6084fd069444b" }, | ||||
|   "nvim-web-devicons": { "branch": "master", "commit": "87c34abe5d1dc7c1c0a95aaaf888059c614c68ac" }, | ||||
|   "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, | ||||
|   "telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" }, | ||||
|   "ui": { "branch": "v3.0", "commit": "19fe47b4ecca1f4e63323ed0c081d21fc9927a36" }, | ||||
|   "volt": { "branch": "main", "commit": "e01090ff27b34288574c24a09cb166e47c4a0c3d" }, | ||||
|   "which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" } | ||||
| } | ||||
							
								
								
									
										17
									
								
								.config/nvim/lua/chadrc.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.config/nvim/lua/chadrc.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| -- This file needs to have same structure as nvconfig.lua  | ||||
| -- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua | ||||
| -- Please read that file to know all available options :(  | ||||
| 
 | ||||
| ---@type ChadrcConfig | ||||
| local M = {} | ||||
| 
 | ||||
| M.base46 = { | ||||
| 	theme = "onedark", | ||||
| 
 | ||||
| 	-- hl_override = { | ||||
| 	-- 	Comment = { italic = true }, | ||||
| 	-- 	["@comment"] = { italic = true }, | ||||
| 	-- }, | ||||
| } | ||||
| 
 | ||||
| return M | ||||
							
								
								
									
										15
									
								
								.config/nvim/lua/configs/conform.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								.config/nvim/lua/configs/conform.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| local options = { | ||||
|   formatters_by_ft = { | ||||
|     lua = { "stylua" }, | ||||
|     -- css = { "prettier" }, | ||||
|     -- html = { "prettier" }, | ||||
|   }, | ||||
| 
 | ||||
|   -- format_on_save = { | ||||
|   --   -- These options will be passed to conform.format() | ||||
|   --   timeout_ms = 500, | ||||
|   --   lsp_fallback = true, | ||||
|   -- }, | ||||
| } | ||||
| 
 | ||||
| return options | ||||
							
								
								
									
										47
									
								
								.config/nvim/lua/configs/lazy.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								.config/nvim/lua/configs/lazy.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,47 @@ | |||
| return { | ||||
|   defaults = { lazy = true }, | ||||
|   install = { colorscheme = { "nvchad" } }, | ||||
| 
 | ||||
|   ui = { | ||||
|     icons = { | ||||
|       ft = "", | ||||
|       lazy = " ", | ||||
|       loaded = "", | ||||
|       not_loaded = "", | ||||
|     }, | ||||
|   }, | ||||
| 
 | ||||
|   performance = { | ||||
|     rtp = { | ||||
|       disabled_plugins = { | ||||
|         "2html_plugin", | ||||
|         "tohtml", | ||||
|         "getscript", | ||||
|         "getscriptPlugin", | ||||
|         "gzip", | ||||
|         "logipat", | ||||
|         "netrw", | ||||
|         "netrwPlugin", | ||||
|         "netrwSettings", | ||||
|         "netrwFileHandlers", | ||||
|         "matchit", | ||||
|         "tar", | ||||
|         "tarPlugin", | ||||
|         "rrhelper", | ||||
|         "spellfile_plugin", | ||||
|         "vimball", | ||||
|         "vimballPlugin", | ||||
|         "zip", | ||||
|         "zipPlugin", | ||||
|         "tutor", | ||||
|         "rplugin", | ||||
|         "syntax", | ||||
|         "synmenu", | ||||
|         "optwin", | ||||
|         "compiler", | ||||
|         "bugreport", | ||||
|         "ftplugin", | ||||
|       }, | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
							
								
								
									
										24
									
								
								.config/nvim/lua/configs/lspconfig.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								.config/nvim/lua/configs/lspconfig.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| -- load defaults i.e lua_lsp | ||||
| require("nvchad.configs.lspconfig").defaults() | ||||
| 
 | ||||
| local lspconfig = require "lspconfig" | ||||
| 
 | ||||
| -- EXAMPLE | ||||
| local servers = { "html", "cssls" } | ||||
| local nvlsp = require "nvchad.configs.lspconfig" | ||||
| 
 | ||||
| -- lsps with default config | ||||
| for _, lsp in ipairs(servers) do | ||||
|   lspconfig[lsp].setup { | ||||
|     on_attach = nvlsp.on_attach, | ||||
|     on_init = nvlsp.on_init, | ||||
|     capabilities = nvlsp.capabilities, | ||||
|   } | ||||
| end | ||||
| 
 | ||||
| -- configuring single server, example: typescript | ||||
| -- lspconfig.ts_ls.setup { | ||||
| --   on_attach = nvlsp.on_attach, | ||||
| --   on_init = nvlsp.on_init, | ||||
| --   capabilities = nvlsp.capabilities, | ||||
| -- } | ||||
							
								
								
									
										10
									
								
								.config/nvim/lua/mappings.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.config/nvim/lua/mappings.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | |||
| require "nvchad.mappings" | ||||
| 
 | ||||
| -- add yours here | ||||
| 
 | ||||
| local map = vim.keymap.set | ||||
| 
 | ||||
| map("n", ";", ":", { desc = "CMD enter command mode" }) | ||||
| map("i", "jk", "<ESC>") | ||||
| 
 | ||||
| -- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>") | ||||
							
								
								
									
										6
									
								
								.config/nvim/lua/options.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.config/nvim/lua/options.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| require "nvchad.options" | ||||
| 
 | ||||
| -- add yours here! | ||||
| 
 | ||||
| -- local o = vim.o | ||||
| -- o.cursorlineopt ='both' -- to enable cursorline! | ||||
							
								
								
									
										25
									
								
								.config/nvim/lua/plugins/init.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.config/nvim/lua/plugins/init.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| return { | ||||
|   { | ||||
|     "stevearc/conform.nvim", | ||||
|     -- event = 'BufWritePre', -- uncomment for format on save | ||||
|     opts = require "configs.conform", | ||||
|   }, | ||||
| 
 | ||||
|   -- These are some examples, uncomment them if you want to see them work! | ||||
|   { | ||||
|     "neovim/nvim-lspconfig", | ||||
|     config = function() | ||||
|       require "configs.lspconfig" | ||||
|     end, | ||||
|   }, | ||||
| 
 | ||||
|   -- { | ||||
|   -- 	"nvim-treesitter/nvim-treesitter", | ||||
|   -- 	opts = { | ||||
|   -- 		ensure_installed = { | ||||
|   -- 			"vim", "lua", "vimdoc", | ||||
|   --      "html", "css" | ||||
|   -- 		}, | ||||
|   -- 	}, | ||||
|   -- }, | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue