Add mason, none-ls, and lspconfig for LSP support
This commit is contained in:
		
							parent
							
								
									7a88c10079
								
							
						
					
					
						commit
						4c6272e43e
					
				
					 3 changed files with 58 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								nvim/lua/plugins/mason.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								nvim/lua/plugins/mason.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| return { | ||||
| 	{ | ||||
| 		"mason-org/mason.nvim", | ||||
| 		tag = "v1.11.0", | ||||
| 		config = function() | ||||
| 			require("mason").setup({}) | ||||
| 		end, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"mason-org/mason-lspconfig.nvim", | ||||
| 		tag = "v1.32.0", | ||||
| 		config = function() | ||||
| 			require("mason-lspconfig").setup({ | ||||
| 				ensure_installed = { | ||||
| 					"lua_ls", | ||||
| 					"bashls", | ||||
| 					"dockerls", | ||||
| 					--        "gh-actions-language-server", | ||||
| 					"helm_ls", | ||||
| 					"jsonls", | ||||
| 					"nginx_language_server", | ||||
| 					"ruff", | ||||
| 					"yamlls", | ||||
| 				}, | ||||
| 			}) | ||||
| 		end, | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										12
									
								
								nvim/lua/plugins/none-ls.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								nvim/lua/plugins/none-ls.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| return { | ||||
| 	"nvimtools/none-ls.nvim", | ||||
| 	config = function() | ||||
| 		local null_ls = require("null-ls") | ||||
| 		null_ls.setup({ | ||||
| 			sources = { | ||||
| 				null_ls.builtins.formatting.stylua, | ||||
| 			}, | ||||
| 		}) | ||||
| 		vim.keymap.set("n", "<leader>af", vim.lsp.buf.format, {}) | ||||
| 	end, | ||||
| } | ||||
							
								
								
									
										18
									
								
								nvim/lua/plugins/nvim-lspconfig.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								nvim/lua/plugins/nvim-lspconfig.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| return { | ||||
|   "neovim/nvim-lspconfig", | ||||
|   tag="v1.8.0", | ||||
|   config = function() | ||||
|     local lspconfig = require("lspconfig") | ||||
|     lspconfig.lua_ls.setup({}) | ||||
|     lspconfig.bashls.setup({}) | ||||
|     lspconfig.dockerls.setup({}) | ||||
|     lspconfig.helm_ls.setup({}) | ||||
|     lspconfig.jsonls.setup({}) | ||||
|     lspconfig.nginx_language_server.setup({}) | ||||
|     lspconfig.ruff.setup({}) | ||||
|     lspconfig.yamlls.setup({}) | ||||
|     vim.keymap.set('n', '<leader>d', vim.lsp.buf.hover, {}) | ||||
|     vim.keymap.set('n', '<leader>gt', vim.lsp.buf.definition, {}) | ||||
|     vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, {}) | ||||
|   end | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue