1# mise.nvim
2
3mise.nvim is a 3rd party Neovim plugin that compliments [mise](https://mise.jdx.dev/) by setting the environment variables when `:cd`-ing inside Neovim or using a GUI like [Neovide](https://neovide.dev/). If you run Neovim from a terminal and don't regularly use `:cd`, you probably don't need this plugin.
4
5## Setup
6
7lazy.nvim
8```lua
9{
10 "https://plugins.ejri.dev/mise.nvim",
11 opts = {}
12}
13```
14
15## Configuration
16
17Defaults
18```lua
19{
20 -- Executable to run
21 run = 'mise',
22 -- Args for the executable, set to "env --json --quiet" to ignore mise warnings
23 args = 'env --json',
24 -- Set to override the base PATH
25 initial_path = vim.env.PATH,
26 -- Removes env vars set by mise when navigating away from a directory
27 unset_vars = true,
28 -- Loads env vars when setup() is called, don't need this if mise is hooked into your shell
29 load_on_setup = true,
30 -- Force a run when using an unsupported executable
31 force_run = false,
32}
33```
34
35## Commands
36
37- `:Mise` - Print vars for pwd
38
39## Limitations
40
41The 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.
42
43TODO: Test whether mise will deal with this case correctly