Merge branch 'master' of ssh://git.venberg.xyz:7920/Gabe/dotfiles
This commit is contained in:
		
						commit
						ad766da79f
					
				
					 3 changed files with 50 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,3 @@
 | 
			
		|||
local lsp_installer = require("nvim-lsp-installer")
 | 
			
		||||
 | 
			
		||||
local opts = {}
 | 
			
		||||
 | 
			
		||||
local on_attach = function()
 | 
			
		||||
| 
						 | 
				
			
			@ -30,4 +28,25 @@ local on_attach = function()
 | 
			
		|||
	set_keymap('', ';lp', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
 | 
			
		||||
	set_keymap('', ';lm', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
 | 
			
		||||
end
 | 
			
		||||
require("mason-lspconfig").setup_handlers({
 | 
			
		||||
	function(server_name)
 | 
			
		||||
		require("lspconfig")[server_name].setup{}
 | 
			
		||||
		on_attach()
 | 
			
		||||
	end,
 | 
			
		||||
	["rust_analyzer"] = function()
 | 
			
		||||
		require('rust-tools-setup')
 | 
			
		||||
		on_attach()
 | 
			
		||||
	end,
 | 
			
		||||
	["sumneko_lua"] = function ()
 | 
			
		||||
		require('lspconfig').sumneko_lua.setup {
 | 
			
		||||
			settings = {
 | 
			
		||||
				Lua = {
 | 
			
		||||
					diagnostics = {
 | 
			
		||||
						globals = { "vim" }
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		on_attach()
 | 
			
		||||
	end,
 | 
			
		||||
})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,33 +26,44 @@ return require('packer').startup(function(use)
 | 
			
		|||
	}
 | 
			
		||||
	use {
 | 
			
		||||
		{
 | 
			
		||||
			"williamboman/nvim-lsp-installer",
 | 
			
		||||
			"williamboman/mason.nvim",
 | 
			
		||||
			config = function()
 | 
			
		||||
				require("nvim-lsp-installer").setup {
 | 
			
		||||
					ensure_installed = {
 | 
			
		||||
						'pyright',
 | 
			
		||||
						'bashls',
 | 
			
		||||
						'rust_analyzer',
 | 
			
		||||
						'sumneko_lua',
 | 
			
		||||
						'texlab',
 | 
			
		||||
					},
 | 
			
		||||
					automatic_installation = false,
 | 
			
		||||
				require("mason").setup({
 | 
			
		||||
					ui = {
 | 
			
		||||
						icons = {
 | 
			
		||||
							server_installed = "✓",
 | 
			
		||||
							server_pending = "➜",
 | 
			
		||||
							server_uninstalled = "✗"
 | 
			
		||||
						}
 | 
			
		||||
							package_installed = "✓",
 | 
			
		||||
							package_pending = "➜",
 | 
			
		||||
							package_uninstalled = "✗"
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
			end
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
		    "williamboman/mason-lspconfig.nvim",
 | 
			
		||||
			after = "mason.nvim",
 | 
			
		||||
			config = function()
 | 
			
		||||
				require("mason-lspconfig").setup({
 | 
			
		||||
					ensure_installed = {
 | 
			
		||||
						"sumneko_lua",
 | 
			
		||||
						"rust_analyzer",
 | 
			
		||||
						'pyright',
 | 
			
		||||
						'bashls',
 | 
			
		||||
						'texlab'
 | 
			
		||||
					},
 | 
			
		||||
					automatic_installation=true
 | 
			
		||||
				})
 | 
			
		||||
			end
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"neovim/nvim-lspconfig",
 | 
			
		||||
			after = "nvim-lsp-installer",
 | 
			
		||||
			after = "mason-lspconfig.nvim",
 | 
			
		||||
			config = function()
 | 
			
		||||
				require('LSPconfig')
 | 
			
		||||
			end
 | 
			
		||||
		},
 | 
			
		||||
		{'simrat39/rust-tools.nvim',
 | 
			
		||||
			after = "nvim-lspconfig",
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -289,11 +300,6 @@ return require('packer').startup(function(use)
 | 
			
		|||
 | 
			
		||||
	--language specific tools.
 | 
			
		||||
 | 
			
		||||
	use{'simrat39/rust-tools.nvim',
 | 
			
		||||
		config=function()
 | 
			
		||||
			require('rust-tools-setup')
 | 
			
		||||
		end
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if Packer_Bootstrap then
 | 
			
		||||
		require('packer').sync()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ local nvim_lsp = require'lspconfig'
 | 
			
		|||
local opts = {
 | 
			
		||||
	tools = {
 | 
			
		||||
	autoSetHints = true,
 | 
			
		||||
	hover_with_actions = true,
 | 
			
		||||
	RustHoverActions = true,
 | 
			
		||||
 | 
			
		||||
	-- how to execute terminal commands
 | 
			
		||||
	executor = require("rust-tools/executors").termopen,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue