summaryrefslogtreecommitdiff
path: root/ftplugin/go.lua
diff options
context:
space:
mode:
authorRafael <[email protected]>2021-07-05 20:01:19 +0000
committerGitHub <[email protected]>2021-07-05 16:01:19 -0400
commit71c5cb4f0be89d3a175e99b0c2ebc5e55178e8a9 (patch)
tree941ed16b7e2f84ec45ce9b2c4a3d6d638cf584a7 /ftplugin/go.lua
parent9d399314d4ef9b05df738dda016ea52ec2e85823 (diff)
(feat) use neoformat as the defalt format option (#715)
Diffstat (limited to 'ftplugin/go.lua')
-rw-r--r--ftplugin/go.lua18
1 files changed, 4 insertions, 14 deletions
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