config(nvim): replace config with opts

main
sudo pacman -Syu 2024-10-28 02:00:04 +07:00
parent c1791cb774
commit 2f06c38f41
1 changed files with 54 additions and 61 deletions

View File

@ -184,23 +184,22 @@ require("lazy").setup({
dependencies = { dependencies = {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
}, },
config = function() opts = {
require("fzf-lua").setup({
winopts = { winopts = {
preview = { preview = {
wrap = "wrap", wrap = "wrap",
},
}, },
defaults = { },
formatter = "path.filename_first", defaults = {
git_icons = false, formatter = "path.filename_first",
}, git_icons = false,
grep = { },
multiline = 1, grep = {
}, multiline = 1,
fzf_colors = true, },
}) fzf_colors = true,
end, },
}, },
-- https://github.com/Saghen/blink.cmp -- https://github.com/Saghen/blink.cmp
@ -251,12 +250,10 @@ require("lazy").setup({
-- https://github.com/svban/YankAssassin.nvim -- https://github.com/svban/YankAssassin.nvim
{ {
"svban/YankAssassin.nvim", "svban/YankAssassin.nvim",
config = function() opts = {
require("YankAssassin").setup({ auto_normal = true,
auto_normal = true, auto_visual = true,
auto_visual = true, },
})
end,
}, },
-- https://github.com/echasnovski/mini.nvim -- https://github.com/echasnovski/mini.nvim
@ -411,39 +408,37 @@ require("lazy").setup({
build = { build = {
":TSUpdate", ":TSUpdate",
}, },
config = function() opts = {
require("nvim-treesitter.configs").setup({ ensure_installed = {
ensure_installed = { "bash",
"bash", "c",
"c", "git_config",
"git_config", "gitcommit",
"gitcommit", "go",
"go", "json",
"json", "lua",
"lua", "make",
"make", "markdown",
"markdown", "markdown_inline",
"markdown_inline", "proto",
"proto", "python",
"python", "query",
"query", "toml",
"toml", "typst",
"typst", "vim",
"vim", "vimdoc",
"vimdoc", },
}, highlight = {
highlight = { enabled = true,
enabled = true, disable = function(lang, bufnr)
disable = function(lang, bufnr) -- Skip big files with many lines
-- Skip big files with many lines return vim.api.nvim_buf_line_count(bufnr) > 10000
return vim.api.nvim_buf_line_count(bufnr) > 10000 end,
end, },
}, incremental_selection = { enable = false },
incremental_selection = { enable = false }, textobjects = { enable = false },
textobjects = { enable = false }, indent = { enable = false },
indent = { enable = false }, },
})
end,
}, },
-- https://github.com/nvim-treesitter/nvim-treesitter-context -- https://github.com/nvim-treesitter/nvim-treesitter-context
@ -452,12 +447,10 @@ require("lazy").setup({
dependencies = { dependencies = {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },
config = function() opts = {
require("treesitter-context").setup({ enable = true,
enable = true, max_lines = 2,
max_lines = 2, },
})
end,
}, },
-- https://github.com/neovim/nvim-lspconfig -- https://github.com/neovim/nvim-lspconfig