From f1b3356689003abe9edb5a46d4a091b0a41d7306 Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Fri, 13 Feb 2026 07:46:40 +0530 Subject: moving vimscript configs to lua config Signed-off-by: Brahmajit Das --- after/ftplugin/markdown.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 after/ftplugin/markdown.lua (limited to 'after/ftplugin/markdown.lua') diff --git a/after/ftplugin/markdown.lua b/after/ftplugin/markdown.lua new file mode 100644 index 0000000..f63e1ce --- /dev/null +++ b/after/ftplugin/markdown.lua @@ -0,0 +1,32 @@ +-- Table mode (buffer-local where appropriate) +vim.b.table_mode_corner = "|" +vim.b.table_mode_corner_corner = "|" +vim.b.table_mode_header_fillchar = "-" +vim.g.table_mode_align_char = ":" + +-- vim-markdown settings (globals expected by the plugin) +vim.g.vim_markdown_folding_disabled = 1 +vim.g.vim_markdown_conceal = 0 +vim.g.vim_markdown_anchorexpr = "'<<'.v:anchor.'>>'" + +-- Spell + wrapping +vim.opt_local.spell = true +vim.opt_local.spelllang = { "en_us" } +vim.opt_local.textwidth = 72 +vim.opt_local.colorcolumn = "72" + +-- Do not highlight concealed text +vim.api.nvim_set_hl(0, "Conceal", { + ctermbg = "NONE", + ctermfg = "NONE", + bg = "NONE", + fg = "NONE", +}) + +-- Make `gf` create new files if not exists (buffer-local mapping) +vim.keymap.set("n", "gf", function() + vim.cmd.edit(vim.fn.expand("")) +end, { buffer = true, silent = true }) + +-- Ignore Javadoc in Java (global) +vim.g.java_ignore_javadoc = 1 -- cgit v1.2.3