Light refactoring, move as many config = func uses into opts as

possible.
This commit is contained in:
Martin Larsson 2024-07-12 17:04:53 +02:00
parent 657f9cb7e1
commit 0a53678bb9
10 changed files with 119 additions and 140 deletions

View file

@ -1,7 +1,6 @@
return {
"rmagatti/auto-session",
config = function()
require("auto-session").setup {
opts = {
log_level = "error",
auto_session_suppress_dirs = {
"/",
@ -15,5 +14,4 @@ return {
"~/dev/git/.dotfiles",
},
}
end
}

View file

@ -1,7 +1,6 @@
return {
"norcalli/nvim-colorizer.lua",
config = function()
require("colorizer").setup({
opts = {
DEFAULT_OPTIONS = {
RGB = true,
RRGGBB = true,
@ -12,6 +11,5 @@ return {
mode = "background",
},
"*",
})
end,
}
}

View file

@ -1,11 +1,9 @@
return {
"ggandor/flit.nvim",
config = function()
require("flit").setup {
opts = {
keys = { f = "f", F = "F", t = "t", T = "T" },
labeled_modes = "v",
multiline = true,
opts = {}
}
end,
}

View file

@ -1,12 +1,10 @@
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
config = function()
require("ibl").setup({
opts = {
debounce = 100,
scope = {
enabled = false
},
})
end
}
}

View file

@ -8,15 +8,6 @@ return {
require("lspsaga").setup({
symbol_in_winbar = {
enable = false,
-- separator = " ",
-- hide_keyword = true,
-- ignore_patterns = nil,
-- show_file = true,
-- folder_level = 2,
-- color_mode = true,
-- dely = 300,
-- show_nodes = true,
-- max_nodes = 2,
},
implement = {
enable = false,

View file

@ -1,3 +0,0 @@
return {
"nvim-lua/plenary.nvim",
}

View file

@ -1,6 +1,7 @@
return {
"LennyPhoenix/project.nvim",
branch = "fix-get_clients",
-- This plugin does not have a lua module and we have to use config
config = function()
require("project_nvim").setup({
patterns = {

View file

@ -1,8 +1,9 @@
return {
"rasulomaroff/reactive.nvim",
config = function()
require("reactive").setup({
load = { "catppuccin-macchiato-cursor", "catppuccin-macchiato-cursorline" }
})
end,
opts = {
load = {
"catppuccin-macchiato-cursor",
"catppuccin-macchiato-cursorline",
}
}
}

View file

@ -2,8 +2,7 @@ return {
"kylechui/nvim-surround",
version = "*",
event = "VeryLazy",
config = function()
require("nvim-surround").setup({
opts = {
-- Make sure that we never get whitespaces when adding surroundings
surrounds = {
["("] = { add = { "(", ")" }, },
@ -11,6 +10,5 @@ return {
["<"] = { add = { "<", ">" }, },
["["] = { add = { "[", "]" }, },
}
})
end,
}
}

View file

@ -3,11 +3,17 @@ return {
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate",
dependencies = {
{
"nvim-treesitter/nvim-treesitter-context",
opts = {
max_lines = 2, -- How many lines the window should span. Values <= 0 mean no limit.
multiline_threshold = 3, -- Maximum number of lines to show for a single context
trim_scope = "inner", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
}
},
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
require("nvim-treesitter.configs").setup({
opts = {
ensure_installed = {
"vim",
"vimdoc",
@ -68,12 +74,5 @@ return {
},
},
},
})
require("treesitter-context").setup({
max_lines = 2, -- How many lines the window should span. Values <= 0 mean no limit.
multiline_threshold = 3, -- Maximum number of lines to show for a single context
trim_scope = "inner", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
})
end,
}
}