NvChad / ui

Lightweight & high performance UI plugin for nvchad
GNU General Public License v3.0
276 stars 129 forks source link

Integrated terminal in NVChad doesn't recognize commands (using fish-shell) #380

Open BAD-WOLF opened 1 day ago

BAD-WOLF commented 1 day ago

https://github.com/user-attachments/assets/fa0e5e3e-4f81-487f-8c5e-e97ee8a7edfd

I'm experiencing an issue with the integrated terminal in NVChad. When I open the terminal using :term, it seems to be running an extremely minimal shell. Commands like nodejs, php, and apt are not recognized, and I can only use basic commands like cd, ls, and other default system commands. It appears that the terminal is defaulting to sh instead of using my preferred shell (fish).

I have fish-shell set as my default shell, but NVChad's integrated terminal doesn't seem to recognize this and always loads sh by default. When I manually run fish, it works, but this behavior shouldn't be happening.

Steps to reproduce:

  1. Open NVChad.
  2. Open the integrated terminal using :term.
  3. Try running a command like nodejs, php, or apt.

Expected behavior: The terminal should recognize fish-shell as the default shell and allow me to run commands like nodejs, php, apt, etc.

Environment:

Any help or guidance would be appreciated!

siduck commented 1 day ago

Open the integrated terminal using :term.

that isnt nvchad's term at all .. Nvchad one has nvchad.term module

BAD-WOLF commented 21 hours ago

Thanks for the response! However, the issue seems to be related to NVChad itself, not just the terminal. To clarify, I have the following configuration in my init.lua file:

{
    "mtoohey31/cmp-fish", 
    ft = "fish",  -- Load the plugin only for .fish files
    dependencies = { "hrsh7th/nvim-cmp" },  -- Ensure cmp is available
    config = function()
        local cmp = require('cmp')
        cmp.setup({
            sources = cmp.config.sources({
                { name = 'fish' }
            })
        })
    end
},

However, when trying to use the cmp-fish plugin, I am getting the following error:

Error detected while processing TextChangedI Autocommands for "*":
Error executing lua callback: Vim:E475: Invalid value for argument cmd: 'fish' is not executable

I also tried specifying the path to fish manually with the configuration below:

{ name = 'fish', option = { fish_path = "/usr/bin/fish" } }

But I still get the same error:

Error detected while processing TextChangedI Autocommands for "*":
Error executing lua callback: Vim:E475: Invalid value for argument cmd: '/usr/bin/fish' is not executable

What's strange is that the error also occurs directly in the terminal, as I showed in the video above. So it doesn't seem to be an issue with an additional plugin that I am trying to integrate, but rather with NVChad itself or how it is handling commands and the terminal.

Additional steps to reproduce:

  1. Set up NVChad with the cmp-fish plugin.
  2. Try using fish as the default shell in the integrated terminal.
  3. Observe the error related to the command not being recognized.

Any further guidance would be greatly appreciated, as this issue affects the functionality of the terminal and the shell within NVChad.

siduck commented 13 hours ago

those errors dont look nvchad related at all :/

please try your config on a saner OS, like linux