From d8ccff1050fcda4bd38d1d355d62a88e5d04f25d Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Tue, 27 Feb 2024 18:04:47 +0100 Subject: [PATCH] fix(lsp): disable lazy-loading by lsp filetypes --- lua/lsp.lua | 20 -------------------- lua/plugins.lua | 4 ---- 2 files changed, 24 deletions(-) diff --git a/lua/lsp.lua b/lua/lsp.lua index 7b306d9..7f95153 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -3,9 +3,6 @@ local utils = require("utils") local M = {} -local _filetypes = nil --- local auto_installed_servers = nil - local capabilities = {} local config = { @@ -254,23 +251,6 @@ local function register_server(name, server) }) end -function M.filetypes() - if not _filetypes then - _filetypes = {} - local unique = {} - for _, server in pairs(config) do - for _, ft in ipairs(server.lspconfig.filetypes) do - if not unique[ft] then - table.insert(_filetypes, ft) - unique[ft] = true - end - end - end - end - - return _filetypes -end - function M.setup() setup_diagnostics() diff --git a/lua/plugins.lua b/lua/plugins.lua index c39b3d1..ef9e85b 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -77,8 +77,6 @@ local plugins = { { "neovim/nvim-lspconfig", config = require("lsp").setup, - lazy = true, - ft = require("lsp").filetypes(), }, { "nvim-treesitter/nvim-treesitter", @@ -90,8 +88,6 @@ local plugins = { { "mfussenegger/nvim-dap", config = require("plugins.dap").setup, - lazy = true, - ft = require("lsp").filetypes(), }, { "rcarriga/nvim-dap-ui",