Closed spindensity closed 3 years ago
When you set a key of a table to nil in lua, the actual effect is that the key is deleted from the table
Oh, didn't know about it. Could try to specify false
? I'll update the documentation.
Oh, didn't know about it. Could try to specify
false
? I'll update the documentation.
false
is OK.
Done, thank you!
Bug description
According to the documentation:
But
dap_open_command = nil
does not work, it does not override the value of thedap_open_command
key in the default configuration.Steps to reproduce
Use the following configuration and execute
:CMake debug
:Expected behavior
The plugin does not open DAP REPL automatically.
Actual behavior
The plugin opens DAP REPL automatically.
Additional information
The behavior of the following code is not consistent with the description of the documentation. When you set a key of a table to
nil
inlua
, the actual effect is that the key is deleted from the table, so there is nodap_open_command
key invalues
table at all withdap_open_command = nil
, the overriding of the key would never happen.https://github.com/Shatur/neovim-cmake/blob/797cc52cd6f70f31f230a05909daef86af6607cc/lua/cmake/init.lua#L7-L9