neovim: remove codelens commands and shit
This commit is contained in:
@@ -10,14 +10,6 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, {
|
|
||||||
pattern = "*",
|
|
||||||
group = group,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.codelens.refresh()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
group = group,
|
group = group,
|
||||||
|
|||||||
@@ -8,32 +8,3 @@ vim.api.nvim_create_user_command("FormattingEnable", formatting.enable, {})
|
|||||||
vim.api.nvim_create_user_command("FormattingDisable", formatting.disable, {})
|
vim.api.nvim_create_user_command("FormattingDisable", formatting.disable, {})
|
||||||
vim.api.nvim_create_user_command("FormattingToggle", formatting.toggle, {})
|
vim.api.nvim_create_user_command("FormattingToggle", formatting.toggle, {})
|
||||||
vim.api.nvim_create_user_command("FormattingStatus", formatting.status, {})
|
vim.api.nvim_create_user_command("FormattingStatus", formatting.status, {})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("LspCommands", function()
|
|
||||||
vim.ui.input({ prompt = "LSP server: " }, function(input)
|
|
||||||
local clients = vim.lsp.get_active_clients()
|
|
||||||
for _, client in ipairs(clients) do
|
|
||||||
if client.name == input then
|
|
||||||
print(vim.inspect(client.server_capabilities.executeCommandProvider.commands))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end, {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("CodelensList", function()
|
|
||||||
vim.lsp.codelens.refresh()
|
|
||||||
|
|
||||||
local codelens = vim.lsp.codelens.get()
|
|
||||||
vim.ui.select(codelens, {
|
|
||||||
prompt = "What codelens to run:",
|
|
||||||
format_item = function(item)
|
|
||||||
return item.command.title
|
|
||||||
end,
|
|
||||||
}, function(choice)
|
|
||||||
vim.lsp.buf.execute_command(choice.command)
|
|
||||||
end)
|
|
||||||
end, {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("CodelensRefresh", function()
|
|
||||||
vim.lsp.codelens.refresh()
|
|
||||||
end, {})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user