config: nvim: add LSP support together with mason package manager
This commit is contained in:
parent
ab5cceddab
commit
c058fa22ea
4 changed files with 71 additions and 0 deletions
|
|
@ -43,6 +43,38 @@ return require('packer').startup({
|
|||
config = function() require('colorizer').setup() end,
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- Package Manager
|
||||
--------------------
|
||||
use { -- portable package manager
|
||||
'williamboman/mason.nvim',
|
||||
config = load_config('mason'),
|
||||
}
|
||||
use { -- update helper for mason
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
after = { 'mason.nvim' },
|
||||
config = function() require('mason-tool-installer').setup({}) end,
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- LSP Setup
|
||||
--------------------
|
||||
use { -- compatibility layer between mason and lspconfig + autoinstaller
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
after = { 'mason.nvim' },
|
||||
requires = {
|
||||
'neovim/nvim-lspconfig',
|
||||
},
|
||||
}
|
||||
use { -- configuration layer for neovim LSP client
|
||||
'neovim/nvim-lspconfig',
|
||||
after = {
|
||||
'mason-lspconfig.nvim',
|
||||
'cmp-nvim-lsp',
|
||||
},
|
||||
config = load_config('lspconfig'),
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- Snippets
|
||||
--------------------
|
||||
|
|
@ -62,6 +94,10 @@ return require('packer').startup({
|
|||
--------------------
|
||||
-- Completion
|
||||
--------------------
|
||||
use { -- nvim-cmp source for nvim-lsp
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
requires = { 'hrsh7th/nvim-cmp' },
|
||||
}
|
||||
use { -- nvim-cmp source for LuaSnip
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
requires = { 'hrsh7th/nvim-cmp' },
|
||||
|
|
@ -82,6 +118,7 @@ return require('packer').startup({
|
|||
use { -- completion engine
|
||||
'hrsh7th/nvim-cmp',
|
||||
after = {
|
||||
'cmp-nvim-lsp',
|
||||
'cmp-buffer',
|
||||
'cmp-path',
|
||||
'cmp-cmdline',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue