Closed SuperSandro2000 closed 1 month ago
Wh as t would happen if we didn't have a init_options.config
option and the definition instead relied on the freeformType?
I agree, the ideal thing would be for derivations to automatically be stringified to their store path, but I think it's also important for this kinda thing to behave consistently throughout nixvim.
For this specific option we could have type = coercedTo package toString str
, but if we do this here how do we decide which other places should have similar coercion?
We could run mapAttrsRecursive and convert all derivations to strings. Not sure if all plugins use a some wrapper we could unite this under.
Ah, I haven't studied the stack trace, but this is probably an edge case toLuaObject
should be handling.
It's possible the error is happening when we try and print the attrs as a lua string.
Yes, near the end of the trace it shows toLuaObject
runs into infinite recursion within its removeEmptiesRecursive
pre-processing helper.
typos-lsp
nixos-unstable
none
Description
When adding a derivation inside of plugins.lsp.servers.typos-lsp.settings it is not automatically turned into a store path but an infinite recursion occurs.
The end of the errors is:
Minimal, Reproducible Example (MRE)
Changing the config to :
works as expected and I would expect that this automatically happens.
Full log: https://gist.github.com/SuperSandro2000/ebe7af677a61337404703b3358f0f35a