install.doctor icon indicating copy to clipboard operation
install.doctor copied to clipboard

NVIM showing error on open

Open ProfessorManhattan opened this issue 2 years ago β€’ 6 comments
trafficstars

❔ What are you experiencing an issue with?

Latest Release

❔ Version

Latest

🐞 Description

nvim on macOS opens with the following error:

Error detected while processing /Users/bzalewski/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /Users/bzalewski/.config/nvim/lua/custom/init.lua:2: unexpected symbol near ':'
stack traceback:
        [C]: in function 'dofile'
        /Users/bzalewski/.config/nvim/init.lua:6: in main chunk

⏺️ Steps To Reproduce

No response

πŸ“’ Relevant Log Output

No response

πŸ’‘ Possible Solution

No response

ProfessorManhattan avatar Jun 10 '23 05:06 ProfessorManhattan

If you need to install global NPM packages, you can just install them globally if scoping them to ~/.local/share/nvim is a hassle.

ProfessorManhattan avatar Jun 10 '23 05:06 ProfessorManhattan

Also, is there a way we can include the ~/.config/nvim-custom inside the ~/.config/nvim folder? Or better yet, if we could include the upstream NVIM setup in ~/.local/share/nvim (or ~/.local/share/project-name) and then include all of our custom additions in ~/.config/nvim/ --- I think this would be a better approach if you can figure it out

ProfessorManhattan avatar Jun 10 '23 05:06 ProfessorManhattan

Hey @enggnr --- I think NVIM needs some love. I'm getting this error when I open the program:

❯ nvim --headless -c 'autocmd User PackerComplete quitall'
Error detected while processing /Users/bzalewski/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /Users/bzalewski/.config/nvim/lua/custom/init.lua:2: '=' expected near 'g'
stack traceback:
	[C]: in function 'dofile'
	/Users/bzalewski/.config/nvim/init.lua:6: in main chunk^C                                                   /1m28.3s
❯ volta which neovim-node-host                                                                                         /0.1s
❯ volta install neovim-node-host
error: Could not install package 'neovim-node-host'

Can we install the NPM modules in a folder like ~/.local/share/nvim and then hardcode the PATH in the init.lua?

ProfessorManhattan avatar Jul 09 '23 05:07 ProfessorManhattan

@ProfessorManhattan, I did not encounter this error but an error related to the custom folder not found. I added mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua". However, when I run nvim +checkhealth, I see the below.

Node.js provider (optional)
- Node.js: v18.16.1
- WARNING Missing "neovim" npm (or yarn, pnpm) package.
  - ADVICE:
    - Run in shell: npm install -g neovim
    - Run in shell (if you use yarn): yarn global add neovim
    - Run in shell (if you use pnpm): pnpm install -g neovim
    - You may disable this provider (and warning) by adding let g:loaded_node_provider = 0 to your init.vim

I installed the neovim package (which provides neovim-node-host) using volta and npm but none helped. I also installed it using yarn which I installed using volta but that did not help. I also tried the settings and steps described in some discussion - this, this - and some other but none helped.

This VM was the one I used in the past when I worked on this. I'll try setting it up on a new VM and see if I can find anything.

enggnr avatar Jul 12 '23 09:07 enggnr

Tested the fix on a new VM. Added neovim integration steps to software.yml

enggnr avatar Jul 13 '23 09:07 enggnr

@ProfessorManhattan, this can be closed.

enggnr avatar Nov 09 '23 10:11 enggnr