mirror of https://github.com/gabehf/nvim-conf.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.3 KiB
89 lines
2.3 KiB
return {
|
|
{
|
|
"williamboman/mason.nvim",
|
|
cmd = { "Mason", "MasonInstall", "MasonUpdate" },
|
|
config = function(_, opts)
|
|
dofile(vim.g.base46_cache .. "mason")
|
|
require("mason").setup(opts)
|
|
end,
|
|
},
|
|
{ "williamboman/mason-lspconfig.nvim" },
|
|
{
|
|
"VonHeikemen/lsp-zero.nvim",
|
|
branch = "v3.x",
|
|
config = function()
|
|
local lsp_zero = require "lsp-zero"
|
|
lsp_zero.on_attach(function(client, bufnr)
|
|
-- see :help lsp-zero-keybindings
|
|
-- to learn the available actions
|
|
lsp_zero.default_keymaps { buffer = bufnr }
|
|
end)
|
|
-- here you can setup the language servers
|
|
require("mason").setup {}
|
|
require("mason-lspconfig").setup {
|
|
ensure_installed = {
|
|
"tsserver",
|
|
"rust_analyzer",
|
|
"gopls",
|
|
"clangd",
|
|
"lua_ls",
|
|
"pyright",
|
|
},
|
|
handlers = {
|
|
function(server_name)
|
|
require("lspconfig")[server_name].setup {}
|
|
require("lspconfig").lua_ls.setup {
|
|
settings = {
|
|
Lua = {
|
|
diagnostics = { globals = { "vim" } },
|
|
},
|
|
},
|
|
}
|
|
end,
|
|
},
|
|
}
|
|
end,
|
|
},
|
|
{ "neovim/nvim-lspconfig" },
|
|
{ "hrsh7th/cmp-nvim-lsp" },
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
dependencies = {
|
|
{
|
|
-- snippet plugin
|
|
"L3MON4D3/LuaSnip",
|
|
dependencies = "rafamadriz/friendly-snippets",
|
|
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
|
|
config = function(_, opts)
|
|
require("luasnip").config.set_config(opts)
|
|
require "configs.luasnip"
|
|
end,
|
|
},
|
|
|
|
-- autopairing of (){}[] etc
|
|
{
|
|
"windwp/nvim-autopairs",
|
|
opts = {
|
|
fast_wrap = {},
|
|
disable_filetype = { "TelescopePrompt", "vim" },
|
|
},
|
|
config = function(_, opts)
|
|
require("nvim-autopairs").setup(opts)
|
|
|
|
-- setup cmp for autopairs
|
|
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
|
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
end,
|
|
},
|
|
|
|
-- cmp sources plugins
|
|
{
|
|
"saadparwaiz1/cmp_luasnip",
|
|
"hrsh7th/cmp-nvim-lua",
|
|
"hrsh7th/cmp-buffer",
|
|
"hrsh7th/cmp-path",
|
|
},
|
|
},
|
|
},
|
|
}
|