Added functionality to install lsp's from the leader key

This commit is contained in:
Warwick New 2026-03-03 13:46:12 +00:00
parent ede489d16e
commit 3c4eafa461

View file

@ -7,6 +7,7 @@ return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = "folke/which-key.nvim", dependencies = "folke/which-key.nvim",
config = function() config = function()
require('which-key').add({ '<leader>lI', ':LspInstall <CR>', desc = "Install Lsp" })
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}), group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev) callback = function(ev)
@ -35,7 +36,7 @@ return {
{ '<leader>lf', function() { '<leader>lf', function()
vim.lsp.buf.format { async = true } vim.lsp.buf.format { async = true }
end, opts } end, opts },
}) })
end, end,
}) })