WIP: Lua documentation#1
WIP: Lua documentation#1tjdevries wants to merge 7 commits intonvim-treesitter:masterfrom tjdevries:tjdevries/lua_documentation
Conversation
|
Sounds great so far ! Will it allow to parse what is inside the comments ? |
|
Yes, when I move from C -> JS you can do something like it first hits |
|
|
Now requires: neovim/neovim#12388 (exposes some new non-buffer related endpoints) Current status: |
|
from lua file: local x = {}
--- hello world
--@param y: add 1
x.my_func = function(y)
return y + 1
end
--- hello world
--@param wow: another value
--@param two_vars: final param
x.other_func = function(wow, two_vars)
return wow + 2
end
return {
something = x
} |
Now sees name redirects on module returns |
|
After some thinking, I think that creating a dedicated parser for doc comments and using language injection can be better, what do you think about that ? |
|
I'd be happy to do that if I can find a way to do it. The documentation is difficult to understand regarding the injection. All of the important parts of the parser will be easy to see and abstract whenever we want. |
|
Now that injection is on it's way, we really should be thinking about how we can separate this comment parsing in its own parser. |
WIP.
It appears that I formatted the JS file and generated a lot of changes...
@vigoux want to pick a formatter that we can run over
grammar.jsto make sure we have the same format?