Skip to content

Commit

Permalink
vim(lsp): Workaround a performance issue on null-ls
Browse files Browse the repository at this point in the history
When null-ls attaches for the first time, multiple linter processes
were spawning unwantedly and redundantly.

Use a workaround until the performance bug gets fixed.

Reference: jose-elias-alvarez/null-ls.nvim#1564
  • Loading branch information
wookayin committed May 15, 2023
1 parent 944a388 commit e3a39e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nvim/lua/config/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,9 @@ function M.setup_null_ls()
local null_ls = require("null-ls")
local h = require("null-ls.helpers")

-- Monkey-patching because of a performance bug on startup (jose-elias-alvarez/null-ls.nvim#1564)
require('null-ls.client').retry_add = require('null-ls.client').try_add

-- @see https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/CONFIG.md
-- @see https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md

Expand Down

0 comments on commit e3a39e4

Please sign in to comment.