mirror of
https://github.com/itme-brain/nvim.git
synced 2026-05-08 15:10:13 -04:00
updated
This commit is contained in:
parent
17bf7e4973
commit
7d72471237
17 changed files with 297 additions and 538 deletions
|
|
@ -13,7 +13,6 @@ vim.opt.tabstop = 2
|
|||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.incsearch = false
|
||||
|
|
@ -26,11 +25,29 @@ vim.opt.guicursor = "n-v-c:block,i:block,r:block"
|
|||
|
||||
vim.opt.fillchars = { eob = " " }
|
||||
|
||||
vim.opt.laststatus = 3
|
||||
|
||||
local mode_names = {
|
||||
n = "NORMAL", i = "INSERT", v = "VISUAL", V = "V-LINE",
|
||||
["\22"] = "V-BLOCK", c = "COMMAND", R = "REPLACE", t = "TERM",
|
||||
}
|
||||
|
||||
_G.statusline_mode = function()
|
||||
return mode_names[vim.api.nvim_get_mode().mode] or "?"
|
||||
end
|
||||
|
||||
_G.statusline_branch = function()
|
||||
local b = vim.b.gitsigns_head
|
||||
return b and (" " .. b) or ""
|
||||
end
|
||||
|
||||
vim.opt.statusline = " %{v:lua.statusline_mode()} %f%m%r %= %{v:lua.statusline_branch()} %l:%c "
|
||||
|
||||
local options_group = vim.api.nvim_create_augroup("config_options", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = options_group,
|
||||
pattern = { "python", "haskell", "c", "cpp" },
|
||||
pattern = { "python", "c", "cpp" },
|
||||
callback = function()
|
||||
local opt = vim.opt_local
|
||||
opt.tabstop = 4
|
||||
|
|
@ -38,11 +55,3 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
opt.softtabstop = 4
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
|
||||
group = options_group,
|
||||
pattern = "*.purs",
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].filetype = "purescript"
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue