This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
-
I want to detach and reattach source from current buffer in runtime. Can null-ls provides a function like |
Beta Was this translation helpful? Give feedback.
Answered by
adoyle-h
Oct 20, 2022
Replies: 2 comments 1 reply
-
Not sure I understand - vim.api.nvim_create_user_command("NullLsDetach", function()
local bufnr = vim.api.nvim_get_current_buf()
local client_id
for _, client in pairs(vim.lsp.get_active_clients({ bufnr = bufnr })) do
if client.name == "null-ls" then
client_id = client.id
end
end
if not client_id then
return
end
vim.lsp.buf_detach_client(bufnr, client_id)
end, {}) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Solved by this plugin: https://github.com/adoyle-h/lsp-toggle.nvim |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
adoyle-h
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved by this plugin: https://github.com/adoyle-h/lsp-toggle.nvim