diff options
| author | Andrew Guschin <guschin@altlinux.org> | 2023-10-16 15:50:52 +0400 |
|---|---|---|
| committer | Andrew Guschin <guschin@altlinux.org> | 2023-10-16 15:50:52 +0400 |
| commit | b2b1f661e55c2a1139aef1f8f8aa4a11b10d3b01 (patch) | |
| tree | 200094a27a17f2a74f31128786726514181108e1 /init.lua | |
Initial commit
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..632a76c --- /dev/null +++ b/init.lua @@ -0,0 +1,79 @@ +-- Change color scheme +-- set background=dark +-- if has("gui_running") +-- set guioptions-=m " remove menu bar +-- set guioptions-=T " remove toolbar +-- set guioptions-=r " remove right-hand scroll bar +-- set guioptions-=L " remove left-hand scroll bar +-- set guioptions-=e " vim looking tabs +-- set antialias +-- " set macligatures +-- set guiligatures=!\"#$%&()*+-./:<=>?@[]^_{\|~ +-- set guioptions+=k +-- let &guifont="Fira Code:h17" +-- colorscheme ayu +-- else +-- colorscheme molokai +-- endif +vim.opt.termguicolors = true +vim.cmd.colorscheme("molokai") + +-- Tab configuration +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true +vim.opt.backspace = {"indent", "eol", "start"} + +-- Show whitespace characters +vim.opt.listchars = { + tab = "├─┤", + trail = "␠", + nbsp = "⎵", + lead = "·" +} +vim.opt.list = true + +-- Set line numbering rules +vim.wo.number = true +vim.wo.relativenumber = true +vim.api.nvim_create_autocmd("InsertEnter", { + pattern = "*", + callback = function (ev) + vim.wo.number = true + vim.wo.relativenumber = false + end +}) +vim.api.nvim_create_autocmd("InsertLeave", { + pattern = "*", + callback = function (ev) + vim.wo.number = true + vim.wo.relativenumber = true + end +}) + +-- Automatically change current directory to be the same as the file editing +vim.opt.autochdir = true + +-- Remove conceal for all files +vim.opt.conceallevel = 0 + +-- Paragraph formatter +-- let &formatprg="par -w80" + +-- Encodings +vim.opt.fileencodings = {"utf8", "cp1251", "koi8-r", "latin1"} + +-- " Spelling +-- set spell spelllang=ru,en + +-- Add vertical rulers +vim.opt.colorcolumn = {81, 121} + +-- netrw +vim.g.netrw_banner = false +vim.g.netrw_liststyle = 1 + +require("keybindings") +require("filetype-config") +require("plugins") |