52 lines
1,015 B
Lua
52 lines
1,015 B
Lua
|
|
vim.filetype.add({
|
|
extension = {
|
|
pmd = "markdown",
|
|
},
|
|
})
|
|
|
|
createAutoCmd = vim.api.nvim_create_autocmd
|
|
--
|
|
-- Basic thing for compiling languages.
|
|
createAutoCmd({
|
|
"BufNewFile",
|
|
"BufRead",
|
|
},{
|
|
pattern = "*.tengo,*.go,*.c,*.cc,*.C,*.cpp,*.rs,*.lua,*.sql,*.tengo,*.xgo,*.tpp",
|
|
callback = function()
|
|
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
|
vim.o.expandtab = false
|
|
vim.o.tabstop = 4
|
|
vim.o.shiftwidth = 4
|
|
end,
|
|
})
|
|
|
|
createAutoCmd({
|
|
"BufNewFile",
|
|
"BufRead",
|
|
},{
|
|
pattern = "*.md,*.txt,*.js,*.jsx,*.scss"..
|
|
",*.css,*.sass,*.htm,*.html,*.htmlx,*.tmpl"..
|
|
",*.tpl,*.yml,*.yaml,*.toml,*.tml",
|
|
callback = function()
|
|
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
|
buf.expandtab = true
|
|
buf.shiftwidth=2
|
|
buf.tabstop=4
|
|
buf.softtabstop = 0
|
|
end,
|
|
})
|
|
|
|
createAutoCmd({
|
|
"BufNewFile",
|
|
"BufRead",
|
|
},{
|
|
pattern = "*.py,*.zig",
|
|
callback = function()
|
|
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
|
buf.expandtab = true
|
|
buf.shiftwidth=4
|
|
buf.tabstop=4
|
|
buf.softtabstop = 0
|
|
end,
|
|
})
|