telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

chore: add type annotations

Open jamestrew opened this issue 1 year ago • 8 comments

trying something out. I like types and I think it can help with our documentation deficiencies as well (eg. confusions around why you can pass default_text to find_files and why it's not documented, where to document it, etc, but this might need some enhancements to tree-sitter-lua since the newer luals luacats annotation support is limited).

jamestrew avatar Jan 10 '24 04:01 jamestrew

@Conni2461 what do you think?

jamestrew avatar Jan 10 '24 04:01 jamestrew

i guess we can do that. i havent made up my mind regarding lua language servers annotations. they aren't compatible with emmylua annotations which are used within docgen (its uses a lua treesitter parser with emmylua support).

fyi there is also this: https://github.com/nvim-telescope/telescope.nvim/pull/1954

Conni2461 avatar Jan 18 '24 10:01 Conni2461

they aren't compatible with emmylua annotations which are used within docgen (its uses a lua treesitter parser with emmylua support).

Yeah I actually made an issue on tree-sitter-lua about (me) potentially adding or converting the ts grammar to support luals annotations.

I know this is something neovim core eventually would like for their docgen purposes as well. Somebody just needs to do it.

jamestrew avatar Jan 18 '24 11:01 jamestrew

FYI I replaced telescope-file-browser's docgen with an alternative I've been working on. HEAVILY based on neovim core's docgen script, integrating LuaCATS much more.

Looking to make a similar conversion for telescope core to enable changes like those in this PR.

https://github.com/nvim-telescope/telescope-file-browser.nvim/pull/399

jamestrew avatar Jul 21 '24 19:07 jamestrew