Nvim: Update all plugins

This commit is contained in:
Robert Kmieć
2025-04-23 01:37:19 +02:00
parent 43e7fb01f5
commit c665c5ba37
16 changed files with 268 additions and 162 deletions

View File

@@ -1,6 +1,6 @@
return {
"aznhe21/actions-preview.nvim",
config = function()
vim.keymap.set({ "v", "n" }, "<leader>ca", require("actions-preview").code_actions)
vim.keymap.set({ "v", "n" }, "gra", require("actions-preview").code_actions)
end,
}

View File

@@ -0,0 +1,5 @@
return {
"yutkat/git-rebase-auto-diff.nvim",
ft = { "gitrebase" },
opts = {},
}

View File

@@ -1,9 +1,11 @@
return { {
'saghen/blink.cmp',
'Saghen/blink.cmp',
-- optional: provides snippets for the snippet source
dependencies = {
'rafamadriz/friendly-snippets',
'xzbdmw/colorful-menu.nvim'
'xzbdmw/colorful-menu.nvim',
'disrupted/blink-cmp-conventional-commits',
'moyiz/blink-emoji.nvim',
},
-- use a release tag to download pre-built binaries
@@ -23,10 +25,10 @@ return { {
keymap = { preset = 'default' },
appearance = {
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- Useful for when your theme doesn't support blink.cmp
-- Will be removed in a future release
use_nvim_cmp_as_default = true,
-- -- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- -- Useful for when your theme doesn't support blink.cmp
-- -- Will be removed in a future release
-- use_nvim_cmp_as_default = true,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono'
@@ -35,7 +37,26 @@ return { {
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
default = { 'conventional_commits', 'lsp', 'path', 'snippets', 'buffer', 'emoji', 'codecompanion' },
providers = {
conventional_commits = {
name = "Conventional Commits",
module = 'blink-cmp-conventional-commits',
enabled = function()
return vim.bo.filetype == 'gitcommit'
end,
opts = {}
},
emoji = {
module = 'blink-emoji',
name = "Emoji",
score_offset = 15,
opts = { insert = true },
should_show_items = function()
return vim.tbl_contains({"gitcommit", "markdown" }, vim.o.filetype)
end,
}
}
},
completion = {
@@ -53,8 +74,13 @@ return { {
}
}
}
}
}
},
accept = { auto_brackets = { enabled = false }, },
ghost_text = { enabled = false },
},
-- experimental:
signature = { enabled = true },
},
opts_extend = { "sources.default" }
}, {

View File

@@ -17,7 +17,7 @@ return {
adapters = {
ollama = function()
return require("codecompanion.adapters").extend("ollama", {
name = "qwen2.5-coder:latest",
name = "gemma3:12b",
env = {
url = "http://192.168.10.99:11434",
api_key = "OLLAMA_API_KEY",
@@ -31,7 +31,7 @@ return {
},
schema = {
model = {
default = "qwen2.5-coder:latest",
default = "gemma3:12b",
},
num_ctx = {
default = 16384,

View File

@@ -2,9 +2,9 @@ return {
'lmantw/themify.nvim',
lazy = false,
priority = 999,
priority = 1000,
dependencies = {
'Iron-E/nvim-highlite'
--'Iron-E/nvim-highlite'
},
config = function()
require('themify').setup({
@@ -33,7 +33,7 @@ return {
'kevinm6/kurayami.nvim',
'gerardbm/vim-atomic',
'fynnfluegge/monet.nvim',
'sho-87/kanagawa-paper.nvim',
'thesimonho/kanagawa-paper.nvim',
'qaptoR-nvim/chocolatier.nvim',
'aliqyan-21/darkvoid.nvim',
'paulo-granthon/hyper.nvim',
@@ -41,7 +41,8 @@ return {
'aktersnurra/no-clown-fiesta.nvim',
'kdheepak/monochrome.nvim',
'ficcdaf/ashen.nvim',
'm15a/nvim-srcerite',
-- 'm15a/nvim-srcerite', - requires buggy highlite
'nyoom-engineering/oxocarbon.nvim',
'default'
})
end

View File

@@ -23,5 +23,6 @@ return {
show_model = false, -- Displays which model you are using at the beginning of your chat session.
no_auto_close = false, -- Never closes the window automatically.
debug = false -- Prints errors and the command which is run.
}
},
enabled = false
}

View File

@@ -8,10 +8,12 @@ return {
local Space = { provider = " " }
local colors = {
bright_bg = utils.get_highlight("Folded").bg,
bright_fg = utils.get_highlight("Folded").fg,
bg = utils.get_highlight("Normal").bg,
fg = utils.get_highlight("Normal").fg,
bright_bg = utils.get_highlight("Normal").bg,
bright_fg = utils.get_highlight("Normal").fg,
red = utils.get_highlight("DiagnosticError").fg,
-- dark_red = utils.get_highlight("DiffDelete").bg,
dark_red = utils.get_highlight("DiffDelete").bg,
green = utils.get_highlight("String").fg,
blue = utils.get_highlight("Function").fg,
gray = utils.get_highlight("NonText").fg,
@@ -22,9 +24,9 @@ return {
diag_error = utils.get_highlight("DiagnosticError").fg,
diag_hint = utils.get_highlight("DiagnosticHint").fg,
diag_info = utils.get_highlight("DiagnosticInfo").fg,
-- git_del = utils.get_highlight("diffDeleted").fg,
-- git_add = utils.get_highlight("diffAdded").fg,
-- git_change = utils.get_highlight("diffChanged").fg,
git_del = utils.get_highlight("diffDeleted").fg,
git_add = utils.get_highlight("diffAdded").fg,
git_change = utils.get_highlight("diffChanged").fg,
}
heirline.load_colors(colors)
@@ -362,6 +364,7 @@ return {
SpecialStatusline,
InactiveStatusline,
DefaultStatusline,
colors = colors
}
local Winbar = { { provider = "»" }, Space }
@@ -373,6 +376,10 @@ return {
-- winbar = Winbar,
tabline = TabLine,
-- statuscolumn = StatusColumn
opts = {
colors = colors
}
})
end
end,
enabled = false
}

View File

@@ -1,45 +1,44 @@
return {
'neovim/nvim-lspconfig',
dependencies = {
-- "SmiteshP/nvim-navbuddy",
"jubnzv/virtual-types.nvim",
--"ray-x/lsp_signature.nvim",
'sontungexpt/better-diagnostic-virtual-text',
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
-- "jubnzv/virtual-types.nvim",
-- "ray-x/lsp_signature.nvim",
-- 'sontungexpt/better-diagnostic-virtual-text',
{ url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
},
config = function()
local nvim_lsp = require('lspconfig')
require('clangd_extensions').setup({
ast = {
-- These are unicode, should be available in any font
role_icons = {
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},
kind_icons = {
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},
highlights = {
detail = "Comment",
},
memory_usage = {
border = "none",
},
symbol_info = {
border = "none",
}
-- These are unicode, should be available in any font
role_icons = {
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},
kind_icons = {
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},
highlights = {
detail = "Comment",
},
memory_usage = {
border = "none",
},
symbol_info = {
border = "none",
}
}
})
--local lsp_signature = require('lsp_signature')
@@ -58,53 +57,61 @@ return {
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
-- vim.keymap.del("n", "gra", opts)
-- vim.keymap.del("v", "gra", opts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
--def vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
--vim.keymap.del("n", "grr", opts)
--def vim.keymap.set('n', 'gri', vim.lsp.buf.implementation, opts)
--def vim.keymap.set('n', 'gO', vim.lsp.buf.document_symbol, opts)
--def vim.keymap.set('n', 'grn', vim.lsp.buf.rename, opts)
--vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
--vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
--vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<F6>', '<cmd>ClangdSwitchSourceHeader<CR>', opts)
vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format{ async = true } end, opts)
vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format { async = true } end, opts)
require'virtualtypes'.on_attach()
-- require 'virtualtypes'.on_attach()
-- require'lsp_signature'.on_attach({
-- floating_window = true,
-- floating_window_above_cur_line = true,
-- floating_window_off_x = 10,
-- floating_window_off_y = 0,
-- })
require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, {
ui = {
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
arrow = "",
up_arrow = "",
down_arrow = "",
above = false, -- the virtual text will be displayed above the line
},
priority = 2003, -- the priority of virtual text
inline = true})
-- require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, {
-- ui = {
-- wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
-- left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
-- right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
-- arrow = "  ",
-- up_arrow = "  ",
-- down_arrow = "  ",
-- above = false, -- the virtual text will be displayed above the line
-- },
-- priority = 2003, -- the priority of virtual text
-- inline = true
-- })
vim.diagnostic.config({
underline = false,
signs = {
text = {
[vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.WARN] = ""
vim.diagnostic.config({
underline = false,
signs = {
text = {
[vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.WARN] = ""
}
},
virtual_text = false,
update_in_insert = false,
severity_sort = true,
virtual_lines = {
current_line = true,
}
},
virtual_text = true,
update_in_insert = false,
severity_sort = true
})
end
})
end
})
--local capabilities = vim.lsp.protocol.make_client_capabilities()
@@ -140,6 +147,7 @@ return {
nvim_lsp.lua_ls.setup({
settings = {
Lua = {
diagnostics = { globals = { "vim" } },
completion = {
callSnippet = "Replace"
}
@@ -147,22 +155,23 @@ return {
}
})
nvim_lsp.matlab_ls.setup({
cmd = { "matlab-language-server", "--stdio"},
filetypes = { "matlab" },
-- root_dir = nvim_lsp.util.find_git_ancestor,
root_dir = vim.fs.dirname(vim.fs.find('.git', { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]),
single_file_support = true,
settings = {
matlab = {
indexWorkspace = false,
installPath = "/usr/local/MATLAB/R2022b",
matlabConnectionTiming = "onStart",
telemetry = true,
},
}
})
-- nvim_lsp.matlab_ls.setup({
-- cmd = { "matlab-language-server", "--stdio" },
-- filetypes = { "matlab" },
-- -- root_dir = nvim_lsp.util.find_git_ancestor,
-- root_dir = vim.fs.dirname(vim.fs.find('.git',
-- { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]),
-- single_file_support = true,
-- settings = {
-- matlab = {
-- indexWorkspace = false,
-- installPath = "/usr/local/MATLAB/R2024b",
-- matlabConnectionTiming = "onStart",
-- telemetry = true,
-- },
-- }
-- })
--
nvim_lsp.typos_lsp.setup({
cmd = { 'typos-lsp' },
filetypes = { '*' },

View File

@@ -33,17 +33,58 @@ return { {
end,
ft = { "markdown", "md" },
},
-- {
-- "brianhuster/live-preview.nvim",
-- opts = {
-- cmd = "LivePreview", -- Main command of live-preview.nvim
-- port = 5500, -- Port to run the live preview server on.
-- autokill = false, -- If true, the plugin will autokill other processes running on the same port (except for Neovim) when starting the server.
-- browser = 'default', -- Terminal command to open the browser for live-previewing (eg. 'firefox', 'flatpak run com.vivaldi.Vivaldi'). By default, it will use the default browser.
-- dynamic_root = false, -- If true, the plugin will set the root directory to the previewed file's directory. If false, the root directory will be the current working directory (`:lua print(vim.uv.cwd())`).
-- sync_scroll = false, -- If true, the plugin will sync the scrolling in the browser as you scroll in the Markdown files in Neovim.
-- picker = nil, -- Picker to use for opening files. 3 choices are available: 'telescope', 'fzf-lua', 'mini.pick'. If nil, the plugin look for the first available picker when you call the `pick` command.
-- },
-- enabled = false,
-- },
{
"brianhuster/live-preview.nvim",
'MeanderingProgrammer/render-markdown.nvim',
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {
cmd = "LivePreview", -- Main command of live-preview.nvim
port = 5500, -- Port to run the live preview server on.
autokill = false, -- If true, the plugin will autokill other processes running on the same port (except for Neovim) when starting the server.
browser = 'default', -- Terminal command to open the browser for live-previewing (eg. 'firefox', 'flatpak run com.vivaldi.Vivaldi'). By default, it will use the default browser.
dynamic_root = false, -- If true, the plugin will set the root directory to the previewed file's directory. If false, the root directory will be the current working directory (`:lua print(vim.uv.cwd())`).
sync_scroll = false, -- If true, the plugin will sync the scrolling in the browser as you scroll in the Markdown files in Neovim.
picker = nil, -- Picker to use for opening files. 3 choices are available: 'telescope', 'fzf-lua', 'mini.pick'. If nil, the plugin look for the first available picker when you call the `pick` command.
completions = { blink = { enabled = true } },
render_modes = { 'n', 'c', 't' },
},
enabled = false,
}
},
{
'Thiago4532/mdmath.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
opts = {
-- Filetypes that the plugin will be enabled by default.
filetypes = {'markdown'},
-- Color of the equation, can be a highlight group or a hex color.
-- Examples: 'Normal', '#ff0000'
foreground = 'Normal',
-- Hide the text when the equation is under the cursor.
anticonceal = true,
-- Hide the text when in the Insert Mode.
hide_on_insert = true,
-- Enable dynamic size for non-inline equations.
dynamic = true,
-- Configure the scale of dynamic-rendered equations.
dynamic_scale = 1.0,
-- Interval between updates (milliseconds).
update_interval = 400,
-- Internal scale of the equation images, increase to prevent blurry images when increasing terminal
-- font, high values may produce aliased images.
-- WARNING: This do not affect how the images are displayed, only how many pixels are used to render them.
-- See `dynamic_scale` to modify the displayed size.
internal_scale = 1.0,
}
},
}

View File

@@ -8,6 +8,11 @@ return {
none_ls.builtins.diagnostics.gitlint,
none_ls.builtins.diagnostics.cmake_lint,
none_ls.builtins.diagnostics.codespell,
none_ls.builtins.diagnostics.fish,
none_ls.builtins.diagnostics.mypy,
--none_ls.builtins.diagnostics.mlint, - find it
--none_ls.builtins.diagnostics.commitlint, - written in npm
--none_ls.builtins.diagnostics.checkmake, - written in go
none_ls.builtins.hover.dictionary,
none_ls.builtins.formatting.black},
})

View File

@@ -4,10 +4,12 @@ return {
'debugloop/telescope-undo.nvim',
'molecule-man/telescope-menufacture',
'nvim-telescope/telescope-symbols.nvim',
'mrloop/telescope-git-branch.nvim',
{
"isak102/telescope-git-file-history.nvim",
dependencies = { "tpope/vim-fugitive" }
},
'kiyoon/telescope-insert-path.nvim',
"zongben/navimark.nvim",
},
event = 'VeryLazy',
@@ -57,28 +59,32 @@ return {
require('telescope').load_extension('undo')
require('telescope').load_extension('menufacture')
require("telescope").load_extension("git_file_history")
require("telescope").load_extension("git_branch")
local def = { noremap = true, silent = true }
local map = vim.keymap.set
map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', def)
map('n', '<leader>f', '<cmd>lua require("telescope").extensions.menufacture.find_files()<cr>', def)
map('n', '<leader>a', '<cmd>lua require("telescope").extensions.menufacture.grep_string()<cr>', def)
map('n', '<leader>s', '<cmd>lua require("telescope").extensions.menufacture.live_grep()<cr>', def)
map('n', '<leader>b', '<cmd>lua require("telescope.builtin").buffers()<cr>', def)
-- map('n', '<leader>fh', '<cmd>lua require('telescope.builtin').help_tags()<cr>, def)
map('n', '<leader>tc', '<cmd>lua require("telescope.builtin").commands()<cr>', def)
map('n', '<leader>t:', '<cmd>lua require("telescope.builtin").command_history()<cr>', def)
map('n', '<leader>t/', '<cmd>lua require("telescope.builtin").search_history()<cr>', def)
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").registers()<cr>', def)
map('n', '<leader>fr', function() require("telescope.builtin").resume() end, def)
map('n', '<leader>ff', function() require("telescope").extensions.menufacture.find_files() end, def)
map('n', '<leader>fa', function() require("telescope").extensions.menufacture.grep_string() end, def)
map('n', '<leader>fs', function() require("telescope").extensions.menufacture.live_grep() end, def)
map('n', '<leader>fb', function() require("telescope.builtin").buffers() end, def)
-- map('n', '<leader>fh', function() require('telescope.builtin').help_tags() end, def)
map('n', '<leader>fc', function() require("telescope.builtin").commands() end, def)
map('n', '<leader>f:', function() require("telescope.builtin").command_history() end, def)
map('n', '<leader>f/', function() require("telescope.builtin").search_history() end, def)
map('n', '<leader>fr', function() require("telescope.builtin").registers() end, def)
-- Neovim lsp pickers
map('n', 'gr', '<cmd>lua require("telescope.builtin").lsp_references()<cr>', def)
map('n', 'gd', '<cmd>lua require("telescope.builtin").lsp_definitions()<cr>', def)
map('n', 'grr', function() require("telescope.builtin").lsp_references() end, def)
map('n', 'gd', function() require("telescope.builtin").lsp_definitions() end, def)
-- git pickers
-- map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', def)
-- map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def)
-- map('n', '<leader>gc', function() require("telescope.builtin").git_commits() end, def)
-- map('n', '<leader>gC', function() require("telescope.builtin").git_bcommits() end, def)
-- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- other
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, def)
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', def)
-- map('n', '<leader>s', function() require('telescope').extensions.ultisnips.ultisnips() end, def)
map('n', '<leader>fu', function() require("telescope").extensions.undo.undo() end, def)
map('n', '<leader>fg', function() require('git_branch').files() end, def)
map('n', '<C-.>', function() require('telescope_insert_path').insert_relpath_insert() end, def)
map('n', '<C-/>', function() require('telescope_insert_path').insert_abspath_insert() end, def)
end
}