From b12e317651a514369e3b718f0c15363cafe87f05 Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 20 Sep 2021 21:23:42 +0100 Subject: [PATCH] update --- lua/init-plugins.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lua/init-plugins.lua b/lua/init-plugins.lua index afb5452..904b622 100644 --- a/lua/init-plugins.lua +++ b/lua/init-plugins.lua @@ -56,12 +56,12 @@ local luaformat = { } local util = require "lspconfig".util local on_attach_efm = function(client) - if client.resolved_capabilities.document_formatting then - vim.cmd [[augroup lsp_formatting]] - vim.cmd [[autocmd!]] - vim.cmd [[autocmd BufWritePre :lua vim.lsp.buf.formatting_seq_sync({}, 1000)]] - vim.cmd [[augroup END]] - end + -- if client.resolved_capabilities.document_formatting then + -- vim.cmd [[augroup lsp_formatting]] + -- vim.cmd [[autocmd!]] + -- vim.cmd [[autocmd BufWritePre :lua vim.lsp.buf.formatting_seq_sync({}, 1000)]] + -- vim.cmd [[augroup END]] + -- end end require "lspconfig".efm.setup { init_options = {documentFormatting = true}, @@ -75,10 +75,10 @@ require "lspconfig".efm.setup { rootMarkers = {".eslintrc.js", ".git/"}, languages = { javascript = {eslint}, - json = {jq, fixjson}, - python = {flake8, black}, - sh = {shellcheck}, - lua = {luaformat} + json = {jq, fixjson}, + python = {flake8, black}, + sh = {shellcheck}, + lua = {luaformat} } } } @@ -111,7 +111,6 @@ local servers = { 'vimls', -- npm install -g vls 'vuels', - -- npm i -g stylelint-lsp 'yamlls', }