Giter Site home page Giter Site logo

Comments (10)

udayvir-singh avatar udayvir-singh commented on August 19, 2024

@justAlex0 I can't seem to replicate the issue, did you try to run :FnlClean, try running it.

Can you give me some more info about:

  1. Your OS
  2. tree command output on both source and target dirs.
$ tree ~/.config/nvim

$ tree ~/.cache/nvim/lua

from tangerine.nvim.

kisuryoza avatar kisuryoza commented on August 19, 2024

:FnlClean does not clean compiled lua files in either .cache or .config. I clean them externally through termial

  1. Arch
Didn't past the full output because there're a lot of files but every .fnl has its .lua
└── .config
   └── nvim
      ├── fnl
      │  ├── init.fnl
      │  ├── init.lua
      │  ├── macros.fnl
      │  ├── opts.fnl
      │  ├── opts.lua
      │  ├── plugins
      │  │  ├── *
      │  ├── statuscolumn.fnl
      │  └── statuscolumn.lua
      ├── ftplugin
      │  ├── .fennel.fnl
      │  ├── fennel.lua
      │  └── sh.lua
      ├── init.fnl    // with just (set vim.opt.colorcolumn "80") to see if works
      └── init.lua
└── .cache
   └── nvim
      └── lua
         └── tangerine_vimrc.lua  // and it works

from tangerine.nvim.

udayvir-singh avatar udayvir-singh commented on August 19, 2024

You aren't supposed to have two init.fnl files - nvim/init.fnl and nvim/fnl/init.fnl, maybe they are causing a loopback because you are trying to require "init".

I got this error when I tried to replicate your config:

Error detected while processing /home/user/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ./init.lua:20: loop or previous error loading module 'in
it'
stack traceback:
        [C]: in function 'require'
        ./init.lua:20: in main chunk
        [C]: in function 'require'
        /home/user/.config/nvim/init.lua:20: in main chunk

Try to remove nvim/fnl/init.fnl or set it as your default vimrc:

require "tangerine".setup {
    vimrc = config .. "/fnl/init.fnl",
}

from tangerine.nvim.

udayvir-singh avatar udayvir-singh commented on August 19, 2024

Just read your dotfiles and only problem that I could find was you trying to require init.fnl manually. You don't have to do that with tangerine, it will require it for you. So remove this line:

 -- init.lua

 require "tangerine".setup({
+    vimrc    = config .. "/fnl/init.fnl",
     source   = config .. "/fnl",
     target   = vim.fn.stdpath [[cache]] .. "/lua",
     compiler = {
         hooks = {"onsave", "oninit"},
     },
 })
-require "init"

from tangerine.nvim.

kisuryoza avatar kisuryoza commented on August 19, 2024

You aren't supposed to have two init.fnl files

There's no loopback even if i take require("init") from init.lua and put as (require :init) inside init.fnl.
But even if i delete init.fnl, tangerine just cleans tangerine_vimrc.lua inside target.

Now considering your snippet, /fnl/init.fnl compiles into target instead of the default init.fnl. Everything else is the same.

Also neovim and all the plugins and configs work as intended, considering that i clean .lua and bin cache files.

from tangerine.nvim.

udayvir-singh avatar udayvir-singh commented on August 19, 2024

@justAlex0 I really am out of ideas for what might be happening. What version of neovim are you using?

from tangerine.nvim.

kisuryoza avatar kisuryoza commented on August 19, 2024

NVIM v0.8.2
I guess i should play a bit with tangerine source to see if it's just something cursed on my end

from tangerine.nvim.

udayvir-singh avatar udayvir-singh commented on August 19, 2024

I am using the same version on same OS and can't seem to replicate this behavior.

Can you clean you nvim config for a while and only add the following files:

nvim:
- init.fnl
- plugin:
    - 0-tangerine.fnl
- fnl:
    - hello.fnl
-- 0-tangerine.fnl

local pack = "tangerine"

local function bootstrap(url, ref)
	local name = url:gsub(".*/", "")
	local path = vim.fn.stdpath [[data]] .. "/site/pack/".. pack .. "/start/" .. name

	if vim.fn.isdirectory(path) == 0 then
		print(name .. ": installing in data dir...")

		vim.fn.system {"git", "clone", url, path}
		if ref then
			vim.fn.system {"git", "-C", path, "checkout", ref}
		end

		vim.cmd [[redraw]]
		print(name .. ": finished installing")
	end
end

bootstrap("https://github.com/udayvir-singh/tangerine.nvim", "v2.3")

require "tangerine".setup {
    compiler = { hooks = {"oninit"} }
}
;; init.fnl

(require :hello)
;; hello.fnl

(print "HELLO WORLD!")

And then see what happens

from tangerine.nvim.

kisuryoza avatar kisuryoza commented on August 19, 2024

Added. Launched. This still do not follow target

└── nvim
   ├── fnl
   │  ├── hello.fnl
   │  └── hello.lua
   ├── init.fnl
   ├── lua
   │  └── tangerine_vimrc.lua
   └── plugin
      └── 0-tangerine.lua

from tangerine.nvim.

udayvir-singh avatar udayvir-singh commented on August 19, 2024

Then there is nothing that I can do at this point. You should keep on using hotpot than to get messy with tangerine's internals.

from tangerine.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.