From 3a85b9f495513b9ae9503aae16f04e1ed94662d2 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Tue, 6 Jun 2023 05:39:05 -0600 Subject: fix mason wasn't getting setup, now it autoinstalls and fidget also works --- README.md | 1 + lua/plugins/lsp.lua | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1139637..c1c4e09 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Personal [`neovim`](https://github.com/neovim/neovim) configuration using [`lazy - [ ] further personalize plugin configs. - [ ] check up on the suggested config from [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig#suggested-configuration). - [ ] add [windwp/nvim-autopairs](https://github.com/windwp/nvim-autopairs). +- [ ] (probably) add [mfussenegger/nvim-treehopper](https://github.com/mfussenegger/nvim-treehopper). - [ ] (probably) add [ThePrimeagen/harpoon](https://github.com/ThePrimeagen/harpoon). - Either take the config from [dorrajmachai/nvim](https://github.com/dorrajmachai/nvim/blob/main/lua/plugins/harpoon.lua) or from ThePrimeagen itself. - [ ] add [folke/trouble.nvim](https://github.com/folke/trouble.nvim). diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 44371e0..88f1895 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,6 +1,7 @@ local servers = { gopls = {}, - jedi_language_server = {}, + -- jedi_language_server = {}, + pyright = {}, lua_ls = { Lua = { workspace = { checkThirdParty = false }, @@ -27,7 +28,9 @@ return { local lspconfig = require('lspconfig') local mason_lspconfig = require('mason-lspconfig') - mason_lspconfig.ensure_installed = vim.tbl_keys(servers) + mason_lspconfig.setup({ + ensure_installed = vim.tbl_keys(servers) + }) local on_attach = function(_, bufnr) local nmap = function(keys, func, desc) @@ -65,7 +68,7 @@ return { end, { desc = 'Format current buffer with LSP' }) end - mason_lspconfig.setup_handlers { + mason_lspconfig.setup_handlers({ function(server_name) lspconfig[server_name].setup { capabilities = capabilities, @@ -73,6 +76,6 @@ return { settings = servers[server_name], } end, - } + }) end, } -- cgit v1.2.3-70-g09d2