From 978ff5d6d91a00f15a184827d895d8513c866433 Mon Sep 17 00:00:00 2001 From: Alexander Muszynski Date: Sat, 27 Jul 2024 08:05:15 -0400 Subject: [PATCH] markdownpreview, conform settings --- init.lua | 5 +++-- lua/custom/plugins/init.lua | 12 +++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 5ce1f12..6cece01 100644 --- a/init.lua +++ b/init.lua @@ -669,7 +669,7 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } + local disable_filetypes = { c = true, cpp = true, typescript = true, javascript = true } return { timeout_ms = 500, lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], @@ -682,8 +682,9 @@ require('lazy').setup({ -- -- You can use a sub-list to tell conform to run *until* a formatter -- is found. + markdown = { 'markdownlint', 'marksman' }, javascript = { { 'prettierd', 'prettier' } }, - typescript = { { 'prettierd', 'prettier' } }, + typescript = { { 'eslint', 'prettierd', 'prettier' } }, typescriptreact = { { 'prettierd', 'prettier' } }, }, }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d..a8047e1 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,14 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + 'iamcco/markdown-preview.nvim', + cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, + build = 'cd app && yarn install', + init = function() + vim.g.mkdp_filetypes = { 'markdown' } + end, + ft = { 'markdown' }, + }, +}