kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.34k stars 151 forks source link

There are some errors when I use Joshuto to preview some .lua files #503

Open 5huanghuai opened 4 months ago

5huanghuai commented 4 months ago

When I use Joshuto to preview and edit some Lua files, I encounter some problems.

  1. Preview problem: There are no problems with most of the .lua files. However, this issue only occurs with some special .lua files. I don't know why. The special .lua file causing the issue is shown below:
    
    local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
    if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable",
    lazypath,
    })
    end
    vim.opt.rtp:prepend(lazypath)

-- Configure lazy.nvim require("lazy").setup({ spec = { { import = "plugins" }, }, concurrency = 24, defaults = { lazy = true, version = nil }, install = { missing = true, colorscheme = { "tokyonight" } }, ui = { border = "rounded" }, })

vim.keymap.set("n", "L", ":Lazy", { desc = "Plugin Manager" })



2. Edit problem:
The same special .lua file cannot be opened in Joshuto.
kamiyaa commented 3 months ago

Sorry, what issues are you having?

I copied the contents you provided in a .lua file and was able to open it with my text editor through joshuto