davidgranstrom / scnvim

Neovim frontend for SuperCollider.
GNU General Public License v3.0
197 stars 26 forks source link

[BUG] Error using pandoc on Linux #225

Closed riordant closed 1 year ago

riordant commented 1 year ago

Installed pandoc to use nvim help docs but it doesn't seem to be working.

:checkhealth scnvim:

==============================================================================
scnvim: require("scnvim.health").check()

scnvim ~
- OK nvim version 0.9.0
- OK sclang executable: /usr/local/bin/sclang
- OK scnvim classes are installed: /home/riordant/.local/share/SuperCollider/Extensions/scide_scnvim
- OK keymaps are defined

scnvim documentation ~
- OK /usr/bin/pandoc
- OK { "$1", "--from", "html", "--to", "plain", "-o", "$2" }

scnvim extensions ~

pandoc version (latest):

❯ pandoc --version
pandoc 3.1.8
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /home/riordant/.local/share/pandoc
Copyright (C) 2006-2023 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

which pandoc: /usr/bin/pandoc

Error output:

Error executing vim.schedule lua callback: /home/riordant/.vim/plugged/scnvim/lua/scnvim/help.lua:191: Could not find docmap.json
stack traceback:
        [C]: in function 'assert'
        /home/riordant/.vim/plugged/scnvim/lua/scnvim/help.lua:191: in function 'get_docmap'
        /home/riordant/.vim/plugged/scnvim/lua/scnvim/help.lua:162: in function 'find_methods'
        /home/riordant/.vim/plugged/scnvim/lua/scnvim/help.lua:224: in function 'callback'
        /home/riordant/.vim/plugged/scnvim/lua/scnvim/udp.lua:38: in function 'func'
        /home/riordant/.vim/plugged/scnvim/lua/scnvim/udp.lua:53: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

init.lua:

local scnvim = require 'scnvim'
local map = scnvim.map
local map_expr = scnvim.map_expr

scnvim.setup({
  keymaps = {
    ['<M-e>'] = map('editor.send_line', {'i', 'n'}),
    ['<C-e>'] = {
      map('editor.send_block', {'i', 'n'}),
      map('editor.send_selection', 'x'),
    },
    ['<CR>'] = map('postwin.toggle'),
    ['<M-CR>'] = map('postwin.toggle', 'i'),
    ['<M-c>'] = map('postwin.clear', {'n', 'i'}),
    ['<C-k>'] = map('signature.show', {'n', 'i'}),
    ['<M-s>'] = map('sclang.hard_stop', {'n', 'x', 'i'}),
    ['<leader>st'] = map('sclang.start'),
    ['<leader>sk'] = map('sclang.recompile'),
    ['<M-b>'] = map_expr('s.boot'),
    ['<F2>'] = map_expr('s.meter'),
  },
  editor = {
    highlight = {
      color = 'IncSearch',
    },
  },
  documentation = {
    cmd = '/usr/bin/pandoc',
  }
})

Expected behavior Documentation display within nvim

Steps to reproduce

Additional context

Information

riordant commented 1 year ago

Error on my behalf, no documentation for the methods i had highlighted, but for classes it works.