Depending what type of language I use, I would like to dynamically insert either at top or at cursor.
E.g. In C++ I want to insert always at the cursor, because my imports won't be sorted correctly, in python my imports are sorted, hence inserting at top is completely fine.
For anyone searching this is my workaround for that:
local insert_at_top = true
if vim.bo.ft == "cpp" then
insert_at_top = false
end
require("import.picker")({ insert_at_top = insert_at_top })
Depending what type of language I use, I would like to dynamically insert either at top or at cursor. E.g. In C++ I want to insert always at the cursor, because my imports won't be sorted correctly, in python my imports are sorted, hence inserting at top is completely fine.
For anyone searching this is my workaround for that: