-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Crash when pressing <CR> in a table in normal mode #237
Comments
I need some more information in order to troubleshoot, as I can't reproduce this on my end. What's your config (or are you using the default)? Is it happening in any empty cell of a table? Can you share the text of a table where you're getting this behavior (not a screenshot). |
Steps:
I'm on NixOS (with nixvim), so maybe the defaults are different, but here's my config: {
programs.nixvim.plugins = {
mkdnflow = {
enable = true;
mappings = {
# Main
MkdnEnter = {
key = "<CR>";
modes = [ "n" "v" "i" ];
};
# Links
MkdnCreateLink = false;
MkdnCreateLinkFromClipboard = {
key = "<leader>lc";
modes = [ "n" "v" ];
};
MkdnDestroyLink = {
key = "<leader>dl";
modes = "n";
};
MkdnFollowLink = false;
MkdnNextLink = {
key = "<Tab>";
modes = "n";
};
MkdnYankAnchorLink = {
key = "ya";
modes = "n";
};
MkdnYankFileAnchorLink = {
key = "yfa";
modes = "n";
};
MkdnPrevLink = {
key = "<S-Tab>";
modes = "n";
};
MkdnDecreaseHeading = {
key = "-";
modes = "n";
};
MkdnExtendList = false;
MkdnFoldSection = {
key = "<leader>ff";
modes = "n";
};
MkdnUnfoldSection = {
key = "<leader>fu";
modes = "n";
};
MkdnGoBack = {
key = "<BS>";
modes = "n";
};
MkdnGoForward = {
key = "<Del>";
modes = "n";
};
MkdnIncreaseHeading = {
key = "+";
modes = "n";
};
MkdnMoveSource = {
key = "<F2>";
modes = "n";
};
MkdnNewListItem = false;
MkdnNewListItemAboveInsert = {
key = "O";
modes = "n";
};
MkdnNewListItemBelowInsert = {
key = "o";
modes = "n";
};
MkdnNextHeading = {
key = "]]";
modes = "n";
};
MkdnPrevHeading = {
key = "[[";
modes = "n";
};
MkdnSTab = false;
MkdnTab = false;
MkdnTableFormat = {
key = "<leader>ft";
modes = "n";
};
MkdnTableNewColAfter = {
key = "<leader>ic";
modes = "n";
};
MkdnTableNewColBefore = {
key = "<leader>iC";
modes = "n";
};
MkdnTableNewRowAbove = {
key = "<leader>iR";
modes = "n";
};
MkdnTableNewRowBelow = {
key = "<leader>ir";
modes = "n";
};
MkdnTableNextCell = {
key = "<S-Tab>";
modes = "i";
};
MkdnTableNextRow = false;
MkdnTablePrevCell = {
key = "<M-Tab>";
modes = "i";
};
MkdnTablePrevRow = {
key = "<M-CR>";
modes = "i";
};
MkdnToggleToDo = {
key = "<C-Space>";
modes = [ "n" "v" ];
};
MkdnUpdateNumbering = {
key = "<leader>nn";
modes = "n";
};
};
};
};
} |
Thanks for the info! I'll get back to you soon, hopefully tomorrow. |
Ok, I think I'd like to take a look at the config as it is interpreted by the plugin, just in case there's some kind of issue mapping the Nix file to Lua. Can you paste the output of |
Sure, here's it: {
bib = {
find_in_root = true
},
create_dirs = true,
cursor = {},
filetypes = {
markdown = true,
md = true,
rmd = true
},
foldtext = {
fill_chars = {
item_separator = " · ",
left_edge = "⢾⣿⣿",
left_inside = " ⣹",
middle = "⣿",
right_edge = "⣿⣿⡷",
right_inside = "⣏ ",
section_separator = " ⣹⣿⣏ "
},
line_count = true,
line_percentage = true,
object_count = true,
object_count_icon_set = "emoji",
object_count_opts = <function 1>,
title_transformer = <function 2>,
word_count = false
},
links = {
conceal = false,
context = 0,
create_on_follow_failure = true,
name_is_source = false,
style = "markdown",
transform_explicit = <function 3>,
transform_implicit = false
},
mappings = {
MkdnCreateLink = false,
MkdnCreateLinkFromClipboard = { { "n", "v" }, "<leader>lc" },
MkdnDecreaseHeading = { "n", "-" },
MkdnDestroyLink = { "n", "<leader>dl" },
MkdnEnter = { { "n", "v", "i" }, "<CR>" },
MkdnExtendList = false,
MkdnFoldSection = { "n", "<leader>ff" },
MkdnFollowLink = false,
MkdnGoBack = { "n", "<BS>" },
MkdnGoForward = { "n", "<Del>" },
MkdnIncreaseHeading = { "n", "+" },
MkdnMoveSource = { "n", "<F2>" },
MkdnNewListItem = false,
MkdnNewListItemAboveInsert = { "n", "O" },
MkdnNewListItemBelowInsert = { "n", "o" },
MkdnNextHeading = { "n", "]]" },
MkdnNextLink = { "n", "<Tab>" },
MkdnPrevHeading = { "n", "[[" },
MkdnPrevLink = { "n", "<S-Tab>" },
MkdnSTab = false,
MkdnTab = false,
MkdnTableFormat = { "n", "<leader>ft" },
MkdnTableNewColAfter = { "n", "<leader>ic" },
MkdnTableNewColBefore = { "n", "<leader>iC" },
MkdnTableNewRowAbove = { "n", "<leader>iR" },
MkdnTableNewRowBelow = { "n", "<leader>ir" },
MkdnTableNextCell = { "i", "<S-Tab>" },
MkdnTableNextRow = false,
MkdnTablePrevCell = { "i", "<M-Tab>" },
MkdnTablePrevRow = { "i", "<M-CR>" },
MkdnTagSpan = { "v", "<M-CR>" },
MkdnToggleToDo = { { "n", "v" }, "<C-Space>" },
MkdnUnfoldSection = { "n", "<leader>fu" },
MkdnUpdateNumbering = { "n", "<leader>nn" },
MkdnYankAnchorLink = { "n", "ya" },
MkdnYankFileAnchorLink = { "n", "yfa" }
},
modules = {
bib = true,
buffers = true,
cmp = false,
conceal = true,
cursor = true,
folds = true,
foldtext = true,
links = true,
lists = true,
maps = true,
paths = true,
tables = true,
yaml = false
},
new_file_template = {
placeholders = {
after = {},
before = {
date = "os_date",
title = "link_title"
}
},
template = "# {{title}}",
use_template = false
},
perspective = {
fallback = "current",
nvim_wd_heel = false,
priority = "first",
root_tell = false,
update = true
},
silent = false,
tables = {
auto_extend_cols = false,
auto_extend_rows = false,
format_on_move = true,
style = {
cell_padding = 1,
mimic_alignment = true,
outer_pipes = true,
separator_padding = 1
},
trim_whitespace = true
},
to_do = {
complete = "X",
in_progress = "-",
not_started = " ",
symbols = { " ", "-", "X" },
update_parents = true
},
wrap = false,
yaml = {
bib = {
override = false
}
}
} |
Hi @anotherhadi, this should be fixed now in the latest version. Although it won't freeze up now, I suspect the behavior you're looking for in this case is to go to the same column in the next row in the table when hitting enter in normal mode. Is that right? With the current version of A workaround for the attempted link creation is to set Let me know if you're still experiencing the issue after updating, and let me know if you have any questions. Thanks for reporting the issue! |
Hi, thanks for the quick answer! |
When pressing (MkdnEnter) on a empty cell in a table in normal mode my nvim session crash.
The text was updated successfully, but these errors were encountered: