Made lsconfig to a variable
This commit is contained in:
parent
c9eab38d4d
commit
901b8cc5cf
1 changed files with 12 additions and 7 deletions
|
@ -6,7 +6,7 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
|||
vim.fn.system{'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
vim
|
||||
|
||||
-- Install Plugins
|
||||
require('packer').startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
@ -83,13 +83,15 @@ require("neodev").setup({
|
|||
-- add any options here, or leave empty to use the default settings
|
||||
})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
-- lsp configs
|
||||
require('lspconfig')['tsserver'].setup{
|
||||
lspconfig.tsserver.setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags
|
||||
}
|
||||
|
||||
require('lspconfig')['lua_ls'].setup{
|
||||
lspconfig.lua_ls.setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
|
@ -97,29 +99,32 @@ require('lspconfig')['lua_ls'].setup{
|
|||
Lua = {
|
||||
completion = {
|
||||
callSnippet = "Replace"
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {'vim'},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require('lspconfig')['gopls'].setup{
|
||||
lspconfig.gopls.setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags
|
||||
}
|
||||
|
||||
require('lspconfig')['emmet_ls'].setup{
|
||||
lspconfig.emmet_ls.setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require'lspconfig'.cssls.setup{
|
||||
lspconfig.cssls.setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig')['docker_compose_language_service'].setup{
|
||||
lspconfig.docker_compose_language_service.setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities
|
||||
|
|
Loading…
Reference in a new issue