From 980701768cbf3ae392ae7b13b48d72f538c4f5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 16 Oct 2023 13:25:54 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(nvim):=20bigfile=20and=20lsp-t?= =?UTF-8?q?imeout=20plugins=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit helping for those beffy files --- .config/nvim/lua/plugins/bigfile.lua | 16 ++++++++++++++++ .config/nvim/lua/plugins/lsp-timeout.lua | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .config/nvim/lua/plugins/bigfile.lua create mode 100644 .config/nvim/lua/plugins/lsp-timeout.lua diff --git a/.config/nvim/lua/plugins/bigfile.lua b/.config/nvim/lua/plugins/bigfile.lua new file mode 100644 index 00000000..222d22e9 --- /dev/null +++ b/.config/nvim/lua/plugins/bigfile.lua @@ -0,0 +1,16 @@ +return { + "LunarVim/bigfile.nvim", + event = "BufRead", + opts = { + filesize = 1, -- size of the file in MiB, the plugin round file sizes to the closest MiB + pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files> + features = { -- features to disable + "indent_blankline", + "illuminate", + -- "lsp", + "syntax", + "vimopts", + "matchparen", + }, + }, +} diff --git a/.config/nvim/lua/plugins/lsp-timeout.lua b/.config/nvim/lua/plugins/lsp-timeout.lua new file mode 100644 index 00000000..6b5983f0 --- /dev/null +++ b/.config/nvim/lua/plugins/lsp-timeout.lua @@ -0,0 +1,12 @@ +return { + { + "hinell/lsp-timeout.nvim", + event = "BufRead", + dependencies = { "neovim/nvim-lspconfig" }, + init = function() + vim.g["lsp-timeout-config"] = { + startTimeout = 1000 * 1, -- ms before restart + } + end, + }, +}