update: nvim
This commit is contained in:
@@ -3,14 +3,20 @@ _G._command_panel = function()
|
||||
lhs_filter = function(lhs)
|
||||
return not string.find(lhs, "Þ")
|
||||
end,
|
||||
layout_config = {
|
||||
width = 0.6,
|
||||
height = 0.6,
|
||||
prompt_position = "top",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
_G._flash_esc_or_noh = function()
|
||||
local flash_active, state = pcall(function()
|
||||
return require("flash.plugins.char").state
|
||||
end)
|
||||
if flash_active and state then
|
||||
state:hide()
|
||||
else
|
||||
pcall(vim.cmd.noh)
|
||||
end
|
||||
end
|
||||
|
||||
_G._telescope_collections = function(picker_type)
|
||||
local actions = require("telescope.actions")
|
||||
local action_state = require("telescope.actions.state")
|
||||
@@ -38,14 +44,27 @@ _G._telescope_collections = function(picker_type)
|
||||
:find()
|
||||
end
|
||||
|
||||
_G._flash_esc_or_noh = function()
|
||||
local flash_active, state = pcall(function()
|
||||
return require("flash.plugins.char").state
|
||||
end)
|
||||
if flash_active and state then
|
||||
state:hide()
|
||||
else
|
||||
pcall(vim.cmd.noh)
|
||||
_G._toggle_inlayhint = function()
|
||||
local is_enabled = vim.lsp.inlay_hint.is_enabled()
|
||||
|
||||
vim.lsp.inlay_hint.enable(not is_enabled)
|
||||
vim.notify(
|
||||
(is_enabled and "Inlay hint disabled successfully" or "Inlay hint enabled successfully"),
|
||||
vim.log.levels.INFO,
|
||||
{ title = "LSP Inlay Hint" }
|
||||
)
|
||||
end
|
||||
|
||||
local _vt_enabled = require("core.settings").diagnostics_virtual_text
|
||||
_G._toggle_virtualtext = function()
|
||||
if vim.diagnostic.is_enabled() then
|
||||
_vt_enabled = not _vt_enabled
|
||||
vim.diagnostic[_vt_enabled and "show" or "hide"]()
|
||||
vim.notify(
|
||||
(_vt_enabled and "Virtual text is now displayed" or "Virtual text is now hidden"),
|
||||
vim.log.levels.INFO,
|
||||
{ title = "LSP Diagnostic" }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user