Closed Retaehc-pop closed 1 month ago
Hi Papop,
thanks for reporting. Indeed I needed to wrap the M.start call in another call that makes a deep copy of the global options table. Should now be fixed in the latest release. One note, though:
Above in your initialization code you supply an opts = { ... }
table as well as a config
function, that calls setup()
with another opts table. I believe - depending on your package manager inside your lazyvim installation - that this will not work and the disable_defaults
will be discarded. So I suggest, that you move that disable_defaults
to the setup function, right before the background
setting. But another caveat: if you do so and disable_defaults
takes effect, then you are missing an output
function or a to_clipboard
directive. If both are missing and defaults disabled, nothing will be produced.
Take a shot at the updated version and report if that fixes your issue!
Thanks,
Michael.
After i use the silicon command to capture the code in nvim i cannot use the command in the second time with the error
Hi @Retaehc-pop, did you have the chance to test the new version?
I get the same error. Upon taking a second screenshot, I am hit with filetype not supported error and the error that has been specified above. I am running the latest version, and this is my plugin code:
{
"michaelrommel/nvim-silicon",
lazy = true,
cmd = "Silicon",
-- init = function()
-- local wk = require "which-key"
-- wk.register({
-- ["<leader>sc"] = { ":Silicon<CR>", "Snapshot Code" },
-- }, { mode = "v" })
-- end,
config = function()
require("silicon").setup {
font = "FiraCode Nerd Font=34;Noto Color Emoji=34",
theme = "Material-Darker",
background = "#FAFAFA",
window_title = function()
return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()), ":t")
end,
-- language = function()
-- return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()), ":e")
-- end,
}
end,
},``
@Retaehc-pop @FireDrop6000: Oh heaven, I was pushing to the wrong branch. Now I have merged it and it should be fixed now. Big apologies! Could you try again - Lazy should show the hash as: 0b31fc6
@michaelrommel thank you very much sir, its working perfectly for me after update.
Works on my machine. Thank you for the update, really appreciate it 👍🏻
After i use the silicon command to capture the code in nvim i cannot use the command in the second time with the error
[error] Failed to save image to v:true: The image format could not be determined
here is my setup in lazyvim
the problem resolve itself when i reopen nvim.
ps. i also tried to use it in nvchad but same result arise.