Coder Social home page Coder Social logo

lvim-tech / lvim-helper Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 246 KB

LVIM HELPER - Neovim plugin written in Lua. Show your custom help files.

Home Page: https://github.com/lvim-tech/lvim-helper

License: BSD 3-Clause "New" or "Revised" License

Lua 100.00%

lvim-helper's People

Contributors

lvim-tech avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

lvim-helper's Issues

Gotten E5108 error from trying to use.

I've gotten this from running LvimHelper

E5108: Error executing lua ...pack/packer/start/lvim-helper/lua/lvim-helper/render.lua:11: bad argument #1 to 'pairs' (
table expected, got nil)

I installed plugin using packer.

added

require('lv-lvim-helper')
to my init.lua

and then
inside the file

local home = os.getenv('HOME')
require('lvim-helper').setup({
    files = {
        home .. '.config/nvim/lua/lv-lvim-helper/test.md',
    },
    width = 80,
    side = 'right',
    current_file = 1,
    winopts = {
        relativenumber = false,
        number = false,
        list = false,
        winfixwidth = true,
        winfixheight = true,
        foldenable = false,
        spell = false,
        signcolumn = 'no',
        foldmethod = 'manual',
        foldcolumn = '0',
        cursorcolumn = false,
        colorcolumn = '0',
        wrap = false,
        winhl = table.concat({'Normal:LvimHelperNormal'}, ',')
    },
    bufopts = {
        swapfile = false,
        buftype = 'nofile',
        modifiable = false,
        filetype = 'LvimHelper',
        bufhidden = 'hide'
    }
})

Altho not sure if any settings even caused that problem or if its about something else.

I am using nvim --version
NVIM v0.5.0-dev+0d7e33b

lvim_helper_callback changed?

module 'lvim-helper.bindings' not found when I open nvim after updating to latest version.

lvim_helper_bindings.bindings = {
    ["n"] = lvim_helper_bindings.lvim_helper_callback("next"),
    ["q"] = lvim_helper_bindings.lvim_helper_callback("close")
}

Problematic configs are here, but not sure how to fix.

The way to define keybinding?

Sorry for asking dumb questions but based on the documentation

IMPORTANT: Define before require('lvim-helper').setup({...})

So I've added these bindings, but it didnt seem to react from n,p or q mappings.

local lvim_helper_bindings = require('lvim-helper.bindings');
lvim_helper_bindings.bindings = {
    ["n"] = lvim_helper_bindings.lvim_helper_callback("next"),
    ["p"] = lvim_helper_bindings.lvim_helper_callback("prev"),
    ["q"] = lvim_helper_bindings.lvim_helper_callback("close")
}

local home = os.getenv('HOME')
require('lvim-helper').setup({
    files = {
        home .. '/.config/nvim/lua/lv-lvim-helper/testi.md',
        home .. '/.config/nvim/lua/lv-lvim-helper/testi2.md',
    },
    width = 80,
    side = 'right',
    current_file = 1,
    winopts = {
        relativenumber = false,
        number = false,
        list = false,
        winfixwidth = true,
        winfixheight = true,
        foldenable = false,
        spell = false,
        signcolumn = 'no',
        foldmethod = 'manual',
        foldcolumn = '0',
        cursorcolumn = false,
        colorcolumn = '0',
        wrap = false,
        winhl = table.concat({'Normal:LvimHelperNormal'}, ',')
    },
    bufopts = {
        swapfile = false,
        buftype = 'nofile',
        modifiable = false,
        filetype = 'LvimHelper',
        bufhidden = 'hide'
    }
})

Doesn't seem to work with nvim 0.7.2

E5108: Error executing lua ...pack/packer/start/lvim-helper/lua/lvim-helper/render.lua:10: argument 1 expected a 'string', got a 'nil'
stack traceback:
[C]: in function 'error'
.../pack/packer/start/lvim-helper/lua/lvim-helper/utils.lua:58: in function 'assert_string'
.../pack/packer/start/lvim-helper/lua/lvim-helper/utils.lua:67: in function 'readlines'
...pack/packer/start/lvim-helper/lua/lvim-helper/render.lua:10: in function 'render'
...te/pack/packer/start/lvim-helper/lua/lvim-helper/win.lua:26: in function 'win_open'
...ack/packer/start/lvim-helper/lua/lvim-helper/actions.lua:45: in function 'open'
...m/site/pack/packer/start/lvim-helper/lua/lvim-helper.lua:16: in function 'toggle'
[string ":lua"]:1: in main chunk

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.