Skip to content

Commit b505033

Browse files
committed
feat: allow setting username+pwd in config
1 parent 1de5525 commit b505033

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/command.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ end
1919
local base_actions = {
2020
connect = function(host)
2121
if host == nil then host = 'http://codemp.alemi.dev:50053' end
22-
local user = vim.fn.input("username > ", "user-" .. vim.fn.rand() % 1024)
23-
local password = vim.fn.input("password > ", "lmaodefaultpassword")
22+
local user = vim.g.codemp_username or vim.fn.input("username > ", "user-" .. vim.fn.rand() % 1024)
23+
local password = vim.g.codemp_password or vim.fn.input("password > ", "lmaodefaultpassword")
2424
state.client = native.connect(host, user, password)
2525
print(" ++ connected to " .. host .. " as " .. user)
2626
end,

0 commit comments

Comments
 (0)