Skip to content

Commit

Permalink
config(nvim): replace config with opts
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Oct 27, 2024
1 parent c1791cb commit 2f06c38
Showing 1 changed file with 54 additions and 61 deletions.
115 changes: 54 additions & 61 deletions data/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,23 +184,22 @@ require("lazy").setup({
dependencies = {
"neovim/nvim-lspconfig",
},
config = function()
require("fzf-lua").setup({
winopts = {
preview = {
wrap = "wrap",
},
},
defaults = {
formatter = "path.filename_first",
git_icons = false,
},
grep = {
multiline = 1,
opts = {

winopts = {
preview = {
wrap = "wrap",
},
fzf_colors = true,
})
end,
},
defaults = {
formatter = "path.filename_first",
git_icons = false,
},
grep = {
multiline = 1,
},
fzf_colors = true,
},
},

-- https://github.com/Saghen/blink.cmp
Expand Down Expand Up @@ -251,12 +250,10 @@ require("lazy").setup({
-- https://github.com/svban/YankAssassin.nvim
{
"svban/YankAssassin.nvim",
config = function()
require("YankAssassin").setup({
auto_normal = true,
auto_visual = true,
})
end,
opts = {
auto_normal = true,
auto_visual = true,
},
},

-- https://github.com/echasnovski/mini.nvim
Expand Down Expand Up @@ -411,39 +408,37 @@ require("lazy").setup({
build = {
":TSUpdate",
},
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"bash",
"c",
"git_config",
"gitcommit",
"go",
"json",
"lua",
"make",
"markdown",
"markdown_inline",
"proto",
"python",
"query",
"toml",
"typst",
"vim",
"vimdoc",
},
highlight = {
enabled = true,
disable = function(lang, bufnr)
-- Skip big files with many lines
return vim.api.nvim_buf_line_count(bufnr) > 10000
end,
},
incremental_selection = { enable = false },
textobjects = { enable = false },
indent = { enable = false },
})
end,
opts = {
ensure_installed = {
"bash",
"c",
"git_config",
"gitcommit",
"go",
"json",
"lua",
"make",
"markdown",
"markdown_inline",
"proto",
"python",
"query",
"toml",
"typst",
"vim",
"vimdoc",
},
highlight = {
enabled = true,
disable = function(lang, bufnr)
-- Skip big files with many lines
return vim.api.nvim_buf_line_count(bufnr) > 10000
end,
},
incremental_selection = { enable = false },
textobjects = { enable = false },
indent = { enable = false },
},
},

-- https://github.com/nvim-treesitter/nvim-treesitter-context
Expand All @@ -452,12 +447,10 @@ require("lazy").setup({
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("treesitter-context").setup({
enable = true,
max_lines = 2,
})
end,
opts = {
enable = true,
max_lines = 2,
},
},

-- https://github.com/neovim/nvim-lspconfig
Expand Down

0 comments on commit 2f06c38

Please sign in to comment.