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.fn.system{'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }
|
||||||
vim.cmd [[packadd packer.nvim]]
|
vim.cmd [[packadd packer.nvim]]
|
||||||
end
|
end
|
||||||
vim
|
|
||||||
-- Install Plugins
|
-- Install Plugins
|
||||||
require('packer').startup(function(use)
|
require('packer').startup(function(use)
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
@ -83,13 +83,15 @@ require("neodev").setup({
|
||||||
-- add any options here, or leave empty to use the default settings
|
-- add any options here, or leave empty to use the default settings
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
-- lsp configs
|
-- lsp configs
|
||||||
require('lspconfig')['tsserver'].setup{
|
lspconfig.tsserver.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags
|
flags = lsp_flags
|
||||||
}
|
}
|
||||||
|
|
||||||
require('lspconfig')['lua_ls'].setup{
|
lspconfig.lua_ls.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
@ -97,29 +99,32 @@ require('lspconfig')['lua_ls'].setup{
|
||||||
Lua = {
|
Lua = {
|
||||||
completion = {
|
completion = {
|
||||||
callSnippet = "Replace"
|
callSnippet = "Replace"
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = {'vim'},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require('lspconfig')['gopls'].setup{
|
lspconfig.gopls.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags
|
flags = lsp_flags
|
||||||
}
|
}
|
||||||
|
|
||||||
require('lspconfig')['emmet_ls'].setup{
|
lspconfig.emmet_ls.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
}
|
}
|
||||||
|
|
||||||
require'lspconfig'.cssls.setup{
|
lspconfig.cssls.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
}
|
}
|
||||||
|
|
||||||
require('lspconfig')['docker_compose_language_service'].setup{
|
lspconfig.docker_compose_language_service.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
|
|
Loading…
Add table
Reference in a new issue