This commit is contained in:
ant 2025-01-04 20:17:45 +01:00 committed by Antoine Vaure
parent b5f0fa7efd
commit b8b309fbe8
2 changed files with 122 additions and 213 deletions

View file

@ -1,6 +1,6 @@
local cmp = require "cmp" local cmp = require "cmp"
local options = { cmp.setup({
snippet = { snippet = {
expand = function(args) expand = function(args)
@ -38,6 +38,6 @@ local options = {
{ name = "nvim_lua" }, { name = "nvim_lua" },
{ name = "path" }, { name = "path" },
}, },
} })
return options return options

View file

@ -13,17 +13,6 @@ local plugins = {
require('configs.treesitter') require('configs.treesitter')
end, end,
}, },
-- {
-- "williamboman/mason-lspconfig.nvim",
-- dependencies = {
-- "williamboman/mason.nvim",
-- },
-- config = function()
-- require("mason").setup()
-- require("mason-lspconfig").setup()
-- --
-- end
-- },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
config = function() config = function()
@ -34,109 +23,96 @@ local plugins = {
"catppuccin/nvim", "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",
priority = 1000, priority = 1000,
config = function() opts = {
require("catppuccin").setup({ background = { -- :h background
background = { -- :h background light = "latte",
light = "latte", dark = "mocha",
dark = "mocha", },
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
comments = {}, -- Change the style of comments
conditionals = { "italic" },
loops = {},
functions = {},
keywords = { "italic" },
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = { "italic" },
types = { "bold" },
operators = {},
},
color_overrides = {
mocha = {
base = "#000000",
mantle = "#111111",
crust = "#111111",
}, },
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): latte = {
comments = {}, -- Change the style of comments base = "#ffffff",
conditionals = { "italic" }, mantle = "#f5f5f5",
loops = {}, crust = "#f5f5f5",
functions = {}, black = "#000000",
keywords = { "italic" }, }
strings = {}, },
variables = {}, custom_highlights = function(C)
numbers = {}, return {
booleans = {}, HopNextKey = { bg = C.text, fg = C.base, style = { "bold", "underline" } },
properties = { "italic" }, HopNextKey1 = { bg = C.text, fg = C.base, style = { "bold" } },
types = { "bold" }, HopNextKey2 = { bg = C.text, fg = C.base, style = { "bold", "italic" } },
operators = {}, DiagnosticUnderlineError = { style = { "undercurl" } },
DiagnosticUnderlineWarn = { style = { "undercurl" } },
DiagnosticUnderlineInfo = { style = { "undercurl" } },
DiagnosticUnderlineHint = { style = { "undercurl" } },
DiagnosticUnderlineOk = { style = { "undercurl" } },
-- Function = { fg = C.blue, style = { "bold" } },
-- Keyword = { fg = C.black, style = { "italic" } },
}
end,
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
mini = true,
mason = true,
neogit = true,
illuminate = false,
-- noice = true,
-- notify = true,
flash = true,
telescope = {
enabled = true,
style = "nvchad"
}, },
color_overrides = { dap = {
mocha = { enabled = true,
base = "#000000", enable_ui = true, -- enable nvim-dap-ui
mantle = "#000000",
crust = "#000000",
},
latte = {
base = "#ffffff",
mantle = "#f5f5f5",
crust = "#f5f5f5",
black = "#000000",
}
}, },
custom_highlights = function(C) indent_blankline = {
return { enabled = true,
HopNextKey = { bg = C.text, fg = C.base, style = { "bold", "underline" } }, },
HopNextKey1 = { bg = C.text, fg = C.base, style = { "bold" } }, native_lsp = {
HopNextKey2 = { bg = C.text, fg = C.base, style = { "bold", "italic" } }, enabled = true,
DiagnosticUnderlineError = { style = { "undercurl" } }, virtual_text = {
DiagnosticUnderlineWarn = { style = { "undercurl" } }, errors = { "italic" },
DiagnosticUnderlineInfo = { style = { "undercurl" } }, hints = { "italic" },
DiagnosticUnderlineHint = { style = { "undercurl" } }, warnings = { "italic" },
DiagnosticUnderlineOk = { style = { "undercurl" } }, information = { "italic" },
-- Function = { fg = C.blue, style = { "bold" } },
-- Keyword = { fg = C.black, style = { "italic" } },
}
end,
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
mini = true,
mason = true,
neogit = true,
illuminate = false,
-- noice = true,
-- notify = true,
flash = true,
telescope = {
enabled = true,
style = "nvchad"
}, },
dap = { underlines = {
enabled = true, errors = { "underline" },
enable_ui = true, -- enable nvim-dap-ui hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
}, },
indent_blankline = { inlay_hints = {
enabled = true, background = true,
},
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
}, },
}, },
}) },
end, }
}, },
-- {
-- "Shatur/neovim-ayu",
-- config = function()
-- require('ayu').setup({
-- options = {
-- theme = 'ayu',
-- },
-- })
-- end,
-- },
-- Install without configuration
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy", event = "VeryLazy",
@ -144,11 +120,6 @@ local plugins = {
vim.o.timeout = true vim.o.timeout = true
vim.o.timeoutlen = 300 vim.o.timeoutlen = 300
end, end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
}, },
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
@ -174,7 +145,7 @@ local plugins = {
'saadparwaiz1/cmp_luasnip' 'saadparwaiz1/cmp_luasnip'
}, },
}, },
opts = function() config = function()
return require "configs.cmp" return require "configs.cmp"
end, end,
}, },
@ -194,40 +165,32 @@ local plugins = {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
dependencies = { dependencies = {
'nvim-tree/nvim-web-devicons', 'nvim-tree/nvim-web-devicons',
-- 'arkav/lualine-lsp-progress', { 'linrongbin16/lsp-progress.nvim', opts = {} }
}, },
config = function() opts = require("configs.lualine")
require('lualine').setup(require("configs.lualine"))
end
}, },
{ {
'akinsho/bufferline.nvim', 'akinsho/bufferline.nvim',
version = "*", version = "*",
dependencies = { 'nvim-tree/nvim-web-devicons', 'catppuccin' }, dependencies = { 'nvim-tree/nvim-web-devicons', 'catppuccin' },
config = function() config = function()
require("bufferline").setup { require("bufferline").setup({
highlights = require("catppuccin.groups.integrations.bufferline").get() highlights = require("catppuccin.groups.integrations.bufferline").get()
} })
end end
}, },
{ {
'numToStr/Comment.nvim', 'numToStr/Comment.nvim',
lazy = false, opts = {}
config = function()
require("Comment").setup()
end,
}, },
{ {
'Wansmer/treesj', 'Wansmer/treesj',
keys = { '<space>m', '<space>j', '<space>s' }, keys = { '<space>m', '<space>j', '<space>s' },
dependencies = { 'nvim-treesitter/nvim-treesitter' }, dependencies = { 'nvim-treesitter/nvim-treesitter' },
config = function() opts = {
require('treesj').setup({ use_default_keymaps = false,
use_default_keymaps = false, max_join_length = 1200,
max_join_length = 1200, },
})
end,
}, },
{ {
"rmagatti/auto-session", "rmagatti/auto-session",
@ -258,22 +221,6 @@ local plugins = {
}) })
end, end,
}, },
-- {
-- 'niuiic/multiple-session.nvim',
-- dependencies = { 'niuiic/core.nvim' },
-- config = function () require("multiple-session").setup() end
-- },
-- Lua
-- {
-- "olimorris/persisted.nvim",
-- lazy = false, -- make sure the plugin is always loaded at startup
-- config = function()
-- require("persisted").setup({
-- autosave = true,
-- autoload = true,
-- })
-- end,
-- },
{ {
"ethanholz/nvim-lastplace", "ethanholz/nvim-lastplace",
config = function() config = function()
@ -291,12 +238,6 @@ local plugins = {
require('mini.files').setup() require('mini.files').setup()
end, end,
}, },
{
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
},
},
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
config = function() config = function()
@ -368,36 +309,31 @@ local plugins = {
"sustech-data/wildfire.nvim", "sustech-data/wildfire.nvim",
event = "VeryLazy", event = "VeryLazy",
dependencies = { "nvim-treesitter/nvim-treesitter" }, dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function() opts = {
require("wildfire").setup({ keymaps = {
keymaps = { init_selection = "<space>",
init_selection = "<space>", node_incremental = "<space>",
node_incremental = "<space>", node_decremental = "<c-space>",
node_decremental = "<c-space>",
}
} }
) }
end,
}, },
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
main = "ibl", main = "ibl",
opts = { opts = function()
scope = { return {
show_start = false, scope = {
show_end = false, show_start = false,
}, show_end = false,
}, },
}
end,
}, },
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy", event = "VeryLazy",
config = function() opts = {}
require("nvim-surround").setup({
-- Configuration here, or leave empty to use defaults
})
end
}, },
{ {
"NeogitOrg/neogit", "NeogitOrg/neogit",
@ -407,15 +343,13 @@ local plugins = {
"sindrets/diffview.nvim", -- optional "sindrets/diffview.nvim", -- optional
"ibhagwan/fzf-lua", -- optional "ibhagwan/fzf-lua", -- optional
}, },
config = function() opts = {
require("neogit").setup({ sections = {
sections = { untracked = {
untracked = { folded = true,
folded = true,
}
} }
}) }
end }
}, },
{ {
"RRethy/vim-illuminate", "RRethy/vim-illuminate",
@ -464,13 +398,11 @@ local plugins = {
{ {
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function() opts = {
require("dapui").setup({ controls = {
-- controls = { enabled = false,
-- enabled = false, },
-- }, }
})
end
}, },
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
@ -479,19 +411,11 @@ local plugins = {
end end
}, },
{ "nvim-neotest/nvim-nio" }, { "nvim-neotest/nvim-nio" },
{
'linrongbin16/lsp-progress.nvim',
config = function()
require('lsp-progress').setup()
end
},
{ {
"theHamsta/nvim-dap-virtual-text", "theHamsta/nvim-dap-virtual-text",
lazy = false, lazy = false,
dependencies = { "mfussenegger/nvim-dap", "nvim-treesitter/nvim-treesitter" }, dependencies = { "mfussenegger/nvim-dap", "nvim-treesitter/nvim-treesitter" },
config = function() opts = {}
require("nvim-dap-virtual-text").setup()
end
}, },
{ {
'echasnovski/mini.align', 'echasnovski/mini.align',
@ -506,7 +430,6 @@ local plugins = {
}, },
}, },
}, },
{ 'sbdchd/neoformat' },
{ {
"brenton-leighton/multiple-cursors.nvim", "brenton-leighton/multiple-cursors.nvim",
version = "*", -- Use the latest tagged version version = "*", -- Use the latest tagged version
@ -523,16 +446,6 @@ local plugins = {
-- { "<Leader>D", "<Cmd>MultipleCursorsJumpNextMatch<CR>" }, -- { "<Leader>D", "<Cmd>MultipleCursorsJumpNextMatch<CR>" },
}, },
}, },
{
'glacambre/firenvim',
-- Lazy load firenvim
-- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297
lazy = not vim.g.started_by_firenvim,
build = function()
vim.fn["firenvim#install"](0)
end
},
{ {
'stevearc/conform.nvim', 'stevearc/conform.nvim',
config = function() config = function()
@ -564,11 +477,7 @@ local plugins = {
}, },
{ {
"chentoast/marks.nvim", "chentoast/marks.nvim",
config = function() opts = {},
require "marks".setup {
}
end
}, },
{ {
'nvim-treesitter/nvim-treesitter-context', 'nvim-treesitter/nvim-treesitter-context',