feat(initial): add all dotfiles
This commit is contained in:
		
							
								
								
									
										33
									
								
								nvim/lua/olinpin/plugins/null-ls.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								nvim/lua/olinpin/plugins/null-ls.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| return { | ||||
|     "jay-babu/mason-null-ls.nvim", | ||||
|     event = { "BufReadPre", "BufNewFile" }, | ||||
|     dependencies = { | ||||
|         "williamboman/mason.nvim", | ||||
|         "jose-elias-alvarez/null-ls.nvim", | ||||
|     }, | ||||
|     config = function () | ||||
|  | ||||
|         require("mason-null-ls").setup({ | ||||
|             ensure_installed = { | ||||
|                 "stylua", | ||||
|                 "jq", | ||||
|                 "php-cs-fixer", | ||||
|                 "intelephense", | ||||
|                 "black", | ||||
|                 "prettier", | ||||
|             } | ||||
|         }) | ||||
|  | ||||
|         local null_ls = require("null-ls") | ||||
|         local format = null_ls.builtins.formatting | ||||
|  | ||||
|         null_ls.setup({ | ||||
|             sources = { | ||||
|                 format.black, | ||||
|                 format.stylua, | ||||
|                 format.prettier | ||||
|             } | ||||
|         }) | ||||
|         vim.keymap.set({"n", "x"}, "=", function() vim.cmd('LspZeroFormat') end, { desc = "Format" }) | ||||
|     end | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Oliver
					Oliver