diff options
author | christianchiarulli <[email protected]> | 2021-07-05 16:26:31 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-07-05 16:26:31 -0400 |
commit | 20485971641a9d916640ccad05586a641c984ed6 (patch) | |
tree | d397a3a9adba502b4c26b802d897b8310972f76f /ftplugin/go.lua | |
parent | 56e82dac4497293541099185441485dd31e98dc8 (diff) | |
parent | a469c710bfc01f291df68dba40464caaa2b496da (diff) |
Merge branch 'master' of github.com:ChristianChiarulli/LunarVim into stable
Diffstat (limited to 'ftplugin/go.lua')
-rw-r--r-- | ftplugin/go.lua | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/ftplugin/go.lua b/ftplugin/go.lua index b2d6a82a..56b9cacc 100644 --- a/ftplugin/go.lua +++ b/ftplugin/go.lua @@ -1,22 +1,12 @@ -require'lspconfig'.gopls.setup { - cmd = {DATA_PATH .. "/lspinstall/go/gopls"}, - settings = {gopls = {analyses = {unusedparams = true}, staticcheck = true}}, - root_dir = require'lspconfig'.util.root_pattern(".git", "go.mod"), - init_options = {usePlaceholders = true, completeUnimported = true}, - on_attach = require'lsp'.common_on_attach +require("lspconfig").gopls.setup { + cmd = { DATA_PATH .. "/lspinstall/go/gopls" }, + settings = { gopls = { analyses = { unusedparams = true }, staticcheck = true } }, + root_dir = require("lspconfig").util.root_pattern(".git", "go.mod"), + init_options = { usePlaceholders = true, completeUnimported = true }, + 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 |