Giter VIP home page Giter VIP logo

prev-mark.nvim's Introduction

lua-preview.nvim

Open the current buffer Markdown in a Web browser with :PrevMark.

Install

  • lazy.nvim

    local plugins = {
      {"asana17/prev-mark.nvim"},
    }

    Or you can use the local one.

    local plugins = {
      {"prev-mark", dir = "~/prev-mark.nvim"},
    }
  • Configuration Setup

    Following setup is using default values.

    require("prev-mark").setup(
      {
        verbose = false,
        server = {
          port = 8000,
          wait_limit = 1000, -- limit time in ms to wait for server to start
        },
        preview = {
          directory = "<plugin_dir>/.preview", -- directory to place preview temporaly files
          css = "<plugin_dir>/node/config/preview.css", -- CSS attached to the preview
          open_browser = true, -- open browser if true, otherwise do not open
          browse_command = "", -- command to start browser
          show_url = false, -- show the preview file URL in the small window
        },
      }
    )

Preview on remote server

Access preview URL from local browser. This requres following steps.

Specify following configuration:

require("prev-mark").setup(
  {
    server = {
      port = 8001,
    },
    preview = {
      open_browser = false, -- do not open the browser
      show_url = true, -- show the url in the small window
    },
  }
)

Connect remote server with ssh port forwarding:

ssh -L 8001:localhost:8001 user@remote

To suppress the open error from ssh, use quiet option -q.

Host remote
  HostName remote
  User user
  RemoteForward 8001 localhost:8001
  LogLevel QUIET

Before commit

Use pre-commit. Follow the official Quick start.

Use Conventional Commits.

prev-mark.nvim's People

Contributors

asana17 avatar

Stargazers

seint avatar Yuta Katayama avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.