formatting
This commit is contained in:
+54
-49
@@ -1,77 +1,82 @@
|
|||||||
local opt = vim.opt
|
-- TODO
|
||||||
|
-- https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua
|
||||||
|
-- https://github.com/CosmicNvim/CosmicNvim
|
||||||
|
-- https://github.com/AstroNvim/AstroNvim
|
||||||
|
-- https://github.com/jose-elias-alvarez/null-ls.nvim
|
||||||
|
--
|
||||||
-- ----------------------------------------
|
-- ----------------------------------------
|
||||||
-- SETTINGS
|
-- SETTINGS
|
||||||
-- ----------------------------------------
|
-- ----------------------------------------
|
||||||
|
|
||||||
-- system
|
-- system
|
||||||
opt.shell = "/usr/bin/bash"
|
vim.o.shell = "/usr/bin/bash"
|
||||||
opt.fileencodings = "utf-8,ucs-bom,gb18030,gbk,gb2312,cp936"
|
vim.o.fileencodings = "utf-8,ucs-bom,gb18030,gbk,gb2312,cp936"
|
||||||
opt.fileformats = "unix"
|
vim.o.fileformats = "unix"
|
||||||
opt.swapfile = false
|
vim.o.swapfile = false
|
||||||
opt.backup = false
|
vim.o.backup = false
|
||||||
opt.updatetime = 300
|
vim.o.updatetime = 300
|
||||||
opt.timeoutlen = 200
|
vim.o.timeoutlen = 200
|
||||||
vim.g.BASH_Ctrl_j = "off"
|
vim.g.BASH_Ctrl_j = "off"
|
||||||
vim.g.BASH_Ctrl_l = "off"
|
vim.g.BASH_Ctrl_l = "off"
|
||||||
|
|
||||||
-- looks
|
-- looks
|
||||||
opt.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
opt.cmdheight = 1
|
vim.o.cmdheight = 1
|
||||||
-- opt.background = "dark"
|
-- vim.o.background = "dark"
|
||||||
opt.listchars = "tab:→ ,trail:·,extends:↷,precedes:↶,nbsp:+,eol:↵"
|
vim.o.listchars = "tab:→ ,trail:·,extends:↷,precedes:↶,nbsp:+,eol:↵"
|
||||||
opt.list = true -- Show listchars
|
vim.o.list = true -- Show listchars
|
||||||
opt.showtabline = 2
|
vim.o.showtabline = 2
|
||||||
opt.laststatus = 2
|
vim.o.laststatus = 2
|
||||||
|
|
||||||
-- undo
|
-- undo
|
||||||
opt.undodir = "/home/hjalmarlucius/.cache/vim/undo"
|
vim.o.undodir = "/home/hjalmarlucius/.cache/vim/undo"
|
||||||
opt.undofile = true
|
vim.o.undofile = true
|
||||||
opt.undolevels = 1000
|
vim.o.undolevels = 1000
|
||||||
opt.undoreload = 10000
|
vim.o.undoreload = 10000
|
||||||
|
|
||||||
-- window
|
-- window
|
||||||
opt.splitbelow = true -- Put new windows below current
|
vim.o.splitbelow = true -- Put new windows below current
|
||||||
opt.splitright = true -- Put new windows right of current
|
vim.o.splitright = true -- Put new windows right of current
|
||||||
|
|
||||||
-- buffer
|
-- buffer
|
||||||
opt.hidden = true -- Enable background buffers
|
vim.o.hidden = true -- Enable background buffers
|
||||||
opt.wrap = false -- Disable line wrap
|
vim.o.wrap = false -- Disable line wrap
|
||||||
opt.number = true -- Show line numbers
|
vim.o.number = true -- Show line numbers
|
||||||
opt.relativenumber = true -- Relative line numbers
|
vim.o.relativenumber = true -- Relative line numbers
|
||||||
opt.cursorline = false -- Highlight current line
|
vim.o.cursorline = false -- Highlight current line
|
||||||
opt.switchbuf = "useopen" -- Use existing window if buffer is already open
|
vim.o.switchbuf = "useopen" -- Use existing window if buffer is already open
|
||||||
opt.colorcolumn = "88"
|
vim.o.colorcolumn = "88"
|
||||||
|
|
||||||
-- diffs
|
-- diffs
|
||||||
opt.diffopt="internal,filler,closeoff,hiddenoff,vertical,algorithm:patience"
|
vim.o.diffopt="internal,filler,closeoff,hiddenoff,vertical,algorithm:patience"
|
||||||
|
|
||||||
-- tabs
|
-- tabs
|
||||||
opt.expandtab = true -- Use spaces instead of tabs
|
vim.o.expandtab = true -- Use spaces instead of tabs
|
||||||
opt.smartindent = false -- Avoid fucking with comment indents
|
vim.o.smartindent = false -- Avoid fucking with comment indents
|
||||||
opt.shiftround = true -- Round indent
|
vim.o.shiftround = true -- Round indent
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
vim.o.tabstop = 2 -- Number of spaces tabs count for
|
||||||
opt.shiftwidth = 2 -- Size of an indent
|
vim.o.shiftwidth = 2 -- Size of an indent
|
||||||
|
|
||||||
-- search
|
-- search
|
||||||
opt.ignorecase = false -- Ignore case
|
vim.o.ignorecase = false -- Ignore case
|
||||||
opt.smartcase = false -- Do not ignore case with capitals
|
vim.o.smartcase = false -- Do not ignore case with capitals
|
||||||
opt.wildmode = {"full"} -- Command-line completion mode
|
vim.o.wildignorecase = true
|
||||||
opt.wildignorecase = true
|
vim.opt.wildmode = {"full"} -- Command-line completion mode
|
||||||
opt.wildignore = opt.wildignore + {
|
vim.opt.wildignore = vim.opt.wildignore + {
|
||||||
"*swp", "*.class", "*.pyc", "*.png", "*.jpg", "*.gif", "*.zip", "*/tmp/*",
|
"*swp", "*.class", "*.pyc", "*.png", "*.jpg", "*.gif", "*.zip", "*/tmp/*",
|
||||||
"*.o", ".obj", "*.so"
|
"*.o", ".obj", "*.so"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- cursor
|
-- cursor
|
||||||
opt.scrolloff = 5 -- Lines of context
|
vim.o.scrolloff = 5 -- Lines of context
|
||||||
opt.scrolljump = 1 -- Lines to scroll when cursor leaves screen
|
vim.o.scrolljump = 1 -- Lines to scroll when cursor leaves screen
|
||||||
opt.sidescrolloff = 4 -- Columns of context
|
vim.o.sidescrolloff = 4 -- Columns of context
|
||||||
opt.showmatch = true -- Show matching brackets / parentheses
|
vim.o.showmatch = true -- Show matching brackets / parentheses
|
||||||
|
|
||||||
-- editing
|
-- editing
|
||||||
opt.timeoutlen = 500 -- How long to wait during key combo
|
vim.o.timeoutlen = 500 -- How long to wait during key combo
|
||||||
opt.langmap = "å(,¨),Å{,^},Ø\\;,ø:,æ^,+$"
|
vim.o.langmap = "å(,¨),Å{,^},Ø\\;,ø:,æ^,+$"
|
||||||
opt.clipboard = opt.clipboard + {"unnamedplus"}
|
vim.opt.clipboard = vim.opt.clipboard + {"unnamedplus"}
|
||||||
|
|
||||||
-- folding (also see treesitter)
|
-- folding (also see treesitter)
|
||||||
-- zm/M zr/R increase/increase foldlevel (max)
|
-- zm/M zr/R increase/increase foldlevel (max)
|
||||||
@@ -79,10 +84,10 @@ opt.clipboard = opt.clipboard + {"unnamedplus"}
|
|||||||
-- za zA switch fold (small/full)
|
-- za zA switch fold (small/full)
|
||||||
-- zi toggle folds
|
-- zi toggle folds
|
||||||
-- zi zj move to next / prev fold
|
-- zi zj move to next / prev fold
|
||||||
opt.foldenable = false
|
vim.o.foldenable = false
|
||||||
opt.foldmethod = "expr"
|
vim.o.foldmethod = "expr"
|
||||||
|
|
||||||
opt.completeopt = "menu,menuone,noinsert"
|
vim.o.completeopt = "menu,menuone,noinsert"
|
||||||
vim.g.seoul256_background = 235
|
vim.g.seoul256_background = 235
|
||||||
|
|
||||||
-- ----------------------------------------
|
-- ----------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user