aboutsummaryrefslogtreecommitdiff
path: root/lua/pml68/plugins/lsp.lua
diff options
context:
space:
mode:
authorpml68 <contact@pml68.me>2024-11-29 23:28:27 +0100
committerpml68 <contact@pml68.me>2024-11-29 23:28:27 +0100
commit82a1c1e251210f4805dec8f6d59a6ab2c6791334 (patch)
treec2db695fe2767ff314319a490c833bebd30f99a8 /lua/pml68/plugins/lsp.lua
parentfeat: remove deprecated API call (diff)
downloadnvim-82a1c1e251210f4805dec8f6d59a6ab2c6791334.tar.gz
feat: split plugins.lua into manageable "chunks"
Diffstat (limited to '')
-rw-r--r--lua/pml68/plugins/lsp.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/lua/pml68/plugins/lsp.lua b/lua/pml68/plugins/lsp.lua
new file mode 100644
index 0000000..644a206
--- /dev/null
+++ b/lua/pml68/plugins/lsp.lua
@@ -0,0 +1,25 @@
+return {
+ {
+ "neovim/nvim-lspconfig",
+ event = { "BufReadPost", "BufNewFile" },
+ config = function()
+ require("pml68.configs.lspconfig")
+ end
+ },
+ {
+ "williamboman/mason.nvim",
+ cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" },
+ opts = function()
+ return require("pml68.configs.mason")
+ end,
+ config = function(_, opts)
+ require("mason").setup(opts)
+ vim.api.nvim_create_user_command("MasonInstallAll", function()
+ if opts.ensure_installed and #opts.ensure_installed > 0 then
+ vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
+ end
+ end, {})
+ end,
+ build = ":MasonInstallAll",
+ },
+}