From 71c5cb4f0be89d3a175e99b0c2ebc5e55178e8a9 Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 5 Jul 2021 20:01:19 +0000 Subject: (feat) use neoformat as the defalt format option (#715) --- ftplugin/go.lua | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'ftplugin/go.lua') diff --git a/ftplugin/go.lua b/ftplugin/go.lua index 0bee465f..56b9cacc 100644 --- a/ftplugin/go.lua +++ b/ftplugin/go.lua @@ -6,17 +6,7 @@ require("lspconfig").gopls.setup { on_attach = require("lsp").common_on_attach, } -if O.lang.go.autoformat then - require("lv-utils").define_augroups { - _go_format = { - { "BufWritePre", "*.go", "lua vim.lsp.buf.formatting_sync(nil,1000)" }, - }, - _go = { - -- Go generally requires Tabs instead of spaces. - { "FileType", "go", "setlocal tabstop=4" }, - { "FileType", "go", "setlocal shiftwidth=4" }, - { "FileType", "go", "setlocal softtabstop=4" }, - { "FileType", "go", "setlocal noexpandtab" }, - }, - } -end +vim.opt_local.tabstop = 4 +vim.opt_local.shiftwidth = 4 +vim.opt_local.softtabstop = 4 +vim.opt_local.expandtab = false -- cgit v1.2.3