Giter Club home page Giter Club logo

nvim-libmodal's Introduction

nvim-libmodal

This is a rewrite of vim-libmodal using Neovim's Lua API. This project aims to be cross-compatable with vim-libmodalโ€” with a few notable exceptions (see the FAQ).

Requirements

  • Neovim 0.7+.
  • vim-libmodal is not installed.

Installation

You can use packer.nvim (or any package manager) to install this plugin. The below example is for packer.nvim:

local install_path = vim.fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'

if not vim.loop.fs_stat(vim.fn.glob(install_path)) then
	os.execute('git clone https://github.com/wbthomason/packer.nvim '..install_path)
end

vim.api.nvim_command 'packadd packer.nvim'

return require('packer').startup {function(use)
	use {'wbthomason/packer.nvim', opt=true}
	use 'Iron-E/nvim-libmodal'
	-- use {'Username/mode-plugin', wants='nvim-libmodal'}
end}

Usage

The following plugins have been constructed using nvim-libmodal:

The following samples have been constructed using nvim-libmodal:

See docs for more information.

Statusline

You can add libmodal modes to your status line by using feline.nvim or galaxyline.nvim or . You can find my configuration for feline.nvim here and galaxyline.nvim hereโ€” both of which leverage nvim-libmodal's in the statusbar.

FAQ

nvim-libmodal vs. vim-libmodal

The following is a list of expressions that work in nvim-libmodal but not vim-libmodal:

  • require 'libmodal' in Lua.
    • vim-libmodal does not support interacting with it through Lua, you must use the Vimscript interface.

The following is a list of expressions that work in vim-libmodal but not nvim-libmodal:

  • call libmodal#Enter('FOO', funcref('bar'), baz) in Vimscript.
    • Lua does not support passing funcrefs from Vimscript. Try using the Lua interface instead.
  • call libmodal#Prompt('FOO', funcref('bar'), baz) in Vimscript.
    • Lua does not support passing funcrefs from Vimscript. Try using the Lua interface instead.

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.