Files
Dotfiles/.config/nvim/lua/plugins/lsp.lua

77 lines
1.8 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 = {
"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,
},
},
},
}
}