feat: migrated plugin manager from lazy to vim.pack

This commit is contained in:
2026-03-08 10:37:07 +01:00
parent bb89997e23
commit 7cb5b2d4b6
8 changed files with 155 additions and 166 deletions

View File

@@ -0,0 +1,24 @@
vim.pack.add({
'https://github.com/stevearc/conform.nvim'
})
require('conform').setup({
formatters_by_ft = {
cpp = { "clang-format" },
python = { "black" }
},
-- Set default options
default_format_opts = {
lsp_format = "fallback",
},
-- Set up format-on-save
format_on_save = { timeout_ms = 1000 },
-- Customize formatters
formatters = {
['clang-format'] = {
append_args = function(self, ctx)
return { "-style={IndentWidth: 4}" }
end,
},
},
})

View File

@@ -1,76 +1,25 @@
vim.pack.add({
'https://github.com/neovim/nvim-lspconfig',
'https://github.com/mason-org/mason.nvim',
'https://github.com/mason-org/mason-lspconfig.nvim',
})
return {
{
"neovim/nvim-lspconfig",
},
{
"mason-org/mason.nvim",
opts = {
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
require('mason').setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
},
{
"williamboman/mason-lspconfig.nvim",
opts = {
ensure_installed = {
"svelte",
"clangd",
"ts_ls",
"pyright"
},
},
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
},
{
'hrsh7th/nvim-cmp',
opts = {
sources = {
{ name = 'nvim_lsp' },
{ name = 'buffer' },
{ name = 'path' },
}
},
event = "InsertEnter",
dependencies = {
{'L3MON4D3/LuaSnip'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-nvim-lsp'},
{'saadparwaiz1/cmp_luasnip'},
},
},
{
'stevearc/conform.nvim',
opts = {
-- Define your formatters
formatters_by_ft = {
cpp = { "clang-format" },
python = {"black"}
},
-- Set default options
default_format_opts = {
lsp_format = "fallback",
},
-- Set up format-on-save
format_on_save = { timeout_ms = 1000 },
-- Customize formatters
formatters = {
['clang-format'] = {
append_args = function(self, ctx)
return { "-style={IndentWidth: 4}" }
end,
},
},
},
}
}
})
require('mason-lspconfig').setup({
ensure_installed = {
"svelte",
"clangd",
"ts_ls",
"pyright",
"lua_ls"
},
automatic_enable = true,
})

View File

@@ -1,10 +1,11 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
{"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
}
}
vim.pack.add({
--Neo-Tree
'https://github.com/MunifTanjim/nui.nvim',
'https://github.com/nvim-lua/plenary.nvim',
"https://github.com/nvim-tree/nvim-web-devicons",
'https://github.com/nvim-neo-tree/neo-tree.nvim',
})
require("neo-tree").setup({
close_if_last_window = true,
})

View File

@@ -1,17 +1,14 @@
return {
"rose-pine/neovim",
name = "rose-pine",
config = function()
local configs = require("rose-pine");
configs.setup({
variant = "moon",
styles = {
transparency = true;
}
})
vim.pack.add({
'https://github.com/rose-pine/neovim',
})
vim.cmd("colorscheme rose-pine")
end
}
require("rose-pine").setup({
variant = "moon",
styles = {
transparency = true;
}
})
vim.cmd[[colorscheme rose-pine]]

View File

@@ -1,20 +1,11 @@
return{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
config = function ()
vim.pack.add({
'https://github.com/nvim-treesitter/nvim-treesitter'
})
local treesitter = require("nvim-treesitter")
require('nvim-treesitter').setup({})
require('nvim-treesitter').install( {'lua','rust', 'javascript', 'zig', "c","typescript", "cpp","haskell","svelte","python", "vim", "vimdoc", "html" })
treesitter.setup({
ensure_installed = { "c", "cpp","haskell", "lua","svelte","python", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
}
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'python', 'lua' },
callback = function() vim.treesitter.start() end,
})