refactor: update nvim settings

This commit is contained in:
hhhh hgfh 2026-02-08 16:52:42 +03:00
parent af02e31fe9
commit 6748725b17
33 changed files with 1390 additions and 344 deletions

View file

@ -4,39 +4,41 @@ return {
"nvim-tree/nvim-web-devicons",
opts = {},
},
{
'nvim-mini/mini.nvim',
version = '*'
},
-- Marks
{
"chentoast/marks.nvim",
event = "VeryLazy",
opts = {},
},
-- Gitsigns
-- Git
{
"lewis6991/gitsigns.nvim",
event = {"BufReadPre", "BufNewFile"},
opts = function ()
opts = function()
require("configs.gitsigns")
end
end,
},
-- Theme
{
"xiantang/darcula-dark.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
'akinsho/git-conflict.nvim',
version = "*",
config = true
},
-- Nvim tree
{
"nvim-tree/nvim-tree.lua",
cmd = {'NvimTreeToggle', 'NvimTreeFocus'},
opts = function ()
require("configs.nvimtree")
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
opts = function()
return require "configs.nvimtree"
end,
},
-- Pairs
{
'nvim-mini/mini.pairs',
event = {"BufReadPre", "BufNewFile"},
"nvim-mini/mini.pairs",
event = { "BufReadPost", "BufNewFile" },
opts = {
modes = { insert = true, command = true, terminal = false },
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
@ -44,16 +46,17 @@ return {
skip_unbalanced = true,
markdown = true,
},
},
-- Formating
{
"stevearc/conform.nvim",
event = 'BufWritePre',
config = function ()
require("configs.nvimtree")
config = function()
require "configs.conform"
end,
},
-- Yank Highlight
-- Yank highlight
{
"machakann/vim-highlightedyank",
event = "VeryLazy",

View file

@ -2,9 +2,10 @@ return {
-- Nvim lspconfig
{
"neovim/nvim-lspconfig",
config = function()
require "configs.lsp.lspconfig"
end,
event = { "BufReadPre", "BufNewFile" },
config = function ()
require("configs.lsp.lspconfig")
end
},
-- Mason
{
@ -13,12 +14,12 @@ return {
},
-- Mason lspconfig
{
"mason-org/mason-lspconfig.nvim",
opts = {},
dependencies = {
"mason-org/mason.nvim",
"neovim/nvim-lspconfig",
},
"mason-org/mason-lspconfig.nvim",
opts = {},
dependencies = {
"mason-org/mason.nvim",
"neovim/nvim-lspconfig",
}
},
-- Nvim complete
{
@ -26,7 +27,6 @@ return {
event = "InsertEnter",
dependencies = {
{
-- snippet plugin
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
@ -35,8 +35,6 @@ return {
require "configs.luasnip"
end,
},
-- autopairing of (){}[] etc
{
"windwp/nvim-autopairs",
opts = {
@ -45,14 +43,11 @@ return {
},
config = function(_, opts)
require("nvim-autopairs").setup(opts)
-- setup cmp for autopairs
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},
-- cmp sources plugins
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
@ -65,25 +60,82 @@ return {
return require "configs.cmp"
end,
},
-- Treesitter
-- Treesitter (syntax)
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
build = ":TSUpdate",
opts = function()
return require "configs.treesitter"
end,
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
config = function()
require("nvim-treesitter.config").setup(require "configs.treesitter")
end,
},
-- Ufo folders
-- Folders
{
'kevinhwang91/nvim-ufo',
dependencies = 'kevinhwang91/promise-async',
event = "VeryLazy",
config = function()
require("configs.ufo")
end
},
-- Tests
{
"nvim-neotest/neotest",
event = "VeryLazy",
dependencies = {
"nvim-lua/plenary.nvim",
"alfaix/neotest-gtest",
"olimorris/neotest-phpunit",
},
config = function()
require("neotest").setup({
adapters = {
require("neotest-phpunit"),
require("neotest-gtest").setup({}),
},
})
end,
},
-- These are for C/C++ Debbuger
{
"nvim-neotest/nvim-nio",
event = "VeryLazy",
},
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
config = function ()
require("configs.nvim-dap").setup()
end
},
{
"rcarriga/nvim-dap-ui",
event = "VeryLazy",
dependencies = "mfussenegger/nvim-dap",
},
{
"jay-babu/mason-nvim-dap.nvim",
event = "VeryLazy",
dependencies = {
"williamboman/mason.nvim",
"mfussenegger/nvim-dap",
},
opts = {
handlers = {}
},
},
{
"theHamsta/nvim-dap-virtual-text",
dependencies = "mfussenegger/nvim-dap",
config = function()
require("nvim-dap-virtual-text").setup()
end,
},
{
'aspeddro/gitui.nvim',
config = function ()
require("gitui").setup()
end,
},
}

View file

@ -1,60 +0,0 @@
return {
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
},
-- These are some examples, uncomment them if you want to see them work!
{
"neovim/nvim-lspconfig",
config = function()
require "configs.lspconfig"
end,
},
-- Yank highlight
{
"machakann/vim-highlightedyank",
event = "VeryLazy",
},
-- Icons
{
'ryanoasis/vim-devicons',
event = "VeryLazy",
},
-- These are for C/C++ Debbuger
{
"nvim-neotest/nvim-nio",
event = "VeryLazy",
},
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
config = function ()
require("configs.nvim-dap").setup()
end
},
{
"rcarriga/nvim-dap-ui",
event = "VeryLazy",
dependencies = "mfussenegger/nvim-dap",
},
{
"jay-babu/mason-nvim-dap.nvim",
event = "VeryLazy",
dependencies = {
"williamboman/mason.nvim",
"mfussenegger/nvim-dap",
},
opts = {
handlers = {}
},
},
{
"theHamsta/nvim-dap-virtual-text",
dependencies = "mfussenegger/nvim-dap",
config = function()
require("nvim-dap-virtual-text").setup()
end,
},
}

View file

@ -1,17 +1,17 @@
return {
{
'nvim-lualine/lualine.nvim',
dependencies = 'nvim-tree/nvim-web-devicons',
config = function ()
require("configs.lualine")
end,
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require("configs.lualine")
end,
},
{
'akinsho/bufferline.nvim',
version = "*",
dependencies = 'nvim-tree/nvim-web-devicons',
config = function ()
config = function()
require("configs.bufferline")
end,
}
},
}

View file

@ -1,7 +1,8 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
opts ={
-- add any options here
},
dependencies = {
"MunifTanjim/nui.nvim",
@ -18,13 +19,12 @@ return {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = false,
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
}
}

View file

@ -5,7 +5,8 @@ return {
---@type snacks.Config
opts = {
bigfile = { enabled = true },
dashboard = { enabled = true },
dashboard = { enabled = true, },
explorer = { enabled = false },
indent = { enabled = true },
input = { enabled = true },
picker = { enabled = true },

View file

@ -1,9 +1,8 @@
return {
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
dependencies = {'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter'},
return {
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
cmd = "Telescope",
configs =function ()
return require("configs.telescope")
configs = function()
return require "configs.telescope"
end,
}

View file

@ -0,0 +1,8 @@
return {
'chomosuke/typst-preview.nvim',
lazy = false,
version = '1.*',
opts = {
port = 8000,
},
}