Giter Site home page Giter Site logo

Comments (9)

shaunsingh avatar shaunsingh commented on July 23, 2024 1

Thank you. I've changed the branch to nightly and have copied over your new macros with some modifications (and proper credits, of course). I hope you don't mind, and thank you once again for the help!

from nvim.conf.

datwaft avatar datwaft commented on July 23, 2024

That is weird, I just did an small test and underline is included on the end result.

See the following screenshot:

image

Here is the code I used:

(do
  (macro highlight! [name attributes colors]
    (fn ->str [x] (tostring x))
    (let [name (->str name)
          colors (collect [_ v (ipairs attributes) :into colors] (->str v) true)]
      `(vim.api.nvim_set_hl 0 ,name ,colors)))
  (macrodebug (highlight! MatchParen [:underline] {:bg "#262626"})))

Here is the output:

(vim.api.nvim_set_hl 0 :MatchParen {:bg "#262626" :underline true})

The code of the macro is basically the same, I just removed the assertions and included the ->str function inside the macro (this is because macros can't access locals outside of themselves).

from nvim.conf.

datwaft avatar datwaft commented on July 23, 2024

It seems that Conjure shows a different output from the one Hotpot produces.

See the following screenshot (at the top the original module and at the bottom the compilation result):

image

Wierdly, if I run the module using :Fnl and macrodebug the macro expands properly.

from nvim.conf.

datwaft avatar datwaft commented on July 23, 2024

If I include macrodebug on the module and it's executed on startup the underline property is included.

image

When printing inside the macro the expected values are displayed:

image

image

I probably is an issue with Hotpot so a new issue should be opened, this is very weird.

from nvim.conf.

datwaft avatar datwaft commented on July 23, 2024

I opened the following Issue on Hotpot: rktjmp/hotpot.nvim#57

from nvim.conf.

datwaft avatar datwaft commented on July 23, 2024

After a test this seems to be an issue with Fennel itself, so I will open a new issue on the Fennel repository.

from nvim.conf.

datwaft avatar datwaft commented on July 23, 2024

Here is the issue on the Fennel repository: bakpakin/Fennel#425

from nvim.conf.

shaunsingh avatar shaunsingh commented on July 23, 2024

Thank you!

from nvim.conf.

datwaft avatar datwaft commented on July 23, 2024

FYI, bakpakin/Fennel#425 has been fixed, but you need to have the nightly version of Fennel.

Hotpot now includes a nightly branch that uses that version of Fennel, so if you use that it should be fixed.

I will be closing this issue.

Btw, I moved my macros to datwaft/themis.nvim. I don't recommend you to use it directly as it's not made for external use, but you can fork it or use it as a reference for your configuration.

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.