Skip to content

ejrichards/mise.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mise.nvim

mise.nvim is a 3rd party Neovim plugin that compliments mise by setting the environment variables when :cd-ing inside Neovim or using a GUI like Neovide. If you run Neovim from a terminal and don't regularly use :cd, you probably don't need this plugin.

Setup

lazy.nvim

{
  "ejrichards/mise.nvim",
  opts = {}
}

Configuration

Defaults

{
  -- Executable to run
  run = 'mise',
  -- Args for the executable, set to "env --json --quiet" to ignore mise warnings
  args = 'env --json',
  -- Set to override the base PATH
  initial_path = vim.env.PATH,
  -- Removes env vars set by mise when navigating away from a directory
  unset_vars = true,
  -- Loads env vars when setup() is called, don't need this if mise is hooked into your shell
  load_on_setup = true,
  -- Force a run when using an unsupported executable
  force_run = false,
}

Commands

  • :Mise - Print vars for pwd

Limitations

The base path will be the $PATH env var on load. If Neovim launched from the shell where mise has already loaded some paths, this plugin cannot distinguish which parts of the path were loaded by mise, so they will always be included. This can be overridden using the initial_path in the setup config if you run into issues.

TODO: Test whether mise will deal with this case correctly