You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH allows switching between user profiles with gh auto switch.
Is there a way I can configure octo.nvim to always switch to <user>
before running any command?
For example, suppose my default github user is user1 but I have a
project called project2 which I use user2 and would like to use user2 for this project. If I have configured octo.nvim to use user2,
then it would switch to this user before running any octo command.
The manual solution is to run gh auth switch and pick user2 every
time I open project2 in neovim.
Another option would be to configure octo.nvim such that it always
switch to the configured user before calling gh behind the scenes.
This would enable us to have a default user1 and to modify this value
on a per-project basis using other nvim plugins which load project
configuration from files .vim, .vim/, init.lua, etc. That way, project2 can modify the default user1 to user2 like so:
-- this is a local file to project2, which modifies default settingsrequire('octo.nvim').setup({
default_user='user2'
})
The text was updated successfully, but these errors were encountered:
Instead of calling Octo, I call the GH command which switches the user
behind the scenes. That way, I can set vim.g.gh_auth_user on a per-project
basis and have a default one.
The main problem is that I do not get completion in the cmdline.
What are your thoughts? Would like you like to open a PR for this?
I could go for that even though I am not familiar with Lua (I only use it for neovim)
I'll take a look at the codebase this week or next.
GH allows switching between user profiles with
gh auto switch
.Is there a way I can configure
octo.nvim
to always switch to<user>
before running any command?
For example, suppose my default github user is
user1
but I have aproject called
project2
which I useuser2
and would like to useuser2
for this project. If I have configuredocto.nvim
to useuser2
,then it would switch to this user before running any
octo
command.The manual solution is to run
gh auth switch
and pickuser2
everytime I open
project2
in neovim.Another option would be to configure
octo.nvim
such that it alwaysswitch to the configured
user
before callinggh
behind the scenes.This would enable us to have a default
user1
and to modify this valueon a per-project basis using other nvim plugins which load project
configuration from files
.vim
,.vim/
,init.lua
, etc. That way,project2
can modify the defaultuser1
touser2
like so:The text was updated successfully, but these errors were encountered: