Normalize nvim plugin configs to 4-space indentation

This commit is contained in:
duma799
2026-02-12 01:11:21 +04:00
parent 5a3f4bb8a1
commit 0e8f03710b
6 changed files with 168 additions and 170 deletions
+96 -98
View File
@@ -1,104 +1,102 @@
return { return {
{ {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
},
{
"hrsh7th/cmp-buffer",
},
{
"hrsh7th/cmp-path",
},
{
"hrsh7th/cmp-cmdline",
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
}, },
}, {
{ "hrsh7th/cmp-buffer",
"hrsh7th/nvim-cmp", },
config = function() {
local cmp = require("cmp") "hrsh7th/cmp-path",
local luasnip = require("luasnip") },
require("luasnip.loaders.from_vscode").lazy_load() {
"hrsh7th/cmp-cmdline",
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
},
},
{
"hrsh7th/nvim-cmp",
config = function()
local cmp = require("cmp")
local luasnip = require("luasnip")
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({ cmp.setup({
snippet = { snippet = {
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
end, end,
}, },
window = { window = {
completion = cmp.config.window.bordered(), completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(),
}, },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4), ["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(), ["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(), ["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), ["<CR>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump() luasnip.expand_or_jump()
else else
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback) ["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item() cmp.select_prev_item()
elseif luasnip.jumpable(-1) then elseif luasnip.jumpable(-1) then
luasnip.jump(-1) luasnip.jump(-1)
else else
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "nvim_lsp", priority = 1000 }, { name = "nvim_lsp", priority = 1000 },
{ name = "luasnip", priority = 750 }, { name = "luasnip", priority = 750 },
{ name = "buffer", priority = 500 }, { name = "buffer", priority = 500 },
{ name = "path", priority = 250 }, { name = "path", priority = 250 },
}), }),
formatting = { formatting = {
format = function(entry, vim_item) format = function(entry, vim_item)
vim_item.menu = ({ vim_item.menu = ({
nvim_lsp = "[LSP]", nvim_lsp = "[LSP]",
luasnip = "[Snippet]", luasnip = "[Snippet]",
buffer = "[Buffer]", buffer = "[Buffer]",
path = "[Path]", path = "[Path]",
})[entry.source.name] })[entry.source.name]
return vim_item return vim_item
end, end,
}, },
experimental = { experimental = {
ghost_text = true, ghost_text = true,
}, },
}) })
-- Use buffer source for `/` and `?` (search) cmp.setup.cmdline({ "/", "?" }, {
cmp.setup.cmdline({ "/", "?" }, { mapping = cmp.mapping.preset.cmdline(),
mapping = cmp.mapping.preset.cmdline(), sources = {
sources = { { name = "buffer" },
{ name = "buffer" }, },
}, })
})
-- Use cmdline & path source for ':' (command mode) cmp.setup.cmdline(":", {
cmp.setup.cmdline(":", { mapping = cmp.mapping.preset.cmdline(),
mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({
sources = cmp.config.sources({ { name = "path" },
{ name = "path" }, }, {
}, { { name = "cmdline" },
{ name = "cmdline" }, }),
}), })
}) end,
end, },
},
} }
+6 -6
View File
@@ -1,8 +1,8 @@
return { return {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
config = function() config = function()
require('colorizer').setup { require('colorizer').setup {
'*' '*'
} }
end end
} }
+1 -1
View File
@@ -1,5 +1,5 @@
return { return {
"lewis6991/gitsigns.nvim", -- Add a comma here "lewis6991/gitsigns.nvim",
config = function() config = function()
require('gitsigns').setup { require('gitsigns').setup {
signs = { signs = {
+16 -16
View File
@@ -1,19 +1,19 @@
return { return {
"echasnovski/mini.icons", "echasnovski/mini.icons",
lazy = true, lazy = true,
opts = { opts = {
file = { file = {
[".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" }, [".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" },
["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" }, ["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" },
},
filetype = {
dotenv = { glyph = "", hl = "MiniIconsYellow" },
},
}, },
filetype = { init = function()
dotenv = { glyph = "", hl = "MiniIconsYellow" }, package.preload["nvim-web-devicons"] = function()
}, require("mini.icons").mock_nvim_web_devicons()
}, return package.loaded["nvim-web-devicons"]
init = function() end
package.preload["nvim-web-devicons"] = function() end,
require("mini.icons").mock_nvim_web_devicons()
return package.loaded["nvim-web-devicons"]
end
end,
} }
+39 -39
View File
@@ -1,41 +1,41 @@
return { return {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
branch = "v3.x", branch = "v3.x",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
}, },
config = function() config = function()
require("neo-tree").setup({ require("neo-tree").setup({
close_if_last_window = false, close_if_last_window = false,
popup_border_style = "rounded", popup_border_style = "rounded",
enable_git_status = true, enable_git_status = true,
enable_diagnostics = true, enable_diagnostics = true,
filesystem = { filesystem = {
filtered_items = { filtered_items = {
visible = false, visible = false,
hide_dotfiles = false, hide_dotfiles = false,
hide_gitignored = false, hide_gitignored = false,
}, },
follow_current_file = { follow_current_file = {
enabled = false, enabled = false,
}, },
use_libuv_file_watcher = true, use_libuv_file_watcher = true,
}, },
window = { window = {
position = "left", position = "left",
width = 30, width = 30,
}, },
event_handlers = { event_handlers = {
{ {
event = "file_opened", event = "file_opened",
handler = function() handler = function()
require("neo-tree.command").execute({ action = "close" }) require("neo-tree.command").execute({ action = "close" })
end, end,
}, },
}, },
}) })
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>") vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>")
end, end,
} }
+10 -10
View File
@@ -1,12 +1,12 @@
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
config = function() config = function()
local config = require("nvim-treesitter.configs") local config = require("nvim-treesitter.configs")
config.setup({ config.setup({
auto_install = false, auto_install = false,
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true }, indent = { enable = true },
}) })
end, end,
} }