doctorfree / nvim-lazyman

Neovim configuration manager and Lazy/Lua/Mason based Neovim config. Manage multiple Neovim configurations with the lazyman command. ☕
https://lazyman.dev
MIT License
263 stars 8 forks source link

Lazyman config should have separate startup script #58

Closed wxguy closed 8 months ago

wxguy commented 8 months ago

This has the reference to your comment on this link https://github.com/doctorfree/nvim-lazyman/issues/55#issuecomment-1854301069. At the moment, to start lazyman config, following is suggested to be included in bashrc or zshrc:

export NVIM_APPNAME="nvim-Lazyman"

However, as the configuration is already isolated, I propose that it should have a seperate startup script that can be invoked directly from a terminal without editing bashrc or zshrc. I am using the following code in $HOME/.local/bin/lman file and making it as executable:

#!/usr/bin/env bash

export NVIM_APPNAME="nvim-Lazyman"
exec -a "$NVIM_APPNAME" nvim -u "$HOME/.config/nvim-Lazyman/init.lua" "$@"

With this I can open any file with a simple command lman /path/to/file.ext. This also isolate my original nvim config.

I feel that it should be part of Lazyman install script. Hope it helps.

doctorfree commented 8 months ago

Another good suggestion. I've incorporated your lman script in the v3.1.3r5 release of Lazyman, released today. Further testing is ongoing but it looks fine so far. A Lazyman update should get it for you although I have not yet tested update with lman.

I like nice and simple. Good addition.