.dotfiles/global/.config/nvim/lua/core/options.lua
2025-01-18 10:50:04 +01:00

149 lines
2.3 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local opt = vim.opt
-- local api = vim.api
-- Tab / Indentation
opt.tabstop = 4
opt.shiftwidth = 4
opt.softtabstop = 4
opt.expandtab = true
opt.autoindent = true
opt.smartindent = true
opt.wrap = false
opt.shiftwidth = 4
-- Search
opt.incsearch = true
opt.ignorecase = true
opt.smartcase = true
opt.hlsearch = true
-- Appearance
opt.title = true
opt.number = true
opt.relativenumber = false
opt.termguicolors = true
opt.colorcolumn = "100"
opt.signcolumn = "yes"
-- opt.signcolumn = "number"
opt.cmdheight = 1
opt.scrolloff = 10
opt.completeopt = "menuone,noinsert,noselect"
-- opt.guicursor = ""
opt.showmode = false
-- opt.tabline = '%!v:lua.require("utils").tabline()'
opt.conceallevel = 2
opt.breakindent = true
-- Behaviour
vim.opt.wildignore:append({
"*/node_modules/*",
"*.o",
"*.a",
"*.class",
"*.pyc",
"*/.git/*",
"*/dist/*",
"*/venv/*",
"*/__pycache__/*",
"*/.stfolder/*",
})
opt.splitkeep = "cursor"
opt.shell = "zsh"
opt.showcmd = true
opt.laststatus = 2
opt.expandtab = true
opt.hidden = true
opt.errorbells = false
opt.swapfile = false
opt.backup = false
opt.undodir = vim.fn.expand("~/.vim/undodir")
opt.undofile = true
opt.backspace = "indent,eol,start"
opt.splitright = true
opt.splitbelow = true
opt.autochdir = false
opt.iskeyword:append("-")
opt.mouse = ""
opt.clipboard:append("unnamedplus")
opt.modifiable = true
opt.encoding = "UTF-8"
opt.fileencoding = "utf-8"
opt.cursorline = false
-- spell
opt.spelllang = "en_us,ru"
opt.spell = true
-- api.nvim_set_option_value(
-- "langmap",
-- "йq,цw,уe,кr,еt,нy,гu,шi,щo,зp,х[,ъ],фa,ыs,вd,аf,пg,рh,оj,лk,дl,ж\\;,э',ё\\,яz,чx,сc,мv,иb,тn,ьm,б\\,,ю.,ЙQ,ЦW,УE,КR,ЕT,НY,ГU,ШI,ЩO,ЗP,Х{,Ъ},ФA,ЫS,ВD,АF,ПG,РH,ОJ,ЛK,ДL,Ж:,Э\",ЯZ,ЧX,СC,МV,ИB,ТN,ЬM,Б<,Ю>,Ё/|"
--)
vim.opt.langmap = {
"йq",
"цw",
"уe",
"кr",
"еt",
"нy",
"гu",
"шi",
"щo",
"зp",
"х[",
"ъ]",
"фa",
"ыs",
"вd",
"аf",
"пg",
"рh",
"оj",
"лk",
"дl",
"ж\\;",
"э'",
"ё\\,",
"яz",
"чx",
"сc",
"мv",
"иb",
"тn",
"ьm",
"б\\,",
"ю.",
"ЙQ",
"ЦW",
"УE",
"КR",
"ЕT",
"НY",
"ГU",
"ШI",
"ЩO",
"ЗP",
"Х{",
"Ъ}",
"ФA",
"ЫS",
"ВD",
"АF",
"ПG",
"РH",
"ОJ",
"ЛK",
"ДL",
"Ж:",
'Э"',
"ЯZ",
"ЧX",
"СC",
"МV",
"ИB",
"ТN",
"ЬM",
"Б<",
"Ю>",
"Ё/",
}