Skip to content

Commit 2797c1e

Browse files
committed
update tab settings for golang
1 parent 84a991c commit 2797c1e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

after/ftplugin/go.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
local opt = vim.opt
2+
3+
-- General tab settings
4+
opt.tabstop = 4 -- Number of visual spaces per TAB
5+
opt.softtabstop = 4 -- Number of spaces in tab when editing
6+
opt.shiftwidth = 4 -- Number of spaces to use for autoindent
7+
opt.expandtab = false -- Expand tab to spaces so that tabs are spaces
8+
19
-- gofumpt adds more rule to gofmt, and is compatible with gofmt,
210
-- so also https://github.com/mvdan/gofumpt
311
vim.keymap.set("n", "<Space>f", function()

0 commit comments

Comments
 (0)