1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 11:24:55 +02:00

Update nvim config

This commit is contained in:
Henrik Hautakoski 2023-11-22 14:19:13 +01:00
parent d7a1770460
commit 461e0cc49a
27 changed files with 426 additions and 2999 deletions

View file

@ -0,0 +1,31 @@
local autocmd = vim.api.nvim_create_autocmd
local augroup = vim.api.nvim_create_augroup
local set = vim.opt
set.tabstop = 4
set.softtabstop = 4
set.shiftwidth = 4
set.autoindent = true
augroup('indent', { clear = true })
-- Hardtabs for make
autocmd('Filetype', {
group = 'indent',
pattern = { 'make' },
command = 'setlocal ts=4 sts=0 sw=4 noexpandtab'
})
-- Softtab (2) for yaml
autocmd('Filetype', {
group = 'indent',
pattern = { 'yaml' },
command = 'setlocal ts=2 sts=2 sw=2 expandtab'
})
-- Hardtabs for c/cpp
autocmd('Filetype', {
group = 'indent',
pattern = { 'c', 'cpp' },
command = 'setlocal ts=8 sts=0 sw=8 noexpandtab'
})