Closed matteocavestri closed 2 months ago
Hi there, thx for report this issue. For add arm64 compile target, you can use make build_generator
build command to build current target from source:
{ "mistricky/codesnap.nvim", version = "^1", build = "make"}
But I will consider add it into cross-compile config in the future if it's necessary.
The problem about "mac_window_bar" does not work has fix by https://github.com/mistricky/codesnap.nvim/pull/54, but I can't reproduce the "code_font_family" not work bug, they works fine on my machine (x86_64 Arch Linux with wayland session).
Hack Nerd Font
{
code_font_family = "Hack Nerd Font",
save_path = "~/Pictures/foo.png",
bg_theme = "bamboo",
}
PingFang
{
code_font_family = "PingFang",
save_path = "~/Pictures/foo.png",
bg_theme = "bamboo",
}
CaskaydiaCove Nerd Font
{
code_font_family = "CaskaydiaCove Nerd Font",
save_path = "~/Pictures/foo.png",
bg_theme = "bamboo",
}
Thanks for your reply
Now I'm doing some testing and there are some problems on codesnap during install using lazy:
{
"mistricky/codesnap.nvim",
build = "make",
version = "^1",
}
Using this config I got this error during the install (x86), but after a neovim restart CodeSnap works as intended. Do you have any ideas on this problem?
Failed to source `/home/matteocavestri/.local/share/nvim/lazy/codesnap.nvim/plugin/codesnap.lua`
vim/_editor.lua:0: nvim_exec2()../home/matteocavestri/.local/share/nvim/lazy/codesnap.nvim/plugin/codesnap.lua: Vim(source):E5113: Error while calling lua chunk: ...ocal/share/nvim/lazy/codesnap.nvim/lua/codesnap/init.lua:3: module 'generator' not found:
no field package.preload['generator']
cache_loader: module generator not found
cache_loader_lib: module generator not found
no file './generator.lua'
no file '/usr/share/luajit-2.1/generator.lua'
no file '/usr/local/share/lua/5.1/generator.lua'
no file '/usr/local/share/lua/5.1/generator/init.lua'
no file '/usr/share/lua/5.1/generator.lua'
no file '/usr/share/lua/5.1/generator/init.lua'
no file './generator.so'
no file '/usr/local/lib/lua/5.1/generator.so'
no file '/usr/lib64/lua/5.1/generator.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
...ocal/share/nvim/lazy/codesnap.nvim/lua/codesnap/init.lua:3: in main chunk
[C]: in function 'require'
....local/share/nvim/lazy/codesnap.nvim/plugin/codesnap.lua:1: in main chunk
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:485: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:484>
[C]: in function 'xpcall'
.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:113: in function 'try'
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:484: in function 'source'
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:443: in function 'source_runtime'
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:411: in function 'packadd'
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:346: in function '_load'
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:191: in function 'load'
...hare/nvim/lazy/lazy.nvim/lua/lazy/manage/task/plugin.lua:29: in function <...hare/nvim/lazy/lazy.nvim/lua/lazy/manage/task/plugin.lua:26>
[C]: in function 'pcall'
.../share/nvim/lazy/lazy.nvim/lua/lazy/manage/task/init.lua:70: in function 'start'
.../share/nvim/lazy/lazy.nvim/lua/lazy/manage/task/init.lua:65: in function <.../share/nvim/lazy/lazy.nvim/lua/lazy/manage/task/init.lua:64>
# stacktrace:
- vim/_editor.lua:0 _in_ **cm
Thanks all
module generator not found
Hi @matteocavestri Can you show what output of uname -m
?
The last issue appears on x86_64
On apple silicon I'll start to use codesnap after cross compile on Linux ARM64
Hey @matteocavestri, thx for report this bug, I fix it in latest version, you can install the CodeSnap.nvim to v1.1.5 and try again, If still have this bug, please tell me
Thanks for your support @mistricky In the last version (v1.1.5) this bug is resolved and now on x86 everything is perfect.
If you want to add ARM64 into cross-compile I,ll wait for an update. If you want I can contribute to the project to make it cross-compile on Linux ARM64. (I'm not so good in rust, but I'm learning it)
@mistricky I've read #58. You can add to the build_generator docs some deps. In order to compile on ARM I need:
export CC=gcc
sudo dnf install libuv libuv-devel # On RHEL based systems
sudo apt-get install libtool libuv1-dev # On Debian based systems
Hi @matteocavestri, thx for your reply.
If you want to add ARM64 into cross-compile I,ll wait for an update.
Maybe not now, as https://github.com/mistricky/codesnap.nvim/pull/58 says I don't wanna add too many cross-compilation target for now.
You can add to the build_generator docs some deps.
That's great idea, I'll add it in README later.
Thanks @mistricky I consider this issue closed
Okay Thank u for this issue report again :)
Document was updated https://github.com/mistricky/codesnap.nvim?tab=readme-ov-file#compile-on-arm
I'm using Fedora Asahi Remix and I'd like to use CodeSnap on Linux ARM64. There are other problems, maybe I'm doing something wrong:
code_font_family = "JetBrainsMono Nerd Font"
doesn't work (I have installed it and I use it)mac_window_bar = false
doesn't workThis is my config:
On x86 I only have that problems. Here an example:![snap](https://github.com/mistricky/codesnap.nvim/assets/109976450/2aa446db-e2c2-4a35-bebd-6141c42f43fc)
Thanks all