You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require('neorg').setup {
load= {
["core.defaults"] = {},
["core.dirman"] = { -- Manages Neorg workspacesconfig= {
workspaces= {
-- TODO: get a good subfolder structure here that mirrors my actual dirsgeneral="~/Notes/general",
work="~/Notes/work",
uni="~/Notes/uni"
}
}
},
["core.journal"] = {
config= {
strategy="flat"
}
},
["core.export"] = {},
-- manoeuvre has been depreceated since 1.0.0-- ["core.manoeuvre"] = {},
["core.concealer"] = {},
["core.summary"] = {
config= {
-- switch to headings when readystrategy="metadata"
}
},
-- will work in nvim 0.10 -- ["core.ui.calendar"] = {},
["core.presenter"] = {
config= {
zen_mode="truezen"
}
},
["core.integrations.telescope"] = {},
["external.auto-cats"] = {},
},
}
require('nvim-treesitter.configs').setup {
ensure_installed= { "norg" --[[ other parsers you would wish to have ]] },
highlight= {
-- Be sure to enable highlights if you haven't!enable=true,
}
}
Actual behavior
I started on a plugin that is supposed to auto inject and update the metadata categories. It also directories from the path relative to the workspace. The full plugin is at https://github.com/git-girl/neorg-auto-cats.
For updating the metadata if it is already there i used the core.integrations.treesitter.get_document_metadata() method. when printing out the returned table i get:
{
categories = "created: 2023-05-23",
description = "authors: cherry-cat",
title = "index",
updated = "2023-05-28",
version = "1.1.1"
}
So the empty attributes are being filled with the key and value of the one below.
I think this is actually an issue in nvim-neorg/tree-sitter-norg as the video shows that the key value pairs are mismatched in treesitter.
Expected behavior
For core.integration.treesitter.get_document_metadata() to return :
{
categories = "",
created: "2023-05-23",
description = ""
authors: cherry-cat,
title = "index",
updated = "2023-05-28",
version = "1.1.1"
}
when the document has this metadata:
```norg
@document.meta
title: index
description:
authors: cherry-cat
categories:
created: 2023-05-23
updated: 2023-05-28
version: 1.1.1
@end
Steps to reproduce
Open a .norg file
Run :Neorg inject_metadata (that leaves empty metadata attributes)
Run :lua print(vim.inspect(neorg.modules.get_module('core.integrations.treesitter').get_document_metadata()))
Potentially conflicting plugins
This is my packer setup idk if i messed stuff up there:
use {
'nvim-neorg/neorg',
after= { "nvim-treesitter" }, -- You may want to specify Telescope here as wellrequires= {
{'nvim-lua/plenary.nvim' },
{'Pocco81/true-zen.nvim'},
{'nvim-neorg/neorg-telescope'},
},
run=":Neorg sync-parsers",
}
Prerequisites
Neovim Version
NVIM v0.9.0 Build type: Release LuaJIT 2.1.0-beta3
Neorg setup
Actual behavior
I started on a plugin that is supposed to auto inject and update the metadata categories. It also directories from the path relative to the workspace. The full plugin is at https://github.com/git-girl/neorg-auto-cats.
For updating the metadata if it is already there i used the
core.integrations.treesitter.get_document_metadata()
method. when printing out the returned table i get:the actual metadata is this though:
So the empty attributes are being filled with the key and value of the one below.
I think this is actually an issue in nvim-neorg/tree-sitter-norg as the video shows that the key value pairs are mismatched in treesitter.
Expected behavior
For
core.integration.treesitter.get_document_metadata()
to return :{
categories = "",
created: "2023-05-23",
description = ""
authors: cherry-cat,
title = "index",
updated = "2023-05-28",
version = "1.1.1"
}
Steps to reproduce
:Neorg inject_metadata
(that leaves empty metadata attributes):lua print(vim.inspect(neorg.modules.get_module('core.integrations.treesitter').get_document_metadata()))
Potentially conflicting plugins
This is my packer setup idk if i messed stuff up there:
Other information
:TSInstallInfo
shows:Here is a video showing that there is something wrong with the actual treesitter symbols:
https://asciinema.org/a/X9LbaVZjO1cpIRt3nIdkwPPtA
Help
I dont know i'll try checkig stuff out and if i see an easy fix then id make a pr but i dont know C at even a basic level and am scared of it.
Implementation help
The text was updated successfully, but these errors were encountered: