mirror of
				https://github.com/WarrenHood/dotfiles.git
				synced 2025-11-04 13:18:41 +00:00 
			
		
		
		
	Add Format command to neovim
This commit is contained in:
		
							parent
							
								
									2bb4a47edd
								
							
						
					
					
						commit
						bc7e0a5247
					
				| 
						 | 
					@ -5,3 +5,4 @@ require("warrenhood.mason-config")
 | 
				
			||||||
require("warrenhood.cmp-config")
 | 
					require("warrenhood.cmp-config")
 | 
				
			||||||
require("warrenhood.theme")
 | 
					require("warrenhood.theme")
 | 
				
			||||||
require("warrenhood.keybinds")
 | 
					require("warrenhood.keybinds")
 | 
				
			||||||
 | 
					require("warrenhood.commands")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								neovim/.config/nvim/lua/warrenhood/commands.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								neovim/.config/nvim/lua/warrenhood/commands.lua
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					-- Format file
 | 
				
			||||||
 | 
					vim.cmd "silent! command! Format lua vim.lsp.buf.format()"
 | 
				
			||||||
| 
						 | 
					@ -4,10 +4,14 @@ local g = vim.g
 | 
				
			||||||
-- General stuff
 | 
					-- General stuff
 | 
				
			||||||
o.number = true
 | 
					o.number = true
 | 
				
			||||||
o.relativenumber = true
 | 
					o.relativenumber = true
 | 
				
			||||||
 | 
					o.autoindent = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
o.tabstop = 2 
 | 
					o.tabstop = 4
 | 
				
			||||||
o.shiftwidth = 0
 | 
					o.shiftwidth = 4
 | 
				
			||||||
o.softtabstop = -1
 | 
					o.softtabstop = 4
 | 
				
			||||||
 | 
					o.smartindent = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					o.expandtab = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Make clipboard work with neovim
 | 
					-- Make clipboard work with neovim
 | 
				
			||||||
o.clipboard = 'unnamedplus'
 | 
					o.clipboard = 'unnamedplus'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue