You can get the names of the non list columns and then nest by name. Something like this:
library(dplyr)
library(tidyr)
# example df
df <- tibble(
vec_col1 = 1:10,
vec_col2 = 11:20,
list_col1 = as.list(1:10),
list_col2 = as.list(11:20)
)
# get non list columns
col_classes <- sapply(df, class)
non_list_cols <- names(col_classes)[col_classes != "list"]
# nest by column name
df %>%
nest(data = matches(non_list_cols))
# # A tibble: 10 x 3
# list_col1 list_col2 data
# <list> <list> <list>
# 1 <int [1]> <int [1]> <tibble [1 × 2]>
# 2 <int [1]> <int [1]> <tibble [1 × 2]>
# 3 <int [1]> <int [1]> <tibble [1 × 2]>
# 4 <int [1]> <int [1]> <tibble [1 × 2]>
# 5 <int [1]> <int [1]> <tibble [1 × 2]>
# 6 <int [1]> <int [1]> <tibble [1 × 2]>
# 7 <int [1]> <int [1]> <tibble [1 × 2]>
# 8 <int [1]> <int [1]> <tibble [1 × 2]>
# 9 <int [1]> <int [1]> <tibble [1 × 2]>
# 10 <int [1]> <int [1]> <tibble [1 × 2]>