From 662af36496f8930a8f2a1065ad469bbe58796a90 Mon Sep 17 00:00:00 2001 From: CPea Date: Tue, 17 Oct 2023 02:48:06 +0700 Subject: [PATCH] feat(plugins): add `lsp-timeout` to enhance lsp memory usage --- lua/pea/lsp.lua | 7 +++++++ lua/pea/plugins.lua | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/lua/pea/lsp.lua b/lua/pea/lsp.lua index 7df9f44..49274ce 100644 --- a/lua/pea/lsp.lua +++ b/lua/pea/lsp.lua @@ -50,6 +50,13 @@ local lsp = { if vim.tbl_get(client.server_capabilities, "inlayHintProvider") then vim.lsp.inlay_hint(bufnr, true) end + + -- TODO: remove in the future after null-ls is replaced + local status_ok, null_ls = pcall(require, "null-ls") + + if status_ok then + null_ls.enable {} + end end, } diff --git a/lua/pea/plugins.lua b/lua/pea/plugins.lua index f14cf65..acfd312 100644 --- a/lua/pea/plugins.lua +++ b/lua/pea/plugins.lua @@ -1,5 +1,9 @@ local plugins = { "cpea2506/one_monokai.nvim", + { + "hinell/lsp-timeout.nvim", + dependencies = "neovim/nvim-lspconfig", + }, { "luckasRanarison/clear-action.nvim", config = require "pea.config.clear_action",