nvim-ipy
nvim-ipy copied to clipboard
autoloading functions
Have you considered moving the functions into a file in an "autoload" dir and moving the syntax expressions into their own syntax file? Itd allow you to take advantage of the pre-existing python architecture in vim
We can move the functions to "autoload" but I do not see what this has to do with "pre-existing python architecture" ?
Oh sorry. I meant, in the sense of a syntax file, you could start with
if b:loaded_syntax
finish
endif
runtime! syntax/python.vim syntax/python/*.vim
So you get the added highlighting groups defined in the main python syntax files.
But the plugin doesn't assume that the filetype is python, it works with jupyter kernel in any language. What is defined in the plugin is highlight groups, not syntax items.
You can use g:ipy_set_ft option to automatically set the filetype of the output buffer if you want.