Override default filetype/indent settings
This commit is contained in:
parent
4979cd2b87
commit
50fb5321c2
@ -9,16 +9,29 @@ vim.cmd([[runtime plugin/fzf-lua.lua]])
|
|||||||
-- Show titlestring in GUI window title
|
-- Show titlestring in GUI window title
|
||||||
vim.opt.title = true
|
vim.opt.title = true
|
||||||
vim.opt.titlestring = "%t%m%r%{exists('g:project_name') ? ' : '.g:project_name : ''}"
|
vim.opt.titlestring = "%t%m%r%{exists('g:project_name') ? ' : '.g:project_name : ''}"
|
||||||
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
vim.opt.sw = 4
|
|
||||||
vim.opt.sts = 4
|
|
||||||
vim.opt.modeline = false
|
vim.opt.modeline = false
|
||||||
vim.opt.colorcolumn = "80"
|
vim.opt.colorcolumn = "80"
|
||||||
vim.opt.cursorcolumn = true
|
vim.opt.cursorcolumn = true
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
vim.opt.so = 8
|
vim.opt.so = 8
|
||||||
vim.opt.cinoptions = ":0,g0"
|
|
||||||
|
local holtrop_bufread_group = vim.api.nvim_create_augroup("holtrop_bufread_group", { clear = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
||||||
|
group = holtrop_bufread_group,
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
vim.schedule(function()
|
||||||
|
if vim.bo.filetype ~= "make" then
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
end
|
||||||
|
vim.opt_local.ts = 4
|
||||||
|
vim.opt_local.sw = 4
|
||||||
|
vim.opt_local.sts = 4
|
||||||
|
vim.opt_local.cinoptions = ":0,g0"
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Shortcuts
|
-- Shortcuts
|
||||||
vim.cmd([[map <C-s> :FzfLua combine pickers=buffers,files<CR>]])
|
vim.cmd([[map <C-s> :FzfLua combine pickers=buffers,files<CR>]])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user