kamiyaa / joshuto

ranger-like terminal file manager written in Rust

Home Page:https://crates.io/crates/joshuto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

5huanghuai opened this issue · comments

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", "<leader>L", "<cmd>:Lazy<cr>", { desc = "Plugin Manager" })
  1. Edit problem:
    The same special .lua file cannot be opened in Joshuto.

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