68 lines
1.7 KiB
Lua
68 lines
1.7 KiB
Lua
return {
|
|
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
},
|
|
{
|
|
"mason-org/mason.nvim",
|
|
opts = {
|
|
ui = {
|
|
icons = {
|
|
package_installed = "✓",
|
|
package_pending = "➜",
|
|
package_uninstalled = "✗"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"williamboman/mason-lspconfig.nvim",
|
|
opts = {
|
|
ensure_installed = { "clangd" },
|
|
},
|
|
dependencies = {
|
|
{ "mason-org/mason.nvim", opts = {} },
|
|
"neovim/nvim-lspconfig",
|
|
},
|
|
},
|
|
{
|
|
'hrsh7th/nvim-cmp',
|
|
opts = {
|
|
sources = {
|
|
{ name = 'nvim_lsp' },
|
|
{ name = 'buffer' },
|
|
{ name = 'path' },
|
|
}
|
|
},
|
|
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" },
|
|
},
|
|
-- Set default options
|
|
default_format_opts = {
|
|
lsp_format = "fallback",
|
|
},
|
|
-- Set up format-on-save
|
|
format_on_save = { timeout_ms = 500 },
|
|
-- Customize formatters
|
|
formatters = {
|
|
['clang-format'] = {
|
|
append_args = function(self, ctx)
|
|
return { "-style={IndentWidth: 4}" }
|
|
end,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|