Adrian Lopez on Nostr: I've been scratching my head because on #neovim you cannot do ``` ...
I've been scratching my head because on #neovim you cannot do
```
vim.g.myglobal.myfield = "value"
```
and trying to do so will do nothing and print no error.
The correct way is
```
let newvalues = { myfield = "hi"}
vim.g.myglobal = newvalues
```
Which is totally cool, but having some error there would have saved me a good couple hours.
Published at
2024-09-14 11:11:41Event JSON
{
"id": "fc572106cfeefa4e5deee3e7c6991aa870a981c8a424f53a8871f6a7231c2102",
"pubkey": "5f98adcb9f8f1df12f42924f38437efbf17ca00e34d26578d8df1593c2736faf",
"created_at": 1726312301,
"kind": 1,
"tags": [
[
"t",
"neovim"
],
[
"proxy",
"https://fosstodon.org/users/zeioth/statuses/113135603007679688",
"activitypub"
]
],
"content": "I've been scratching my head because on #neovim you cannot do\n\n```\nvim.g.myglobal.myfield = \"value\"\n```\n\nand trying to do so will do nothing and print no error.\n\nThe correct way is \n```\nlet newvalues = { myfield = \"hi\"}\nvim.g.myglobal = newvalues\n```\n\nWhich is totally cool, but having some error there would have saved me a good couple hours.",
"sig": "2c17b927daeda5062c52d2f9d85dcb31748d4ff2617e4c17d59fd207ae529578490485b7c95a6fa7f22ad7522d99e294d6d26518c6b9100fa30c3c8c6b96b300"
}