megabyte-labs / install.doctor

A glorious combination of application / theme settings and a performant cross-platform, desktop-oriented software suite.
https://megabyte.space
Other
99 stars 22 forks source link

NVIM showing error on open #49

Open ProfessorManhattan opened 1 year ago

ProfessorManhattan commented 1 year ago

❔ 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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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?

enggnr commented 1 year ago

@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 commented 1 year ago

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

enggnr commented 10 months ago

@ProfessorManhattan, this can be closed.