This commit is contained in:
Kosh 2024-02-27 14:08:03 +05:30
parent d308496128
commit 0601ee9bce
7 changed files with 54 additions and 0 deletions

View File

@ -9,12 +9,15 @@
"cSpell.userWords": [
"Monero",
"bcrypt",
"cupy",
"favicon",
"keras",
"kosh",
"ndarray",
"overdiscounting",
"paytmchecksum",
"pyperclip",
"relu",
"transfeminism",
"werkzeug"
]

View File

@ -53,3 +53,40 @@ require('gitsigns').setup()
-- tabline
require("bufferline").setup{}
require('nvim-web-devicons').setup{}
-- Jupyter
require('notebook').setup()
local api = require("notebook.api")
local settings = require("notebook.settings")
function _G.define_cell(extmark)
if extmark == nil then
local line = vim.fn.line(".")
extmark, _ = api.current_extmark(line)
end
local start_line = extmark[1] + 1
local end_line = extmark[3].end_row
pcall(function() vim.fn.MagmaDefineCell(start_line, end_line) end)
end
function _G.define_all_cells()
local buffer = vim.api.nvim_get_current_buf()
local extmarks = settings.extmarks[buffer]
for id, cell in pairs(extmarks) do
local extmark = vim.api.nvim_buf_get_extmark_by_id(
0, settings.plugin_namespace, id, { details = true }
)
if cell.cell_type == "code" then
define_cell(extmark)
end
end
end
vim.api.nvim_create_autocmd(
{ "BufRead", },
{ pattern = { "*.ipynb" }, command = "MagmaInit" }
)
vim.api.nvim_create_autocmd(
"User",
{ pattern = { "MagmaInitPost", "NBPostRender" }, callback = _G.define_all_cells }
)

View File

@ -53,3 +53,5 @@ set_keymap("n", "<leader>zA", "zA", opts)
-- cmdline
set_keymap('n', ':', '<cmd>FineCmdline<CR>', opts)
set_keymap('n', '/', '<cmd>FineCmdline<CR>/', opts)
--set_keymap("n", "<leader>nbo")

View File

@ -56,4 +56,6 @@ return require("packer").startup(function(use)
end,
})
use "adelarsq/vim-devicons-emoji"
use { 'dccsillag/magma-nvim', run = ':UpdateRemotePlugins' }
use {"meatballs/notebook.nvim"}
end)

View File

@ -130,11 +130,21 @@ _G.packer_plugins = {
path = "/home/kosh/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["magma-nvim"] = {
loaded = true,
path = "/home/kosh/.local/share/nvim/site/pack/packer/start/magma-nvim",
url = "https://github.com/dccsillag/magma-nvim"
},
["markdown-preview.nvim"] = {
loaded = true,
path = "/home/kosh/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim",
url = "https://github.com/iamcco/markdown-preview.nvim"
},
["notebook.nvim"] = {
loaded = true,
path = "/home/kosh/.local/share/nvim/site/pack/packer/start/notebook.nvim",
url = "https://github.com/meatballs/notebook.nvim"
},
["nui.nvim"] = {
loaded = true,
path = "/home/kosh/.local/share/nvim/site/pack/packer/start/nui.nvim",

BIN
wallpapers/bi_hill.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 KiB