Giter Site home page Giter Site logo

org-modern.nvim's Introduction

org-modern.nvim

About

This plugin adds a modern style to Org mode buffers.

Modern menu

Preview

The menu is used when selecting further actions in agenda, capture and export.

Modern menu preview

Configuration

In order to use a modern menu based on floating windows, you need:

  1. Load the org-modern.menu module.
  2. Create an instance of the menu class via the new function.
  3. Use the modern menu inside the handler function in the orgmode configuration.

Here is an example of orgmode configuration for using a modern menu:

local Menu = require("org-modern.menu")

require("orgmode").setup({
  ui = {
    menu = {
      handler = function(data)
        Menu:new({
          window = {
            margin = { 1, 0, 1, 0 },
            padding = { 0, 1, 0, 1 },
            title_pos = "center",
            border = "single",
            zindex = 1000,
          },
          icons = {
            separator = "โžœ",
          },
        }):open(data)
      end,
    },
  },
})

The following is a description of the menu configuration options:

  • window (table) โ€” used to configure the appearance of the menu window, the following options are available:
    • margin (table) โ€” size of the margins, they are set in the order {top, right, bottom, left}.
    • padding (table) โ€” size of the paddings, they are set in the order {top, right, bottom, left}.
    • title_pos (string) โ€” position of the title, the valid values are left, center, right.
    • border (string) โ€” border type, the valid values are none, single, double, rounded, solid, shadow.
    • zindex (number) โ€” stacking order (floats with higher zindex go on top on floats with lower indices), must be larger than zero.
  • icons (table) โ€” used for configuring icons, the following options are available:
    • separator (string) โ€” icon used between key and label.

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.