neovim update

This commit is contained in:
RafayAhmad7548 2025-10-25 21:04:46 +05:00
parent f50a72b03b
commit 3cd3e38358
8 changed files with 288 additions and 189 deletions

View file

@ -1,28 +1,29 @@
{
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
"auto-session": { "branch": "main", "commit": "ee320d7a59c1dfe83df7c9d58150d9f194690d53" },
"blink.cmp": { "branch": "main", "commit": "586ee87534f5bf65f1c8dea2d1da2a57e8cddd36" },
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
"auto-session": { "branch": "main", "commit": "3a895bace7d0260c8daac5bf5c84236765f00212" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
"catppuccin": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
"flutter-tools.nvim": { "branch": "main", "commit": "65b7399804315a1160933b64292d3c5330aa4e9f" },
"gitsigns.nvim": { "branch": "main", "commit": "93f882f7041a2e779addbd34943812ca66edef5a" },
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
"image.nvim": { "branch": "master", "commit": "c40215d7d7d1d8c823ee9a77be1a894d5c8df41b" },
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"markview.nvim": { "branch": "main", "commit": "ec33f2aa333ca1d76f51847922578434d7aeadf7" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "bb3a17efc797c34c054463174e5522442576ebd8" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" },
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
"markview.nvim": { "branch": "main", "commit": "e6b0f5aee8105adab6077509c46459812db4cffa" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7f9a39fcd2ac6e979001f857727d606888f5909c" },
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
"mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
"molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" },
"notebook.nvim": { "branch": "main", "commit": "e7145d5e905f74ac927aa45fe109adbdd9e9f340" },
"nvim-lspconfig": { "branch": "master", "commit": "f47cd681d7cb6048876a2e908b6d8ba1e530d152" },
"nvim-lspconfig": { "branch": "master", "commit": "1f7fbc34e6420476142b5cc85e9bee52717540fb" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
"otter.nvim": { "branch": "main", "commit": "c44d645f03ae96e2e3cdc37f92ecfa93a534b736" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"snacks.nvim": { "branch": "main", "commit": "d67a47739dfc652cfcf66c59e929c704a854b37a" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
}

View file

@ -75,7 +75,7 @@ vim.keymap.set('n', '<leader>/', function()
Snacks.picker.lines({ layout = 'select' })
end, { desc = 'fuzzily search in current buffer' })
vim.keymap.set('n', '<leader>sp', '<cmd>SessionSearch<CR>', { desc = 'search sessions' })
vim.keymap.set('n', '<leader>sp', '<cmd>AutoSession search<CR>', { desc = 'search sessions' })
-- INFO: LSP
@ -204,7 +204,7 @@ vim.keymap.set('n', '<leader>mo', ':MoltenEvaluateOperator<CR>', { silent = true
vim.keymap.set('n', '<leader>ml', ':MoltenEvaluateLine<CR>', { silent = true, desc = 'evaluate line' })
vim.keymap.set('v', '<leader>mv', ':<C-u>MoltenEvaluateVisual<CR>gv', { silent = false, desc = 'evaluate visual selection' })
vim.keymap.set('n', '<leader>mc', ':MoltenReevaluateCell<CR>', { silent = false, desc = 'reevaluate cell' })
vim.keymap.set('n', '<leader>me', ':noautocmd MoltenEnterOutput<CR>', { silent = true, desc = 'show/enter output' })
vim.keymap.set('n', '<leader>me', ':noautocmd MoltenEnterOutput<CR>:noautocmd MoltenEnterOutput<CR>', { silent = true, desc = 'show/enter output' })
vim.keymap.set('n', '<leader>mh', ':MoltenHideOutput<CR>', { silent = true, desc = 'hide output' })

View file

@ -47,6 +47,9 @@ vim.o.winborder = 'rounded'
vim.opt.hlsearch = false
vim.opt.wrap = false
vim.o.swapfile = false
vim.o.undofile = false
vim.o.sessionoptions='blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions'
-- Example for configring Neovim to load user-installed installed Lua rocks:
package.path = package.path .. ';' .. vim.fn.expand('$HOME') .. '/.luarocks/share/lua/5.1/?/init.lua;'

View file

@ -1,154 +1,154 @@
return {
{
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged_enable = true,
signcolumn = true,
{
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged_enable = true,
signcolumn = true,
on_attach = function()
local gitsigns = require('gitsigns')
on_attach = function()
local gitsigns = require('gitsigns')
vim.keymap.set('n', '<leader>gs', gitsigns.stage_hunk, { desc = 'stage hunk' })
vim.keymap.set('n', '<leader>gr', gitsigns.reset_hunk, { desc = 'restore hunk' })
vim.keymap.set('n', '<leader>gs', gitsigns.stage_hunk, { desc = 'stage hunk' })
vim.keymap.set('n', '<leader>gr', gitsigns.reset_hunk, { desc = 'restore hunk' })
vim.keymap.set('n', '<leader>gS', gitsigns.stage_buffer, { desc = 'stage buffer' })
vim.keymap.set('n', '<leader>gR', gitsigns.stage_hunk, { desc = 'reset buffer' })
vim.keymap.set('n', '<leader>gS', gitsigns.stage_buffer, { desc = 'stage buffer' })
vim.keymap.set('n', '<leader>gR', gitsigns.stage_hunk, { desc = 'reset buffer' })
vim.keymap.set('n', '<leader>gp', gitsigns.preview_hunk, { desc = 'preview hunk' })
vim.keymap.set('n', '<leader>gb', gitsigns.blame_line, { desc = 'blame line' })
vim.keymap.set('n', '<leader>gp', gitsigns.preview_hunk, { desc = 'preview hunk' })
vim.keymap.set('n', '<leader>gb', gitsigns.blame_line, { desc = 'blame line' })
end
},
end
},
{
'sindrets/diffview.nvim',
config = function ()
local actions = require('diffview.config').actions
require('diffview').setup({
keymaps = {
disable_defaults = true,
file_panel = {
['i'] = '<Up>',
['k'] = '<Down>',
['j'] = false,
},
{
'sindrets/diffview.nvim',
config = function ()
local actions = require('diffview.config').actions
require('diffview').setup({
keymaps = {
disable_defaults = true,
file_panel = {
['i'] = '<Up>',
['k'] = '<Down>',
['j'] = false,
['<Space>'] = function () actions.toggle_stage_entry() end
['<Space>'] = function () actions.toggle_stage_entry() end
}
}
})
end
},
-- {
-- 'NeogitOrg/neogit',
-- dependencies = {
-- 'nvim-lua/plenary.nvim',
-- 'nvim-telescope/telescope.nvim',
-- },
-- config = function()
-- require('neogit').setup({
--
-- kind = 'floating',
-- graph_style = 'kitty',
-- disable_line_numbers = false,
-- disable_relative_line_numbers = false,
-- commit_editor = {
-- kind = 'floating',
-- },
-- commit_select_view = {
-- kind = 'floating',
-- },
-- commit_view = {
-- kind = 'floating',
-- verify_commit = vim.fn.executable('gpg') == 1, -- Can be set to true or false, otherwise we try to find the binary
-- },
-- log_view = {
-- kind = 'floating',
-- },
-- rebase_editor = {
-- kind = 'floating',
-- },
-- reflog_view = {
-- kind = 'floating',
-- },
-- merge_editor = {
-- kind = 'floating',
-- },
-- description_editor = {
-- kind = 'floating',
-- },
-- tag_editor = {
-- kind = 'floating',
-- },
-- preview_buffer = {
-- kind = 'floating',
-- },
-- popup = {
-- kind = 'floating',
-- },
-- stash = {
-- kind = 'floating',
-- },
-- refs_view = {
-- kind = 'floating',
-- },
-- mappings = {
-- status = {
-- ['i'] = 'MoveUp',
-- ['k'] = 'MoveDown',
-- ['j'] = false,
-- },
-- }
-- })
-- vim.keymap.set('n', '<leader>gg', '<cmd>Neogit<CR>', { desc = 'open neogit '})
-- end
-- }
-- {
-- 'tpope/vim-fugitive',
-- }
-- {
-- 'sindrets/diffview.nvim',
-- dependencies = { 'nvim-tree/nvim-web-devicons' },
-- -- lazy, only load diffview by these commands
-- cmd = {
-- 'DiffviewFileHistory', 'DiffviewOpen', 'DiffviewToggleFiles', 'DiffviewFocusFiles', 'DiffviewRefresh'
-- }
-- },
-- {
-- 'SuperBo/fugit2.nvim',
-- build = false,
-- opts = {
-- width = 100,
-- },
-- dependencies = {
-- 'MunifTanjim/nui.nvim',
-- 'nvim-tree/nvim-web-devicons',
-- 'nvim-lua/plenary.nvim',
-- -- {
-- -- 'chrisgrieser/nvim-tinygit', -- optional: for Github PR view
-- -- dependencies = { 'stevearc/dressing.nvim' }
-- -- },
-- },
-- cmd = { 'Fugit2', 'Fugit2Diff', 'Fugit2Graph' },
-- keys = {
-- { '<leader>F', mode = 'n', '<cmd>Fugit2<cr>' }
-- }
-- },
}
}
})
end
},
-- {
-- 'NeogitOrg/neogit',
-- dependencies = {
-- 'nvim-lua/plenary.nvim',
-- 'nvim-telescope/telescope.nvim',
-- },
-- config = function()
-- require('neogit').setup({
--
-- kind = 'floating',
-- graph_style = 'kitty',
-- disable_line_numbers = false,
-- disable_relative_line_numbers = false,
-- commit_editor = {
-- kind = 'floating',
-- },
-- commit_select_view = {
-- kind = 'floating',
-- },
-- commit_view = {
-- kind = 'floating',
-- verify_commit = vim.fn.executable('gpg') == 1, -- Can be set to true or false, otherwise we try to find the binary
-- },
-- log_view = {
-- kind = 'floating',
-- },
-- rebase_editor = {
-- kind = 'floating',
-- },
-- reflog_view = {
-- kind = 'floating',
-- },
-- merge_editor = {
-- kind = 'floating',
-- },
-- description_editor = {
-- kind = 'floating',
-- },
-- tag_editor = {
-- kind = 'floating',
-- },
-- preview_buffer = {
-- kind = 'floating',
-- },
-- popup = {
-- kind = 'floating',
-- },
-- stash = {
-- kind = 'floating',
-- },
-- refs_view = {
-- kind = 'floating',
-- },
-- mappings = {
-- status = {
-- ['i'] = 'MoveUp',
-- ['k'] = 'MoveDown',
-- ['j'] = false,
-- },
-- }
-- })
-- vim.keymap.set('n', '<leader>gg', '<cmd>Neogit<CR>', { desc = 'open neogit '})
-- end
-- }
-- {
-- 'tpope/vim-fugitive',
-- }
-- {
-- 'sindrets/diffview.nvim',
-- dependencies = { 'nvim-tree/nvim-web-devicons' },
-- -- lazy, only load diffview by these commands
-- cmd = {
-- 'DiffviewFileHistory', 'DiffviewOpen', 'DiffviewToggleFiles', 'DiffviewFocusFiles', 'DiffviewRefresh'
-- }
-- },
-- {
-- 'SuperBo/fugit2.nvim',
-- build = false,
-- opts = {
-- width = 100,
-- },
-- dependencies = {
-- 'MunifTanjim/nui.nvim',
-- 'nvim-tree/nvim-web-devicons',
-- 'nvim-lua/plenary.nvim',
-- -- {
-- -- 'chrisgrieser/nvim-tinygit', -- optional: for Github PR view
-- -- dependencies = { 'stevearc/dressing.nvim' }
-- -- },
-- },
-- cmd = { 'Fugit2', 'Fugit2Diff', 'Fugit2Graph' },
-- keys = {
-- { '<leader>F', mode = 'n', '<cmd>Fugit2<cr>' }
-- }
-- },
}

View file

@ -17,7 +17,6 @@ require('lazy').setup({
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = {} },
{ 'meatballs/notebook.nvim', opts = {} },
-- { 'stevearc/dressing.nvim', opts = {}, },
-- 'ThePrimeagen/vim-be-good',
@ -33,7 +32,7 @@ require('lazy').setup({
require('config.plugins.snacks'),
require('config.plugins.mini'),
require('config.plugins.languages.molten'),
require('config.plugins.languages.notebook'),
require('config.plugins.languages.flutter'),
require('config.plugins.languages.markdown'),

View file

@ -1,27 +0,0 @@
return {
{
'3rd/image.nvim',
version = '1.1.0',
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
opts = {
backend = 'kitty', -- whatever backend you would like to use
max_width = 100,
max_height = 20,
max_height_window_percentage = math.huge,
max_width_window_percentage = math.huge,
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', '' },
}
},
{
'benlubas/molten-nvim',
version = '^1.0.0', -- use version <2.0.0 to avoid breaking changes
dependencies = { '3rd/image.nvim' },
build = ':UpdateRemotePlugins',
init = function()
-- these are examples, not defaults. Please see the readme
vim.g.molten_image_provider = 'image.nvim'
end,
}
}

View file

@ -0,0 +1,121 @@
-- Provide a command to create a blank new Python notebook
-- note: the metadata is needed for Jupytext to understand how to parse the notebook.
-- if you use another language than Python, you should change it in the template.
local default_notebook = [[
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
""
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython"
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
]]
local function new_notebook(filename)
local path = filename .. ".ipynb"
local file = io.open(path, "w")
if file then
file:write(default_notebook)
file:close()
vim.cmd("edit " .. path)
else
print("Error: Could not open new notebook file for writing.")
end
end
vim.api.nvim_create_user_command('NewNotebook', function(opts)
new_notebook(opts.args)
end, {
nargs = 1,
complete = 'file'
})
return {
{
'3rd/image.nvim',
version = '1.1.0',
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
opts = {
backend = 'kitty', -- whatever backend you would like to use
max_width = 100,
max_height = 20,
max_height_window_percentage = math.huge,
max_width_window_percentage = math.huge,
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', '' },
}
},
{
'benlubas/molten-nvim',
version = '^1.0.0', -- use version <2.0.0 to avoid breaking changes
dependencies = { '3rd/image.nvim' },
build = ':UpdateRemotePlugins',
init = function()
-- these are examples, not defaults. Please see the readme
vim.g.molten_image_provider = 'image.nvim'
vim.g.molten_virt_text_output = true
vim.g.molten_virt_lines_off_by_1 = true
vim.g.molten_auto_open_output = false
end,
},
{
'GCBallesteros/jupytext.nvim',
opts = {
style = 'markdown',
output_extension = 'md',
force_ft = 'markdown'
}
},
{
'jmbuhr/otter.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
config = function ()
local otter = require('otter')
otter.setup()
vim.api.nvim_create_autocmd('BufEnter', {
pattern = { '*.ipynb' },
callback = function ()
if not vim.b._molten_import_output then
vim.b._molten_import_output = true
vim.cmd('MoltenImportOutput')
otter.activate({ 'python' })
end
end
})
vim.api.nvim_create_autocmd('BufWritePost', {
pattern = { '*.ipynb' },
callback = function ()
vim.cmd('MoltenExportOutput!')
end
})
end
}
}

View file

@ -79,6 +79,8 @@ return {
['<c-h>'] = { 'toggle_hidden', mode = 'i' },
['<c-l>'] = { 'toggle_ignored', mode = 'i' },
['<a-q>'] = { 'qflist', mode = 'i' },
}
}
},