From d4a47162120385f501e7fb6171d6bb9e0a392434 Mon Sep 17 00:00:00 2001 From: Nat Bennett Date: Fri, 3 Nov 2023 16:24:28 -0700 Subject: [PATCH] Try using mason --- init.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index f29f1e5..5c7f597 100644 --- a/init.lua +++ b/init.lua @@ -32,7 +32,9 @@ local plugins = { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below - } + }, + { "williamboman/mason.nvim" }, + { "williamboman/mason-lspconfig.nvim" } }, { 'nvim-telescope/telescope.nvim', @@ -43,14 +45,19 @@ local plugins = { require("lazy").setup(plugins) ---- lspconfig -local lspconfig = require 'lspconfig' - vim.o.foldcolumn = '1' -- '0' is not bad vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value vim.o.foldlevelstart = 99 vim.o.foldenable = true +require("mason").setup() +require("mason-lspconfig").setup() + + +require("mason-lspconfig").setup { + ensure_installed = { "lua_ls", "rust_analyzer" }, +} + local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.foldingRange = { dynamicRegistration = false,