From 4540b8a334f7e9f3211a5beb45644154c6e2887e Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 13 Jan 2022 16:12:59 +0100 Subject: [PATCH] Add efm-language server formatting for protobuf --- .config/efm-langserver/config.yaml | 14 ++++++++++++++ .config/nvim/lua/plugins.lua | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .config/efm-langserver/config.yaml diff --git a/.config/efm-langserver/config.yaml b/.config/efm-langserver/config.yaml new file mode 100644 index 0000000..a7b4c56 --- /dev/null +++ b/.config/efm-langserver/config.yaml @@ -0,0 +1,14 @@ +version: 2 +root-markers: +- .git/ + +tools: + clang-format: &clang-format + format-command: 'clang-format -style="{BasedOnStyle: Google, IndentWidth: 2, AlignConsecutiveDeclarations: true, AlignConsecutiveAssignments: true, ColumnLimit: 0}"' + format-stdin: true + +languages: + proto: + - <<: *clang-format + + diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index f3d7eac..7d71a25 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -236,6 +236,16 @@ return require('packer').startup(function() end } + + use { + 'mattn/efm-langserver', + config = function() + require "lspconfig".efm.setup { + init_options = {documentFormatting = true}, + } + end + } + use { "ray-x/go.nvim", config = function()