Compare commits
	
		
			2 commits
		
	
	
		
			337b67c7a4
			...
			818765d45b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 818765d45b | |||
| e1ec30f328 | 
					 3 changed files with 28 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								init.lua
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								init.lua
									
										
									
									
									
								
							| 
						 | 
					@ -21,5 +21,6 @@ require("lazy").setup({ { import = "plugins" } })
 | 
				
			||||||
require("sets")
 | 
					require("sets")
 | 
				
			||||||
require("remaps")
 | 
					require("remaps")
 | 
				
			||||||
require("filetypes")
 | 
					require("filetypes")
 | 
				
			||||||
 | 
					require("commands")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
vim.notify("starting nvim 🏕️")
 | 
					vim.notify("starting nvim 🏕️")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										21
									
								
								lua/commands.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								lua/commands.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					vim.api.nvim_create_user_command("Tabs",
 | 
				
			||||||
 | 
						function(opts)
 | 
				
			||||||
 | 
							vim.bo[0].expandtab = false
 | 
				
			||||||
 | 
							if (opts.fargs[1] ~= nil) then
 | 
				
			||||||
 | 
								vim.bo[0].shiftwidth = tonumber(opts.fargs[1])
 | 
				
			||||||
 | 
								vim.bo[0].tabstop = tonumber(opts.fargs[1])
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						{ nargs = "?" }
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					vim.api.nvim_create_user_command("NoTabs",
 | 
				
			||||||
 | 
						function(opts)
 | 
				
			||||||
 | 
							vim.bo[0].expandtab = true
 | 
				
			||||||
 | 
							if (opts.fargs[1] ~= nil) then
 | 
				
			||||||
 | 
								vim.bo[0].shiftwidth = tonumber(opts.fargs[1])
 | 
				
			||||||
 | 
								vim.bo[0].tabstop = tonumber(opts.fargs[1])
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						{ nargs = "?" }
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
| 
						 | 
					@ -12,5 +12,11 @@ vim.filetype.add({
 | 
				
			||||||
		end,
 | 
							end,
 | 
				
			||||||
		idr = "idris2",
 | 
							idr = "idris2",
 | 
				
			||||||
		wgsl = "wgsl",
 | 
							wgsl = "wgsl",
 | 
				
			||||||
 | 
							nix = function(_, bufnr)
 | 
				
			||||||
 | 
								vim.bo[bufnr].shiftwidth = 2
 | 
				
			||||||
 | 
								vim.bo[bufnr].tabstop = 2
 | 
				
			||||||
 | 
								vim.bo[bufnr].expandtab = true
 | 
				
			||||||
 | 
								return "nix"
 | 
				
			||||||
 | 
							end,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue