diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-27 18:03:36 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-27 18:03:36 +0900 |
| commit | ed7bbe9a9bfa703533e812e4f5d1e56a489d73af (patch) | |
| tree | 2f942ac91c1dfac4787c6299d1d9836efe9fbdf0 /mac/.config/TheSiahxyz/ftplugin/markdown.lua | |
| parent | 6edeeaeb1cdaac6b3ce0cff366aa82f3db13d6b3 (diff) | |
updated nvim configurations and created snippet for journal
Diffstat (limited to 'mac/.config/TheSiahxyz/ftplugin/markdown.lua')
| -rw-r--r-- | mac/.config/TheSiahxyz/ftplugin/markdown.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mac/.config/TheSiahxyz/ftplugin/markdown.lua b/mac/.config/TheSiahxyz/ftplugin/markdown.lua index 49cf4ee..9088e68 100644 --- a/mac/.config/TheSiahxyz/ftplugin/markdown.lua +++ b/mac/.config/TheSiahxyz/ftplugin/markdown.lua @@ -250,7 +250,7 @@ vim.api.nvim_create_autocmd("FileType", { -- 로컬 옵션 vim.bo.textwidth = tw - vim.bo.formatoptions = vim.bo.formatoptions .. "a" -- 자동 줄바꿈 활성화 + vim.bo.formatoptions = vim.bo.formatoptions:gsub("a", "") vim.opt_local.wrap = true vim.opt_local.linebreak = true vim.opt_local.breakindent = true @@ -462,6 +462,21 @@ vim.keymap.set( -- preview vim.keymap.set("n", "<leader>mp", ":MarkdownPreview<CR>", { desc = "Markdown preview" }) +-- snippet +local ls = require("luasnip") + +vim.keymap.set({ "i", "s" }, "<C-n>", function() + if ls.choice_active() then + ls.change_choice(1) + end +end, { silent = true, desc = "LuaSnip next choice" }) + +vim.keymap.set({ "i", "s" }, "<C-p>", function() + if ls.choice_active() then + ls.change_choice(-1) + end +end, { silent = true, desc = "LuaSnip prev choice" }) + -- traversal vim.keymap.set("n", "<Tab>", "<Plug>Markdown_Fold", { desc = "Tab is for moving around only" }) |
