chipsenkbeil / org-mouse.nvim

Mouse features on top of nvim-orgmode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

org-mouse.nvim logo

org-mouse.nvim

Adds mouse features to neovim using nvim-orgmode.

Requires neovim 0.9.2+.

Installation

This plugin depends on nvim-orgmode/orgmode.

lazy.nvim (recommended)

Code Example
{
  "chipsenkbeil/org-mouse.nvim",
  dependencies = { "nvim-orgmode/orgmode" },
  config = function()
    require("org-mouse").setup()
  end
}

packer.nvim

Code Example
use {
  "chipsenkbeil/org-mouse.nvim",
  requires = { "nvim-orgmode/orgmode" },
  config = function()
    require("org-mouse"):setup()
  end
}

Examples

Link Highlighting by Hover

Navigating Links by Click

Configuration

click_open_links

If true, clicking on links will open them.

Takes a boolean. Defaults to true.

require("org-mouse"):setup({
  click_open_links = false,
})

highlight_links

If true, highlights links when mousing over them.

This will enable vim.opt.mouseoverevent if disabled!

Takes a boolean. Defaults to true.

require("org-mouse"):setup({
  highlight_links = false,
})

highlight_links_group

Highlight group to apply when highlighting links.

Takes a string. Defaults to WarningMsg.

require("org-mouse"):setup({
  highlight_links_group = "Comment",
})

filetypes

Specifies filetypes where mouse events will be bound.

This is leveraged during setup to configure a FileType autocmd to attach keybindings for <MouseMove> and <LeftRelease> to support mouse interactions.

Takes a list of strings. Defaults to {"org", "org-*"}.

Notice that the strings are in pattern format, meaning you can use wildcards to support multiple filetypes.

require("org-mouse"):setup({
  filetypes = { "org", "org-*", "org-custom-*" },
})

About

Mouse features on top of nvim-orgmode.

License:MIT License


Languages

Language:Lua 100.0%