From 6a69cfc842b696276f0fc088d891c4e35724f27a Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sun, 24 Sep 2023 04:40:20 +0200 Subject: [PATCH] Add markdown-preview --- lua/plugins/config/markdown-preview.lua | 23 +++++++++++++++++++++++ lua/plugins/init.lua | 5 +++++ 2 files changed, 28 insertions(+) create mode 100644 lua/plugins/config/markdown-preview.lua diff --git a/lua/plugins/config/markdown-preview.lua b/lua/plugins/config/markdown-preview.lua new file mode 100644 index 0000000..cb10268 --- /dev/null +++ b/lua/plugins/config/markdown-preview.lua @@ -0,0 +1,23 @@ +--[[ + Copyright 2023 Oscar Wallberg + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +]] + +-- https://github.com/iamcco/markdown-preview.nvim + +vim.g.mkdp_filetypes = { "markdown", } +vim.g.mkdp_port = "9080" +vim.g.mkdp_echo_preview_url = 1 +vim.g.mkdp_open_ip = "192.168.2.22" +vim.g.mkdp_open_to_the_world = 1 diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 6ea0981..a0f2d9d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -230,6 +230,11 @@ local plugins = { "nvim-tree/nvim-web-devicons", }, }, + { + "iamcco/markdown-preview.nvim", + build = "cd app && npm install", + config = function () require("plugins.config.markdown-preview") end, + }, } local opts = {}