#How to edit ZLS config.json?

1 messages · Page 1 of 1 (latest)

jagged linden
#

I don't know anything about json lmao, I want to flip the values of certain variables

summer fulcrum
#

change true to false or vice versa, also: note that most of the config values can (and probably should) be changed in your editor

jagged linden
#

I have never used json, but set the file to ```json
{
"use_comptime_interpreter": true,
"inlcude_at_in_builtins": true
}

#

which seems correct?

#

also, how do I reload zls?

#

or how do I check if these changes have been applied

summer fulcrum
#

that depends on your editor, the vscode extension has a command to restart the server for example

jagged linden
#

Using emacs

#

ok I just restarted

#

but how do I check if the changes were applied?

summer fulcrum
#

zls doesn't advertise the applied config

jagged linden
#

ah, that's a shame

#

so ideally we'd want an error that triggers one of these two

#

@ is included in builtin

#

I had a particular error with a comptime function

#

or a function rather taking a type as input, that is excsluveily executed at comptime

#

zls was not detecting it, but the actual compiler was

summer fulcrum
#

the comptime interpreter is very new and very experimental

jagged linden
#

hoping that the use_comptime_interpreter switch would have caught it, but it doesn't seem to

#

ah

#

so best leave it off for now?

summer fulcrum
#

it's disabled by default for a reason, yea

jagged linden
#

alright

#

I guess I just accept that comptime code will have a lot of errors uncaught by zls

#

and hope that isn't the case for non-comptime code?

summer fulcrum
#

the comptime interpreter is only for extracting type information, afaik it doesn't actually check anything

round iris
#

that's correct

#

sorry to disappoint, comptime stuff is super complex and brand new to zls :)

jagged linden
#

Fair enough, no worries

#

Compiler messages were not amazing but also not the worst thing in the world