fix per-filetype indentation
This commit is contained in:
parent
e8283df5bb
commit
865e5b729b
|
@ -0,0 +1 @@
|
|||
sh.lua
|
|
@ -0,0 +1 @@
|
|||
vim.cmd('setlocal autoindent noexpandtab tabstop=8 shiftwidth=8 softtabstop=8')
|
|
@ -0,0 +1 @@
|
|||
c.lua
|
|
@ -0,0 +1 @@
|
|||
sh.lua
|
|
@ -0,0 +1 @@
|
|||
c.lua
|
|
@ -0,0 +1 @@
|
|||
vim.cmd('setlocal autoindent expandtab tabstop=2 shiftwidth=2 softtabstop=2')
|
|
@ -0,0 +1 @@
|
|||
vim.cmd('setlocal autoindent expandtab tabstop=2 shiftwidth=2 softtabstop=2')
|
|
@ -0,0 +1 @@
|
|||
rust.lua
|
|
@ -0,0 +1 @@
|
|||
vim.cmd('setlocal autoindent expandtab tabstop=4 shiftwidth=4 softtabstop=4')
|
|
@ -0,0 +1 @@
|
|||
vim.cmd('setlocal autoindent expandtab tabstop=4 shiftwidth=4 softtabstop=4')
|
|
@ -0,0 +1 @@
|
|||
vim.cmd('setlocal autoindent expandtab tabstop=4 shiftwidth=4 softtabstop=4')
|
|
@ -0,0 +1 @@
|
|||
vim.cmd('setlocal autoindent expandtab tabstop=2 shiftwidth=2 softtabstop=2')
|
|
@ -0,0 +1 @@
|
|||
yaml.lua
|
|
@ -16,29 +16,3 @@ vim.api.nvim_create_autocmd('BufWritePre', {
|
|||
pattern = {'*.rs'},
|
||||
command = 'lua vim.lsp.buf.format(nil, 200)',
|
||||
})
|
||||
|
||||
-- set indentation to 2 spaces for special file types
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = {
|
||||
'*.lua',
|
||||
'*.nix',
|
||||
'*.yaml',
|
||||
'*.yml',
|
||||
},
|
||||
command = 'setlocal autoindent expandtab tabstop=2 shiftwidth=2 softtabstop=2',
|
||||
})
|
||||
|
||||
-- set indentation to 4 spaces for special file types
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = {
|
||||
'*.bash',
|
||||
'*.c',
|
||||
'*.cpp',
|
||||
'*.dash',
|
||||
'*.h',
|
||||
'*.rs',
|
||||
'*.sh',
|
||||
'*.toml',
|
||||
},
|
||||
command = 'setlocal autoindent expandtab tabstop=4 shiftwidth=4 softtabstop=4',
|
||||
})
|
||||
|
|
|
@ -135,6 +135,8 @@ require('lazy').setup({
|
|||
-- 'gc' to comment visual regions/lines
|
||||
'numToStr/Comment.nvim',
|
||||
|
||||
-- Nix[OS] things
|
||||
|
||||
}, {
|
||||
defaults = {
|
||||
lazy = true, -- enable lazy-loading of plugins
|
||||
|
|
Loading…
Reference in New Issue