Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown function: ParinferIndent (only for .xtm file extension) #30

Open
bryanmaina opened this issue Nov 28, 2016 · 8 comments
Open

Unknown function: ParinferIndent (only for .xtm file extension) #30

bryanmaina opened this issue Nov 28, 2016 · 8 comments

Comments

@bryanmaina
Copy link

If I open a file with the following extension .xtm (which uses Lisp style expressions) and try to edit, I get this error in neovim:

Error detected while processing function <SNR>100_indent:                        
line    6:                                                                          
E117: Unknown function: ParinferIndent

This also happens only if I have 'timburgess/extempore.vim' installed. If I remove it there is no more problem. But I need extempore plugin to work with extempore.

I just added to my vimrc:

au BufNewFile,BufRead *.xtm let g:parinfer_mode = "off"

to avoid this error while waiting to know what's going wrong.

@BerkeleyTrue
Copy link

I'm also running into this error but in .cljs files as well.

@snoe
Copy link
Member

snoe commented Feb 15, 2017

For clojure @BerkeleyTrue, this is usually caused by not running :UpdateRemotePlugins it should give you feedback that it's registering nvim-parinfer.

@bryanmaina if I add the extempore.vim plugin and add a au BufNewFile,BufRead *.xtm set filetype=lisp line to my rc file, parinfer starts and runs without a problem. It sounds like it could be the same :UpdateRemotePlugins but unfortunately that's about as far as I can troubleshoot this without a repro.

@snoe snoe closed this as completed Feb 15, 2017
@BerkeleyTrue
Copy link

@snoe Unfortunately that does not seems to change things. This is the output from UpdateRemotePlugins

function remote#host#UpdateRemotePlugins[6]..<SNR>47_RegistrationCommands[13]..remote#host#RegisterPlugin, line 5
Plugin "/Users/berkeley/.config/nvim/plugged/clj-refactor.nvim/rplugin/node/clj-refactor.js" is already registered
remote/host: python3 host registered plugins ['deoplete']
remote/host: generated rplugin manifest: /Users/berkeley/.local/share/nvim/rplugin.vim

Here is the list of my plugins, maybe there is something conflicting?

https://github.com/BerkeleyTrue/dotfiles/blob/master/dotfiles/modules/plugins.vim

@BerkeleyTrue
Copy link

This is what I've found messing around so far:

I also see this message
Plugin "/Users/berkeley/.config/nvim/plugged/nvim-parinfer.js/rplugin/node/nvim-parinfer.js" is already registered

Looking into the manifest file after running UpdateRemotePlugin seems to have no calls to the nodehost

" python3 plugins
call remote#host#RegisterPlugin('python3', '/Users/berkeley/.config/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete', [
      \ {'sync': v:true, 'name': '_deoplete', 'opts': {}, 'type': 'function'},
     \ ])


" ruby plugins


" python plugins

If I remove both nvim-parinfer and clj-refactor I get the following

" node plugins


" python3 plugins
call remote#host#RegisterPlugin('python3', '/Users/berkeley/.config/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete', [
      \ {'sync': v:true, 'name': '_deoplete', 'opts': {}, 'type': 'function'},
     \ ])


" ruby plugins


" python plugins


Could it be the process that writes to this file is faulty?

@snoe
Copy link
Member

snoe commented Feb 15, 2017

@BerkeleyTrue Can you make sure that you have the latest node-host and that the versions being brought in are similar to mine? I'm also on neovim 0.1.7 but the api has been quite stable unlike node-host's

also I think npm install --production would be an improvement on your BuildNodeHost

 $ npm list
[email protected] /Users/case/.vim/bundle/node-host
├── [email protected]
├── [email protected]
└─┬ [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   ├── [email protected]
  │   ├── [email protected]
  │   └─┬ [email protected]
  │     ├── [email protected]
  │     ├── [email protected]
  │     ├── [email protected]
  │     ├── [email protected]
  │     ├── [email protected]
  │     └── [email protected]
  └── [email protected]

~/.nvim/bundle/node-host on master
$ npm version
{ 'neovim-host': '0.0.1',
  npm: '3.10.7',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '57.1',
  modules: '48',
  node: '6.7.0',
  openssl: '1.0.2j',
  uv: '1.9.1',
  v8: '5.1.281.83',
  zlib: '1.2.8' }

@snoe snoe reopened this Feb 15, 2017
@BerkeleyTrue
Copy link

BerkeleyTrue commented Feb 15, 2017

Some interesting developments:

First my versions are similar to yours. My neovim was a single version behind your so I updated it.
[email protected] /Users/berkeley/.config/nvim/plugged/node-host
├── [email protected]
├── [email protected]
└── [email protected]

BerkeleyTrue:node-host berkeley$ npm version
{ 'neovim-host': '0.0.1',
npm: '3.10.10',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '57.1',
modules: '48',
node: '6.9.1',
openssl: '1.0.2j',
uv: '1.9.1',
v8: '5.1.281.84',
zlib: '1.2.8' }

Still the same issue.

Then I tried cleaning and re-installing the three packages in different combinations.
That raised the same issue. Then I threw in re-starting vim between installing packages.

I removed all three packages, installed node-host, updated remote plugins, Installed nvim-parinfer, restarted neovim, and updated remote plugins. This showed the correct message and indeed parinfer was listed in rplugins.vim.

But then installing clj-refactor causes the following

function remote#host#UpdateRemotePlugins[6]..<SNR>47_RegistrationCommands, line 20
Vim(let):Channel was closed by the client

then removing clj-refactor gives me the same error as before.

I can can't nvim-parinfer working but I cannot get it working with clj-refactor.

Is it possible that node-host is caching somewhere within it's directories?

edit:
Looks like if I completely remove node-hosts but leave nvim-parinfer in I still get the already registered but. Maybe this is an error with neovim itslelf?

@snoe
Copy link
Member

snoe commented Feb 16, 2017

There's definitely an order dependency between installing plugins and calling :UpdateRemotePlugins and restarting neovim.

I'm able to repro your parinfer + refactor error, but I'm also able to recover by removing the refactor plugin line from my rc file, restarting nvim, running :UpdateRemotePlugins, restarting again, and then loading a clj file. I can do the opposite too - run refactor by itself and then adding parinfer blows up.

Unfortunately as with most issues here, I suspect that the source of the problem is somewhere in the node-host dependency chain. I had hoped that neovim/node-host#21 would fix the multiple plugin issue, but it seems there's either been a regression or that fixed already registered plugins and installing multiple is still a problem.

I noticed your npm list maybe got cut off - [email protected] is the transitive dependency that should have fixed the above issue. Make sure you do have that installed at least.

I think, though, that the path forward is to add host capabilities to https://github.com/clojure-vim/neovim-client and drop node-host all together.

@BerkeleyTrue
Copy link

BerkeleyTrue commented Mar 16, 2018

I was never able to get parinfer and refactor to work nicely together so I abandoned it.

I'm not seeing this same issue with just nvim-parinfer on my new machine. I'll diagnose and post findings here.

edit:

Looks like it is registering correctly

" node plugins
call remote#host#RegisterPlugin('node', '/home/berkeleytrue/.config/nvim/plugged/nvim-parinfer.js/rplugin/node/nvim-parinfer.js', [
     \ ])


" python3 plugins


" ruby plugins


" python plugins


edit2: running lein npm install in plugin directory solved the issue.

I've changed my plug install to Plug 'clojure-vim/nvim-parinfer.js', { 'do': 'lein npm install' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants