Neovim starting configuration
This commit is contained in:
		
							parent
							
								
									7fb61600ad
								
							
						
					
					
						commit
						e1bbb611da
					
				
					 12 changed files with 249 additions and 0 deletions
				
			
		
							
								
								
									
										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