Skip to content

Commit

Permalink
Merge pull request #4 from kiyoon/fix-auto-attach
Browse files Browse the repository at this point in the history
fix auto attach not working when autostart is disabled
  • Loading branch information
kiyoon authored Jan 13, 2023
2 parents 94c87d6 + 224a1a0 commit bc23b48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/jupynium/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function M.register_autostart_autocmds(augroup, opts)
pattern = all_patterns,
callback = function()
local bufname = vim.api.nvim_buf_get_name(0)
print "Aaa"
if not M.server_state.is_autostarted then
if
opts.auto_start_server.enable
Expand All @@ -52,7 +53,9 @@ function M.register_autostart_autocmds(augroup, opts)
vim.cmd [[JupyniumStartAndAttachToServer]]
M.server_state.is_autostarted = true
end
elseif not M.server_state.is_autoattached then
end

if not M.server_state.is_autostarted and not M.server_state.is_autoattached then
if
opts.auto_attach_to_server.enable
and utils.list_wildcard_match(bufname, opts.auto_attach_to_server.file_pattern) ~= nil
Expand Down

0 comments on commit bc23b48

Please sign in to comment.