Skip to content

Commit b1ebb60

Browse files
trying to do formatting
1 parent d250ccc commit b1ebb60

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

init.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ I hope you enjoy your Neovim journey,
8484
P.S. You can delete this when you're done too. It's your config now! :)
8585
--]]
8686

87+
-- Set how many spaces a tab counts for
88+
-- See `:help 'tabstop'`
89+
vim.opt.tabstop = 2
90+
91+
-- Set the number of spaces inserted for each indentation
92+
-- See `:help 'shiftwidth'`
93+
vim.opt.shiftwidth = 2
94+
95+
-- Use spaces instead of tabs
96+
-- See `:help 'expandtab'`
97+
-- vim.opt.expandtab = true
98+
8799
-- Set <space> as the leader key
88100
-- See `:help mapleader`
89101
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)

lua/custom/plugins/init.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,15 @@ return {
1010
vim.cmd 'Copilot setup'
1111
end,
1212
},
13+
{
14+
'sbdchd/neoformat',
15+
cmd = 'Neoformat',
16+
config = function()
17+
vim.g.neoformat_enabled_javascript = { 'prettier' }
18+
vim.g.neoformat_enabled_python = { 'black' }
19+
vim.g.neoformat_enabled_typescript = { 'prettier' }
20+
vim.g.neoformat_enabled_yaml = { 'prettier' }
21+
vim.g.neoformat_run_on_save = 1
22+
end,
23+
},
1324
}

0 commit comments

Comments
 (0)