Added functionality to install lsp's from the leader key
This commit is contained in:
parent
ede489d16e
commit
3c4eafa461
1 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue