feat: migrated plugin manager from lazy to vim.pack
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user