From ebff217665b989ee26997e2adb7bce50580942bb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Apr 2021 23:02:16 +0530 Subject: [PATCH] minor changes with lspconfig --- lua/lspconfig/lua.lua | 12 +++++++++--- lua/pluginsList/lua.lua | 3 --- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 6ea9906..ac7f1d2 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -39,7 +39,13 @@ function on_attach(client) end end -local servers = {"tsserver", "cssls", "html" , "pyright"} -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup {on_attach = on_attach} +local lspconf = require "lspconfig" +local servers = {"html", "cssls", "tsserver", "pyright"} + +for k, lang in pairs(servers) do + lspconf[lang].setup { + root_dir = function() + return vim.loop.cwd() + end + } end diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 0f4142c..55874d8 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -29,8 +29,5 @@ return require("packer").startup( use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" use "karb94/neoscroll.nvim" - - use "nekonako/xresources-nvim" - end )