Coder Social home page Coder Social logo

Comments (8)

rummik avatar rummik commented on May 27, 2024

A workaround seems to be using double quotes instead of single quotes within the passed string

from nixvim.

pta2002 avatar pta2002 commented on May 27, 2024

Ah, seems to be an issue with using escapeShellArg. Guess it's about time I implement my own escaping function (it escapes ' to ''\''', which works in shell due to implicit concatenation but not in lua!)

from nixvim.

rummik avatar rummik commented on May 27, 2024

@pta2002 I actually have some progress towards this if you'd like me to submit a PR

from nixvim.

rummik avatar rummik commented on May 27, 2024

For now I'd suggest using builtins.toJSON specifically for string conversion, since it should be compatible in most cases

from nixvim.

rummik avatar rummik commented on May 27, 2024

I'm a bit confused about this part of toLuaObject

https://github.com/pta2002/nixvim/blob/a601a75d0cae8229f1416506bd172e4e4aef3ce7/plugins/helpers.nix#L17-L20

Specifically I'm not sure I understand what the special case for filtering out nil and empty tables is for, and I don't know what the significance of @ prefixed keys are in Lua 😅

from nixvim.

rummik avatar rummik commented on May 27, 2024

As far as I can tell, the condition on line 17 is never reached in the current codebase

from nixvim.

pta2002 avatar pta2002 commented on May 27, 2024

I'm a bit confused about this part of toLuaObject

https://github.com/pta2002/nixvim/blob/a601a75d0cae8229f1416506bd172e4e4aef3ce7/plugins/helpers.nix#L17-L20

Specifically I'm not sure I understand what the special case for filtering out nil and empty tables is for, and I don't know what the significance of @ prefixed keys are in Lua sweat_smile

Honeslty I genuinely do not remember why I put that there... I'm filtering out nil so code does not end up with a bunch of x = nil, because that'll be by far the most common value and I don't want to bloat up the vimrc

from nixvim.

rummik avatar rummik commented on May 27, 2024

For now it's just a simple fix. I don't really feel comfortable changing much in helpers without some kind of tests to make sure I don't break everything 😅

from nixvim.

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.