Giter Site home page Giter Site logo

Comments (5)

shaunsingh avatar shaunsingh commented on May 29, 2024 1

the pack.fnl file compiles to return nil

image

image

init.fnl compiles to pretty much the same.

from nvim.conf.

datwaft avatar datwaft commented on May 29, 2024

Indeed, it theory it should be possible, but I haven't tried it yet.

Are you using Aniseed or Hotpot?

If you are using Hotpot, see rktjmp/hotpot.nvim#38. In this issue I wanted to do a similar thing, and it was later on fixed, so you shouldn't have any problem in relation with that if you are using Hotpot, at least.

If you are using Hotpot and it doesn't work try doing something similar to what I did in that issue, so that we can know if it's a bug.

If you are using Aniseed it used to work when I used it, but I haven't used Aniseed since a long time ago.

from nvim.conf.

shaunsingh avatar shaunsingh commented on May 29, 2024

I am currently using hotpot, and just to test I tried it both with hotpot and aniseed. It doesn't work with either plugin, might be an issue with my code.

For reference, I have configs organized in "modules" e.g. https://github.com/shaunsingh/nyoom.nvim/tree/module-rewrite/fnl/conf/modules/telescope, and packages are added in their respective pack.fnl files: https://github.com/shaunsingh/nyoom.nvim/blob/module-rewrite/fnl/conf/modules/telescope/pack.fnl. https://github.com/shaunsingh/nyoom.nvim/blob/module-rewrite/fnl/conf/init.fnl then requires each module and at the end I send (unpack!)

I tried the workarounds you did in the issue linked above (by doing whatever was in this comment: rktjmp/hotpot.nvim#38 (comment)) but same error in the end. I'll try manually compiling them and seeing if it makes any difference

from nvim.conf.

datwaft avatar datwaft commented on May 29, 2024

Can you show me the compilation result? (The Lua code that hotpot caches). In the README of the hotpot repository are some commands that give you the path of the current file in Lua code.

I will make some tests in the evening of today or tomorrow, when I find time.

from nvim.conf.

datwaft avatar datwaft commented on May 29, 2024

I did a quick test with the following files:

; init.fnl
(import-macros {: add-visited-module
                : print-global-variable} :macro)

(require :module)
(add-visited-module "init")

(print-global-variable)
; module.fnl
(import-macros {: add-visited-module} :macro)

(add-visited-module "module")
; macro.fnl
;; This global variable is a list of visited modules
(global global-variable [])

(fn add-visited-module [module-name]
  (table.insert global-variable module-name))

(fn print-global-variable []
  `(each [_# module-name# (ipairs ,global-variable)]
     (print (string.format "The module '%s' has been loaded." module-name#))))

{: add-visited-module
 : print-global-variable}

As you can see in the following code fragment, it seems to be a problem with Fennel itself and not with hotpot or aniseed. Maybe you can open an issue to see if it can be fixed.

foo@bar:~$ fennel init.fnl
The module 'init' has been loaded.

from nvim.conf.

Related Issues (10)

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.