Skip to content

Commit

Permalink
Fail to properly setup JupyterAscending
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasvianav committed Aug 27, 2022
1 parent 5ad20e7 commit b2d20db
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/v/packer/plugins/general.lua
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ local M = {
{ 'v', 'X' },
},
},

{
'untitled-ai/jupyter_ascending.vim',
event = 'BufEnter *.sync.py',
disable = true,
},
}

return M
6 changes: 6 additions & 0 deletions lua/v/packer/plugins/navigation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ local M = {
'<C-k>',
'<C-l>',
},
cond = function()
return vim.env.TMUX ~= nil
end,
},

-- nerdtree-like file explorer
Expand Down Expand Up @@ -68,6 +71,9 @@ local M = {
'<Leader>tc',
'<Leader>tt',
},
cond = function()
return vim.env.TMUX ~= nil
end,
},

-- fuzzy finder for lots of stuff
Expand Down
7 changes: 7 additions & 0 deletions lua/v/packer/plugins/syntax.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ local M = {
'cpp',
},
},

-- enable navigation of jupyter notebook files
{
'goerz/jupytext.vim',
event = 'BufAdd,BufEnter *.ipynb',
disable = true,
},
}

return M
1 change: 1 addition & 0 deletions lua/v/plugins/general/auto-session.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ require('auto-session').setup({
auto_restore_enabled = false,
pre_save_cmds = { 'silent! tabdo NvimTreeClose' },
auto_session_allowed_dirs = nil,
log_level = 'error',

-- fix Neovim height after it is started, so
-- cmdheight isn't super large (#64) (#11330)
Expand Down
14 changes: 14 additions & 0 deletions lua/v/plugins/general/jupyter_ascending.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require('v.utils.autocmds').augroup('JupyterKeybindings', {
{
event = 'BufEnter',
opts = {
pattern = { '*.sync.py' },
callback = function()
require('v.utils.mappings').set_keybindings({
{ 'n', '<leader>x', '<Plug>JupyterExecute' },
{ 'n', '<leader>xx', '<Plug>JupyterExecuteAll' },
}, { buffer = true })
end,
},
},
})
4 changes: 4 additions & 0 deletions lua/v/plugins/syntax/jupytext.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require('v.utils').set_viml_options('jupytext', {
enable = true,
fmt = 'py:percent',
})

0 comments on commit b2d20db

Please sign in to comment.