C++ since 2011 has support for lambdas and I make heavy use of these. It would be nice if a line, or function where lambda was passed, was shown as a context - similar to if.
Here is an example of lambda use with for_each: https://stackoverflow.com/questions/11502523/how-to-use-lambda-in-for-each
Lambdas have a list what and how they capture in [] then template specifier <> then parameters almost like normal function (...) then -> return type and then code block {...}.
examples of captures: [], [&], [=], [&var1,=var2]
Neovim version
0.10.0
Expected behavior
a line with for_each(... [](...) { is shown on top as another context node
Actual behavior
nothing is shown on top
Minimal config
local plugins = {
ts = 'https://github.com/nvim-treesitter/nvim-treesitter',
ts_context = 'https://github.com/nvim-treesitter/nvim-treesitter-context',
-- ADD ADDITIONAL PLUGINS THAT ARE _NECESSARY_ TO REPRODUCE THE ISSUE
}
for name, url in pairs(plugins) do
local install_path = '/tmp/nvim/site/'..name
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.o.runtimepath = install_path..','..vim.o.runtimepath
end
-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
Description
C++ since 2011 has support for lambdas and I make heavy use of these. It would be nice if a line, or function where lambda was passed, was shown as a context - similar to if. Here is an example of lambda use with for_each: https://stackoverflow.com/questions/11502523/how-to-use-lambda-in-for-each
Lambdas have a list what and how they capture in
[]
then template specifier<>
then parameters almost like normal function(...)
then-> return type
and then code block{...}
.examples of captures:
[]
,[&]
,[=]
,[&var1,=var2]
Neovim version
0.10.0
Expected behavior
a line with
for_each(... [](...) {
is shown on top as another context nodeActual behavior
nothing is shown on top
Minimal config
Steps to reproduce