vim-sleuth
vim-sleuth copied to clipboard
Wrongly guessed shiftwidth
trafficstars
I just found that vim-sleuth will set shiftwidth to 36 with the below example:
#include <span>
#include <vector>
template <typename T, typename Cmp = std::less<T>>
std::vector<int> get_cartesian_tree(std::span<T> sequence,
auto &&cmp = Cmp{}) {
std::vector<int> parents(sequence.size());
int a;
int b;
int c;
return parents;
}
template <typename T, typename Cmp = std::less<T>>
std::vector<int> get_cartesian_tree(const std::vector<T> &sequence,
auto &&cmp = Cmp{}) {
int d;
int e;
int f;
return get_cartesian_tree(sequence, std::move(cmp));
}
I think it's sensible for human to guess the intended shiftwidth is 2.
I would happy if vim-sleuth can handle this scenario.
Still thanks for the nice plugin :)