treesitter-unit
treesitter-unit copied to clipboard
Tested in this language
for view language that supports now treesitter-unit
, I add this table for fill later.
Hi @ayoubelmhamdi ,
Thank you very much for this PR, really appreciated!
But I'm not sure if we should put this information in the README
as this list can be outdated pretty fast. Thus, I'd prefer to just provide a link to this list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
What do you think?
Thanks and best regards, David
I think, not all languages work better like demo
for example with Lua: sumneko_lua lsp
:
function aaa()
[cursor 1] -- test 1 at column 0
-- [cursor 2] test 12 at comumn 4
a=9
end
in cursor 1: if I use viu
will select all function like vau
in cursor 2: if I use viu
will select line like ^v$
also, I tested with dartls
but did not work properly!
Hi @ayoubelmhamdi ,
I've tested it with lua and it works equally good as in JavaScript.
If I define this function
function aaa()
-- test 1 at column 0
-- [cursor 2] test 12 at comumn 4
a=9
end
Then viu
will select the whole function if my cursor is before any sub unit (as expected).
If I place my cursor on a sub unit (e.g. the comment), then only the sub unit is selected.
But you're right about Dart
, the treesitter definitions are a bit weird (the function signature is on another leaf as the function body). I'm afraid that will be impossible to fix (without having language-specific coding).
Thank you for testing, then I guess we should include that list!
Thanks and best regards, David
But one small question: There's still Dart
inside your list, shouldn't we remove it?
in Lua:
if cursor at 0
i think, viu
should be like vi{
not va{
in Lua: if cursor at 0 i think,
viu
should be likevi{
notva{
u
is not really a bracket-like object. It's more like a paragraph object, so it should behave more like dip
and dap
, right?
Best regards, David